Closed
Bug 697259
Opened 14 years ago
Closed 13 years ago
Follow-up: e10s-friendly handling of sync link visibility on sync setup or unlink
Categories
(Firefox :: Sync, defect)
Firefox
Sync
Tracking
()
RESOLVED
INVALID
People
(Reporter: liuche, Assigned: liuche)
References
Details
(Whiteboard: [closeme-sync.next][sync:setup])
Attachments
(2 files, 2 obsolete files)
|
4.14 KB,
patch
|
Gavin
:
feedback+
|
Details | Diff | Splinter Review |
|
4.07 KB,
patch
|
Gavin
:
feedback+
|
Details | Diff | Splinter Review |
WIP patch for better handling of sync link visibility change. Follow-up to patch 2 of bug 675821.
Successfully changes "Set Up Sync" link visibility in UI, listeners not firing in testing.
| Assignee | ||
Comment 1•14 years ago
|
||
Attachment #569817 -
Flags: feedback?(gavin.sharp)
| Assignee | ||
Updated•14 years ago
|
Attachment #569504 -
Attachment is obsolete: true
Comment 2•14 years ago
|
||
Comment on attachment 569817 [details] [diff] [review]
part 1, v1: async messages + tests (listener fails to fire)
This part looks good. I'll attach a patch for test tweaks in a second.
Attachment #569817 -
Flags: feedback?(gavin.sharp) → feedback+
Comment 3•14 years ago
|
||
For some reason the content.js redeclaration error seems to only affect tests, I'm not sure why.
| Assignee | ||
Comment 4•14 years ago
|
||
apply "2b, v1" and then part 2 on top of that. Test is browser_aboutHome.js, and fails on un-hiding setupSyncLink after unpairing (although the converse, hiding setupSyncLink after setup, *does* work and passes testing).
Attachment #570803 -
Flags: feedback?
| Assignee | ||
Updated•14 years ago
|
Attachment #569817 -
Attachment description: 2b, v1: async messages + tests (listener fails to fire) → part 1, v1: async messages + tests (listener fails to fire)
Comment 5•14 years ago
|
||
Comment on attachment 570803 [details] [diff] [review]
part 2, v1: changed elt.setAttr(hidden) to elt.hidden
>diff --git a/browser/base/content/content.js b/browser/base/content/content.js
>- if (hidden)
>- item.setAttribute("hidden", "true");
>- else
>- item.removeAttribute("hidden");
>+ if (hidden) {
>+ item.hidden = true;
>+ } else {
>+ item.hidden = false;
>+ }
Why this change? Setting the attribute is generally more reliable (not all elements have the hidden attribute reflected as a DOM property). I think you should instead change the test to also check the attribute (rather than the property).
Attachment #570803 -
Flags: feedback? → feedback-
Comment 6•14 years ago
|
||
(In reply to Gavin Sharp (use gavin@gavinsharp.com for email) from comment #5)
> Why this change?
I suggested this to liuche on IRC, based on this:
"Using setAttribute() to modify certain attributes, most notably value in
XUL, works inconsistently, as the attribute specifies the default value. To
access or modify the current values, you should use the properties. For
example, use elt.value instead of elt.setAttribute('value', val)."
-- https://developer.mozilla.org/en/DOM/element.setAttribute
This was a stab-in-the-dark suggestion, 'cos I'm still waiting for a build to finish so that I can give better advice :)
Comment 7•14 years ago
|
||
Ah, it turns out I was wrong - my advice holds for XUL, where the hidden attribute may not be reflected consistently, but in HTML it appears that .hidden is specced to apply to all elements, and we seem to implement that, so sticking to ".hidden" everywhere makes sense.
Comment 8•14 years ago
|
||
Comment on attachment 570803 [details] [diff] [review]
part 2, v1: changed elt.setAttr(hidden) to elt.hidden
you could simplify to item.hidden = hidden;, though
Attachment #570803 -
Flags: feedback- → feedback+
| Assignee | ||
Updated•14 years ago
|
Attachment #570410 -
Attachment is obsolete: true
Updated•14 years ago
|
Updated•14 years ago
|
Assignee: nobody → liuche
Priority: -- → P5
Comment 9•13 years ago
|
||
Anyone feel strongly about landing this now?
Priority: P5 → --
Whiteboard: [closeme-sync.next][sync:setup]
| Assignee | ||
Comment 10•13 years ago
|
||
No longer relevant with the current about:home.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
Updated•7 years ago
|
Component: Firefox Sync: UI → Sync
Product: Cloud Services → Firefox
You need to log in
before you can comment on or make changes to this bug.
Description
•