Closed
Bug 1098517
Opened 10 years ago
Closed 10 years ago
Fix hiding of FxA UI when loop.fxa.enabled is false
Categories
(Hello (Loop) :: Client, defect)
Hello (Loop)
Client
Tracking
(firefox38 fixed)
People
(Reporter: MattN, Assigned: lazybug, Mentored)
References
Details
(Whiteboard: [lang=js][good first bug])
Attachments
(1 file, 5 obsolete files)
6.64 KB,
patch
|
MattN
:
review+
|
Details | Diff | Splinter Review |
It may be as simple as adding the attribute `displayed={navigator.mozLoop.fxAEnabled}` to <div className="footer-signin-separator" /> at https://mxr.mozilla.org/mozilla-central/source/browser/components/loop/content/js/panel.jsx?rev=3e5a8432885b#777
Make sure to build-jsx so panel.js gets updated too.
Flags: qe-verify-
Flags: firefox-backlog+
Comment 1•10 years ago
|
||
only impacts if we turn direct calling off. with this sprint so full - putting to next sprint to consider.
backlog: Fx35? → Fx37?
Updated•10 years ago
|
backlog: Fx37? → Fx38?
Assignee | ||
Comment 2•10 years ago
|
||
hi i would like to work on this bug.i have successfully build and ran firefox.
but here i cant figure out where to set loop.fxa.enabled. i checked in about:config but couldn't find any such setting.
Flags: needinfo?(gijskruitbosch+bugs)
Comment 3•10 years ago
|
||
(In reply to nithin from comment #2)
> hi i would like to work on this bug.i have successfully build and ran
> firefox.
>
> but here i cant figure out where to set loop.fxa.enabled. i checked in
> about:config but couldn't find any such setting.
You can set it yourself using about:config - right-click, and choose new boolean, then put "loop.fxa.enabled" as the name (without quotes) and set the value to true.
Flags: needinfo?(gijskruitbosch+bugs)
Assignee | ||
Comment 4•10 years ago
|
||
i am not able to build the panel.jsx file beacause even when iam commenting out the code for the seperator "<div className="footer-signin-separator" />" its still showing up . but if i am changing it in the panel.js "React.createElement("div", {className: "footer-signin-separator"}), " its not showing up.
now iam using " ./mach build browser/components/loop/"
can you help me in properly building it?
Comment 5•10 years ago
|
||
(In reply to nithin from comment #4)
> i am not able to build the panel.jsx file beacause even when iam commenting
> out the code for the seperator "<div className="footer-signin-separator" />"
> its still showing up . but if i am changing it in the panel.js
> "React.createElement("div", {className: "footer-signin-separator"}), " its
> not showing up.
> now iam using " ./mach build browser/components/loop/"
> can you help me in properly building it?
Flags: needinfo?(MattN+bmo)
Comment 6•10 years ago
|
||
Hi nithin, the panel.jsx should indeed be built to update panel.js, which is the script loaded by the Loop panel. To build the *.jsx files, you'll need to run the following:
$ npm install react-tools -g
$ cd <your-checkout-dir>/browser/components/loop
$ ./build-jsx -w
The -w flag will keep watching the loop source directory for changes in the *.jsx files and re-build them if necessary.
After all this you can do
$ ./mach build browser/components/loop/
and you'll see the changes you just made.
Updated•10 years ago
|
Flags: needinfo?(MattN+bmo)
Assignee | ||
Comment 7•10 years ago
|
||
created patch , used "hidden" attribute to hide
Attachment #8550386 -
Flags: review?(MattN+bmo)
Reporter | ||
Comment 8•10 years ago
|
||
Sorry, the bug summary no longer reflects what's need to be done. The behaviour of the pref has regressed since it landed so it's no longer doing the right thing. The gear menu shouldn't be hiding anymore now that there are non-login items in it (Tour + Help) so the separator should stay visible but some of the entries in the dropdown should be hidden.
Do you want to update panel.jsx to only hide the "Account", and "Sign In"/"Sign Out" entries in the dropdown but leave the gear showing with the other entries. You can look at:
https://mxr.mozilla.org/mozilla-central/source/browser/components/loop/content/js/panel.jsx?rev=37ca80281932#322
You can use `displayed={navigator.mozLoop.fxAEnabled}`
Thanks and sorry about the bug being stale.
Assignee: nobody → imnmfotmal
Status: NEW → ASSIGNED
Summary: The gear menu separator isn't hidden when loop.fxa.enabled is false → Fix hiding of FxA UI when loop.fxa.enabled is false
Reporter | ||
Updated•10 years ago
|
Attachment #8550386 -
Attachment is obsolete: true
Attachment #8550386 -
Flags: review?(MattN+bmo)
Assignee | ||
Comment 9•10 years ago
|
||
Attachment #8553734 -
Flags: review+
Assignee | ||
Comment 10•10 years ago
|
||
added patch
Attachment #8553734 -
Attachment is obsolete: true
Attachment #8553738 -
Flags: review?(MattN+bmo)
Reporter | ||
Comment 11•10 years ago
|
||
Comment on attachment 8553738 [details] [diff] [review]
patch_v2.patch
Review of attachment 8553738 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks! This patch fixes the problem but I guess you didn't see the instructions from comment 6 on how to generate the .js file from the .jsx. I also noticed that tests were failing:
AssertionError: browser/components/loop/test/desktop-local/index.html: 1 failure(s) encountered:
TEST-UNEXPECTED-FAIL | index.html | should be hidden if FxA is not enabled…
Could you test your patch with ./browser/components/loop/run-all-loop-tests.sh and fix the test?
Also, the User header of the patch seems to be malformed (missing "<")
Attachment #8553738 -
Flags: review?(MattN+bmo) → feedback+
Assignee | ||
Comment 12•10 years ago
|
||
sorry, i created the patch using git, forgot to add js file.
I am not exactly sure where to look for what failed the test (the testing condition), i tried locating the python file used to run the test, but was not helpful. i tried searching the documentation , still couldn't find anything much useful.
Comment 13•10 years ago
|
||
(In reply to nithin from comment #12)
> I am not exactly sure where to look for what failed the test (the testing
> condition), i tried locating the python file used to run the test, but was
> not helpful. i tried searching the documentation , still couldn't find
> anything much useful.
You can run that test by hand, I've just filed bug 1125775 for adding the following information into our readme.
=======
You can run these as part of the run-all-loop-tests.sh command above, or you can run these individually in Firefox. To run them individually, start the standalone client (see standalone/README.md) and load:
http://localhost:3000/test/
=======
Once loaded, you should be able to scroll through the page, see the errors in more detail, and debug what's happening.
Assignee | ||
Comment 14•10 years ago
|
||
hi sorry for the delay, i tried the standalone client, but it was not running the local tests. but however i was able to figure out the test which failed and i removed it (As it was asserting exactly what we have changed , it was no longer needed i guess ) now patch is passing all the tests. but however,using standalone , in the shared testes 5 tests are failing, (they were failing even before the changes i made) do we need to take care of that?
Flags: needinfo?(standard8)
Attachment #8560703 -
Flags: review?(MattN+bmo)
Reporter | ||
Comment 15•10 years ago
|
||
Comment on attachment 8560703 [details] [diff] [review]
loopfxa_v3.patch
Review of attachment 8560703 [details] [diff] [review]:
-----------------------------------------------------------------
::: browser/components/loop/test/desktop-local/panel_test.js
@@ -269,5 @@
> afterEach(function() {
> navigator.mozLoop.fxAEnabled = true;
> });
>
> - it("should be hidden if FxA is not enabled",
It's fine to delete this but a new test should be added to test that the Account menu item is hidden though.
Attachment #8560703 -
Flags: review?(MattN+bmo) → review+
Comment 16•10 years ago
|
||
Comment on attachment 8560703 [details] [diff] [review]
loopfxa_v3.patch
Review of attachment 8560703 [details] [diff] [review]:
-----------------------------------------------------------------
Matt's right, we should get a test added for the account display functionality - you should just be able to base it on the existing "should show an account entry when user is authenticated" test.
::: browser/components/loop/content/js/panel.jsx
@@ +337,1 @@
> displayed={this._isSignedIn()} />
This might work, but probably would be better as:
displayed={navigator.mozLoop.fxAEnabled || this._isSignedIn()}
Updated•10 years ago
|
Flags: needinfo?(standard8)
Assignee | ||
Comment 17•10 years ago
|
||
created new patch with a test and also incoprating Markk's suggestion
Attachment #8553738 -
Attachment is obsolete: true
Attachment #8560703 -
Attachment is obsolete: true
Attachment #8564085 -
Flags: review?(MattN+bmo)
Attachment #8564085 -
Flags: feedback?(standard8)
Comment 18•10 years ago
|
||
Comment on attachment 8564085 [details] [diff] [review]
loopfxa_v4.patch
Review of attachment 8564085 [details] [diff] [review]:
-----------------------------------------------------------------
Looks great, the test is the right thing to do.
::: browser/components/loop/test/desktop-local/panel_test.js
@@ +258,5 @@
> expect(view.getDOMNode()).to.be.null;
> });
> });
> +
> + it("should hide the account entry when FxA is not enabled", function() {
Small nit: there's a little bit of whitespace on the line before the test that isn't needed.
Attachment #8564085 -
Flags: feedback?(standard8) → feedback+
Assignee | ||
Comment 19•10 years ago
|
||
so should i remove those spaces and submit a new patch ???
Flags: needinfo?(standard8)
Comment 20•10 years ago
|
||
Yes please - it makes it easier for the person landing the patch.
Flags: needinfo?(standard8)
Assignee | ||
Comment 21•10 years ago
|
||
Attachment #8564085 -
Attachment is obsolete: true
Attachment #8564085 -
Flags: review?(MattN+bmo)
Attachment #8564979 -
Flags: review?(MattN+bmo)
Reporter | ||
Comment 22•10 years ago
|
||
Comment on attachment 8564979 [details] [diff] [review]
loopfxa_v4.patch
Review of attachment 8564979 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks!
By the way, you can use "r=MattN" in the future as we usually don't use spaces for r=… so that we can parse the reviewer out of the message.
Attachment #8564979 -
Flags: review?(MattN+bmo) → review+
Reporter | ||
Updated•10 years ago
|
Keywords: checkin-needed
Comment 23•10 years ago
|
||
Can we please run this through Try to ensure that there are no test failures lurking in the weeds before it lands? :)
Keywords: checkin-needed
Reporter | ||
Comment 24•10 years ago
|
||
Keywords: checkin-needed
Reporter | ||
Comment 25•10 years ago
|
||
Flags: in-testsuite+
Keywords: checkin-needed
Whiteboard: [lang=js][good first bug] → [lang=js][good first bug][fixed-in-fx-team]
Comment 26•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox38:
--- → fixed
Resolution: --- → FIXED
Whiteboard: [lang=js][good first bug][fixed-in-fx-team] → [lang=js][good first bug]
Target Milestone: --- → mozilla38
Updated•10 years ago
|
Iteration: --- → 38.3 - 23 Feb
You need to log in
before you can comment on or make changes to this bug.
Description
•