Closed
Bug 944533
Opened 12 years ago
Closed 12 years ago
Re-implement toolbar's display UI state management
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 29
People
(Reporter: lucasr, Assigned: lucasr)
References
Details
Attachments
(7 files, 3 obsolete files)
|
1001 bytes,
patch
|
Margaret
:
review+
|
Details | Diff | Splinter Review |
|
4.29 KB,
patch
|
Margaret
:
review+
|
Details | Diff | Splinter Review |
|
4.00 KB,
patch
|
Margaret
:
review+
|
Details | Diff | Splinter Review |
|
24.00 KB,
patch
|
Margaret
:
review+
mfinkle
:
review+
|
Details | Diff | Splinter Review |
|
1.11 KB,
patch
|
Margaret
:
review+
|
Details | Diff | Splinter Review |
|
22.16 KB,
patch
|
Margaret
:
review+
|
Details | Diff | Splinter Review |
|
12.00 KB,
patch
|
Margaret
:
review+
mfinkle
:
feedback+
|
Details | Diff | Splinter Review |
Current internal API to update the state of the toolbar display UI (throbber, favicon, title, stop, page actions) is confusing. Ideally, we should have a single entry point to update the state of the toolbar based on the selected tab instead of scattering this code into multiple unrelated methods.
| Assignee | ||
Comment 1•12 years ago
|
||
| Assignee | ||
Comment 2•12 years ago
|
||
| Assignee | ||
Comment 3•12 years ago
|
||
| Assignee | ||
Comment 4•12 years ago
|
||
| Assignee | ||
Comment 5•12 years ago
|
||
| Assignee | ||
Comment 6•12 years ago
|
||
| Assignee | ||
Comment 7•12 years ago
|
||
| Assignee | ||
Comment 8•12 years ago
|
||
Comment on attachment 8341625 [details] [diff] [review]
No need to set progress visibility explicitly in BrowserApp (r=margaret)
The new Tab's state will do that for us anyway as it will be immediately selected on the Java side.
Attachment #8341625 -
Flags: review?(margaret.leibovic)
| Assignee | ||
Comment 9•12 years ago
|
||
Comment on attachment 8341626 [details] [diff] [review]
Make unnecessary public API in BrowserToolbar private (r=margaret)
Seal BrowserToolbar a bit more before redoing its guts.
Attachment #8341626 -
Flags: review?(margaret.leibovic)
| Assignee | ||
Comment 10•12 years ago
|
||
Comment on attachment 8341627 [details] [diff] [review]
Inflate SiteIdentityPopup on show() and add identity setter (r=margaret)
Change the SiteIdentityPopup API a bit. The core intent here is change SiteIdentityPopup to hold its necessary data. This looks cleaner now that site identity/security mode is encapsulated behind a proper API (bug 945212).
Attachment #8341627 -
Flags: review?(margaret.leibovic)
| Assignee | ||
Comment 11•12 years ago
|
||
Comment on attachment 8341628 [details] [diff] [review]
Re-define internal API to update toolbar UI state (r=mfinkle)
Here's the what the new internal API does:
- Creates a single entry point to update ToolbarDisplayLayout's state from a tab instance i.e. the updateFromTab().
- The point here is to make ToolbarDisplayLayout as dummo/stateless/functional as possible. We only hold enough state to be able to short-circuit/optimize certain code paths e.g. avoid UI unnecessary changes.
- Reduce the amount of dependencies in ToolbarDisplayLayout as much as possible. For instance, it doesn't depend on things like the Tabs API at all. It only acts on the given Tab instance in updateFromTab().
The title handling is refactored in separate patches because it requires some extra steps (see following patches).
Attachment #8341628 -
Flags: review?(mark.finkle)
Attachment #8341628 -
Flags: review?(margaret.leibovic)
| Assignee | ||
Updated•12 years ago
|
Attachment #8341629 -
Flags: review?(margaret.leibovic)
| Assignee | ||
Comment 12•12 years ago
|
||
| Assignee | ||
Comment 13•12 years ago
|
||
| Assignee | ||
Updated•12 years ago
|
Attachment #8341630 -
Attachment is obsolete: true
| Assignee | ||
Updated•12 years ago
|
Attachment #8341631 -
Attachment is obsolete: true
| Assignee | ||
Updated•12 years ago
|
Attachment #8341653 -
Flags: review?(margaret.leibovic)
| Assignee | ||
Comment 14•12 years ago
|
||
Comment on attachment 8341654 [details] [diff] [review]
Move title handling to ToolbarDisplayLayout (r=margaret)
Now ToolbarDisplayLayout manages all its state behind a single API, updateFromTab().
Attachment #8341654 -
Flags: review?(margaret.leibovic)
Updated•12 years ago
|
Attachment #8341625 -
Flags: review?(margaret.leibovic) → review+
Updated•12 years ago
|
Attachment #8341626 -
Flags: review?(margaret.leibovic) → review+
Updated•12 years ago
|
Attachment #8341627 -
Flags: review?(margaret.leibovic) → review+
Updated•12 years ago
|
Attachment #8341629 -
Flags: review?(margaret.leibovic) → review+
Comment 15•12 years ago
|
||
Comment on attachment 8341653 [details] [diff] [review]
Factor out title display prefs into separate class (r=margaret)
Review of attachment 8341653 [details] [diff] [review]:
-----------------------------------------------------------------
Oops, looks like you forgot to hg add ToolbarTitlePrefs :)
Attachment #8341653 -
Flags: review?(margaret.leibovic)
Comment 16•12 years ago
|
||
Comment on attachment 8341653 [details] [diff] [review]
Factor out title display prefs into separate class (r=margaret)
Missing ToolbarTitlePrefs.java
If you are migrating the title handling to ToolbarDisplayLayout, maybe the prefs could just live there instead of a separate class?
Comment 17•12 years ago
|
||
Comment on attachment 8341628 [details] [diff] [review]
Re-define internal API to update toolbar UI state (r=mfinkle)
This looks OK to me. I took a quick look at all the other patches to get more context. I like the way the code is organizing. I like the way we could optimize some of the toolbar UI operations too.
Question: Is this low-risk enough to take on mozilla-central so close to a merge?
Attachment #8341628 -
Flags: review?(mark.finkle) → review+
Comment 18•12 years ago
|
||
I love it!
I think this is moving in the direction of Bug 946330, so blocking that.
Blocks: 946330
| Assignee | ||
Comment 19•12 years ago
|
||
| Assignee | ||
Comment 20•12 years ago
|
||
Comment on attachment 8342515 [details] [diff] [review]
Factor out title display prefs into separate class (r=margaret)
Now with all the files :-)
Attachment #8342515 -
Flags: review?(mark.finkle)
Attachment #8342515 -
Flags: review?(margaret.leibovic)
| Assignee | ||
Updated•12 years ago
|
Attachment #8341653 -
Attachment is obsolete: true
| Assignee | ||
Comment 21•12 years ago
|
||
(In reply to Mark Finkle (:mfinkle) from comment #17)
> Question: Is this low-risk enough to take on mozilla-central so close to a
> merge?
This is actually risky enough that we should avoid landing it just before the merge. Besides, these patches provide no user visible benefit. So, no need to hurry.
Updated•12 years ago
|
Attachment #8342515 -
Flags: review?(mark.finkle) → feedback+
Comment 22•12 years ago
|
||
Comment on attachment 8341628 [details] [diff] [review]
Re-define internal API to update toolbar UI state (r=mfinkle)
Review of attachment 8341628 [details] [diff] [review]:
-----------------------------------------------------------------
It's hard to review patches that are based on code that hasn't landed yet, but this seems reasonable to me. Also, landing this early in the cycle makes me feel better about having time to shake out regressions.
Attachment #8341628 -
Flags: review?(margaret.leibovic) → review+
Comment 23•12 years ago
|
||
Comment on attachment 8342515 [details] [diff] [review]
Factor out title display prefs into separate class (r=margaret)
Review of attachment 8342515 [details] [diff] [review]:
-----------------------------------------------------------------
Nice reorganization.
Attachment #8342515 -
Flags: review?(margaret.leibovic) → review+
Comment 24•12 years ago
|
||
Comment on attachment 8341654 [details] [diff] [review]
Move title handling to ToolbarDisplayLayout (r=margaret)
Review of attachment 8341654 [details] [diff] [review]:
-----------------------------------------------------------------
::: mobile/android/base/toolbar/BrowserToolbar.java
@@ +272,5 @@
> + } else {
> + contentDescription = mActivity.getString(R.string.url_bar_default_text);
> + }
> +
> + setContentDescription(contentDescription);
You should add a comment about why we need to set the content description here, rather than where we actually update the title (this was a question I had when I first looked at this).
::: mobile/android/base/toolbar/ToolbarDisplayLayout.java
@@ +50,5 @@
> implements Animation.AnimationListener {
>
> private static final String LOGTAG = "GeckoToolbarDisplayLayout";
>
> enum UpdateFlags {
As a follow-up (mentor bug?), it would be nice to add some docs here to explain what these flags mean in practice.
Attachment #8341654 -
Flags: review?(margaret.leibovic) → review+
| Assignee | ||
Comment 25•12 years ago
|
||
FYI: Just waiting for a final review from wesj in bug 942862 to land this. All green on try: https://tbpl.mozilla.org/?tree=Try&rev=3a33a65bf136
| Assignee | ||
Comment 26•12 years ago
|
||
(In reply to :Margaret Leibovic from comment #24)
> Comment on attachment 8341654 [details] [diff] [review]
> Move title handling to ToolbarDisplayLayout (r=margaret)
>
> Review of attachment 8341654 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: mobile/android/base/toolbar/BrowserToolbar.java
> @@ +272,5 @@
> > + } else {
> > + contentDescription = mActivity.getString(R.string.url_bar_default_text);
> > + }
> > +
> > + setContentDescription(contentDescription);
>
> You should add a comment about why we need to set the content description
> here, rather than where we actually update the title (this was a question I
> had when I first looked at this).
Done.
> ::: mobile/android/base/toolbar/ToolbarDisplayLayout.java
> @@ +50,5 @@
> > implements Animation.AnimationListener {
> >
> > private static final String LOGTAG = "GeckoToolbarDisplayLayout";
> >
> > enum UpdateFlags {
>
> As a follow-up (mentor bug?), it would be nice to add some docs here to
> explain what these flags mean in practice.
Working on javadocs for the toolbar high-level architecture. Filed bug 957992 to track this.
| Assignee | ||
Comment 27•12 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/874bcd13b8b4
https://hg.mozilla.org/integration/fx-team/rev/95c0731132ae
https://hg.mozilla.org/integration/fx-team/rev/1a32a3b9dd20
https://hg.mozilla.org/integration/fx-team/rev/fa0a7a730324
https://hg.mozilla.org/integration/fx-team/rev/cd18587bd2b5
https://hg.mozilla.org/integration/fx-team/rev/1260d241f84f
https://hg.mozilla.org/integration/fx-team/rev/125b24bb78d9
Comment 28•12 years ago
|
||
hi,
had to backout this change as part of https://tbpl.mozilla.org/?tree=Fx-Team&rev=e89b407be9c5 because of build bustages on android and windows like https://tbpl.mozilla.org/php/getParsedLog.php?id=32753197&tree=Fx-Team
| Assignee | ||
Comment 29•12 years ago
|
||
These patches require a clobber build. Touched the CLOBBER file and re-landed:
https://hg.mozilla.org/integration/fx-team/rev/f8a1445c80d5
https://hg.mozilla.org/integration/fx-team/rev/53c8b206ca96
https://hg.mozilla.org/integration/fx-team/rev/23c6d01caed1
https://hg.mozilla.org/integration/fx-team/rev/6113af5c0724
https://hg.mozilla.org/integration/fx-team/rev/1586c7943fbd
https://hg.mozilla.org/integration/fx-team/rev/c7f22c46812d
https://hg.mozilla.org/integration/fx-team/rev/06bc8e68d4fc
https://hg.mozilla.org/mozilla-central/rev/f8a1445c80d5
https://hg.mozilla.org/mozilla-central/rev/53c8b206ca96
https://hg.mozilla.org/mozilla-central/rev/23c6d01caed1
https://hg.mozilla.org/mozilla-central/rev/6113af5c0724
https://hg.mozilla.org/mozilla-central/rev/1586c7943fbd
https://hg.mozilla.org/mozilla-central/rev/c7f22c46812d
https://hg.mozilla.org/mozilla-central/rev/06bc8e68d4fc
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 29
Updated•5 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•