Closed
Bug 790489
Opened 13 years ago
Closed 13 years ago
"Restore previous session" in about:home can flash visible on load
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
FIXED
Firefox 18
People
(Reporter: Unfocused, Assigned: raymondlee)
Details
(Whiteboard: [good first bug][mentor=jaws][lang=css][lang=js][Snappy])
Attachments
(1 file, 2 obsolete files)
|
2.74 KB,
patch
|
jaws
:
review+
|
Details | Diff | Splinter Review |
The "Restore previous session" button in about:home defaults to visible, and is hidden when not needed. This can lead to that button flashing visible when about:home loads, and the button isn't meant to be visible.
It should default to hidden and optionally be shown to avoid this.
Comment 1•13 years ago
|
||
We should determine what is needed most often and do that. Maybe session restore is available more often than not. I think step 1 of this bug would be to land a telemetry probe that reports if session restore is an option for each page load of about:home.
| Reporter | ||
Comment 2•13 years ago
|
||
I don't think that should matter. If the machine is slow enough to cause any flash (hide -> show -> hide), its *very* noticeable. Alternatively, even a much longer delay before its shown (hide -> show) would be far less disruptive, because its far less visual noise.
Updated•13 years ago
|
Whiteboard: [good first bug][mentor=jaws][lang=css][lang=js]
Version: unspecified → 14 Branch
| Assignee | ||
Comment 3•13 years ago
|
||
| Assignee | ||
Updated•13 years ago
|
Attachment #664386 -
Flags: review?(jaws)
| Reporter | ||
Updated•13 years ago
|
Attachment #664386 -
Attachment is patch: true
| Reporter | ||
Updated•13 years ago
|
Assignee: nobody → raymond
Status: NEW → ASSIGNED
Updated•13 years ago
|
Attachment #664386 -
Flags: review?(jaws) → review?(fryn)
Comment 4•13 years ago
|
||
Comment on attachment 664386 [details] [diff] [review]
v1
Review of attachment 664386 [details] [diff] [review]:
-----------------------------------------------------------------
r+ with comment addressed!
::: browser/base/content/abouthome/aboutHome.css
@@ +241,1 @@
> #restorePreviousSessionSeparator {
Could you move this block to the location of the comment below?
This way, we won't have to worry as much about future changes to selector specificity messing this up, and it arguably makes the logic easier to follow.
Of course, I wrote this originally, so not your fault. :)
@@ +268,5 @@
> }
>
> body[narrow] #restorePreviousSession {
> font-size: 80%;
> }
Put it here, please!
Attachment #664386 -
Flags: review?(fryn) → review+
Comment 5•13 years ago
|
||
Jared, thanks for the review baton pass. :)
Raymond, my review comment was misleading.
I actually mean to take the block that is:
+#launcher[session] > #restorePreviousSessionSeparator,
+#launcher[session] > #restorePreviousSession {
+ display: block;
+}
and move it after:
body[narrow] #restorePreviousSession {
font-size: 80%;
}
Thanks for writing the patch! :)
Comment 6•13 years ago
|
||
Comment on attachment 664386 [details] [diff] [review]
v1
Review of attachment 664386 [details] [diff] [review]:
-----------------------------------------------------------------
I don't think this patch does enough. It does move the CSS around in a way that looks like it will work, but http://mxr.mozilla.org/mozilla-central/source/browser/base/content/abouthome/aboutHome.xhtml#57 shows that the |session| attribute is on the element by default.
Based on Blair's feedback, this attribute should only be placed on the element if it has been confirmed that session restore is available.
Please update http://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser.js#2497 and http://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser.js#2716 to reflect this reversal.
Also, I'm not sure why there are two places in our codebase that remove this attribute. Frank, do you know why?
Attachment #664386 -
Flags: review+ → feedback+
Updated•13 years ago
|
Whiteboard: [good first bug][mentor=jaws][lang=css][lang=js] → [good first bug][mentor=jaws][lang=css][lang=js][Snappy]
Comment 7•13 years ago
|
||
(In reply to Jared Wein [:jaws] from comment #6)
> Comment on attachment 664386 [details] [diff] [review]
> v1
>
> Review of attachment 664386 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> I don't think this patch does enough. It does move the CSS around in a way
> that looks like it will work, but
> http://mxr.mozilla.org/mozilla-central/source/browser/base/content/abouthome/
> aboutHome.xhtml#57 shows that the |session| attribute is on the element by
> default.
>
> Based on Blair's feedback, this attribute should only be placed on the
> element if it has been confirmed that session restore is available.
Oh right. Good catch. Raymond, please change the JS, so that behaves as Jared explained.
> Please update
> http://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser.
> js#2497 and
> http://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser.
> js#2716 to reflect this reversal.
>
> Also, I'm not sure why there are two places in our codebase that remove this
> attribute. Frank, do you know why?
Yes. The first instance removes the session attribute when it is discovered session restore is not available. The second instance removes the session attribute when the session restore button is clicked.
| Assignee | ||
Comment 8•13 years ago
|
||
> +#launcher[session] > #restorePreviousSessionSeparator,
> +#launcher[session] > #restorePreviousSession {
> + display: block;
> +}
>
> and move it after:
>
>
> body[narrow] #restorePreviousSession {
> font-size: 80%;
> }
Moved
> > I don't think this patch does enough. It does move the CSS around in a way
> > that looks like it will work, but
> > http://mxr.mozilla.org/mozilla-central/source/browser/base/content/abouthome/
> > aboutHome.xhtml#57 shows that the |session| attribute is on the element by
> > default.
> >
> > Based on Blair's feedback, this attribute should only be placed on the
> > element if it has been confirmed that session restore is available.
>
> Oh right. Good catch. Raymond, please change the JS, so that behaves as
> Jared explained.
>
> > Please update
> > http://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser.
> > js#2497 and
> > http://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser.
> > js#2716 to reflect this reversal.
> >
> > Also, I'm not sure why there are two places in our codebase that remove this
> > attribute. Frank, do you know why?
>
> Yes. The first instance removes the session attribute when it is discovered
> session restore is not available. The second instance removes the session
> attribute when the session restore button is clicked.
Removed the |session| attribute on the element and changed the first instance to set the session attribute when session restore is available.
Attachment #664784 -
Flags: review?(jaws)
| Assignee | ||
Updated•13 years ago
|
Attachment #664386 -
Attachment is obsolete: true
Updated•13 years ago
|
Attachment #664784 -
Flags: review?(jaws) → review+
Updated•13 years ago
|
Keywords: checkin-needed
Comment 9•13 years ago
|
||
Comment on attachment 664784 [details] [diff] [review]
v2
>-.launchButton[hidden],
>-#launcher:not([session]) > #restorePreviousSessionSeparator,
>-#launcher:not([session]) > #restorePreviousSession {
>+.launchButton[hidden] {
> display: none;
> }
> #restorePreviousSessionSeparator {
>+ display: none;
> }
> #restorePreviousSession {
>+ display: none;
> }
>+#launcher[session] > #restorePreviousSessionSeparator,
>+#launcher[session] > #restorePreviousSession {
>+ display: block;
>+}
What's the purpose of shuffling the code around like this? It shouldn't behave any different from the original code.
Attachment #664784 -
Flags: feedback-
Updated•13 years ago
|
Keywords: checkin-needed
Comment 10•13 years ago
|
||
In other words, the aboutHome.xhtml and browser.js changes should be enough to fix this bug.
| Assignee | ||
Comment 11•13 years ago
|
||
Just updated aboutHome.xhtml and browser.js
Attachment #664784 -
Attachment is obsolete: true
Attachment #665047 -
Flags: review?(jaws)
| Assignee | ||
Updated•13 years ago
|
Attachment #665047 -
Attachment is patch: true
Comment 12•13 years ago
|
||
Comment on attachment 665047 [details] [diff] [review]
v3
Review of attachment 665047 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks for the feedback Dao and the quick turn-around Raymond.
Attachment #665047 -
Flags: review?(jaws) → review+
Updated•13 years ago
|
Keywords: checkin-needed
Comment 13•13 years ago
|
||
Flags: in-testsuite-
Keywords: checkin-needed
Comment 14•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 18
You need to log in
before you can comment on or make changes to this bug.
Description
•