Closed
Bug 806937
Opened 12 years ago
Closed 12 years ago
PBM - Change UI theme for private tabs
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(firefox19 fixed, firefox20 verified)
VERIFIED
FIXED
Firefox 20
People
(Reporter: ibarlow, Assigned: sriram)
References
Details
Attachments
(10 files)
(deleted),
image/png
|
Details | |
(deleted),
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
(deleted),
image/png
|
Details | |
(deleted),
patch
|
mfinkle
:
review+
bajaj
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
Users should have a clear sense of when they are browsing in a Private tab vs when they are browsing in a normal one. We should change the colour of the UI to reflect this.
Touchpoints:
* Title bar
* Awesomescreen
* Menu?
* Context menus / doorhangers?
In addition, if a user has a Persona theme installed, it should be disabled here to help communicate that they are in Private browsing mode
A mockup is attached of a darkened title bar and awesomescreen. *This is not the final visual design*, but we should start thinking about how to implement this while we finalize the look.
I think(?) we're keeping a purple indicator of some sort for Per Window PB on desktop, perhaps that would make sense in this situation.
Also, perhaps the orange highlight around the selected address bar could be purple (this fitting with the theme of replacing orange with purple, a la desktop).
Just some thoughts.
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → sriram
Assignee | ||
Comment 2•12 years ago
|
||
To support a new state, we have to create a custom view. Since we want it to be generic, and basic extensions of Android views, this patch adds a "common piece of code" as a "GeckoView.java.frag", which is converted into required custom views during compile time. (The classes are specified in the Makefile).
Also, to shorten the view names, a new approach of using "Gecko.CustomView" is used in XML, instead of the lengthy "org.mozilla.gecko.CustomView". This is currently added only for the views added by the above mentioned GeckoView.java.frag. This will be extended to other custom views in the nearest future. Since Gecko.CustomView cannot be translated to a class, it has to be specified in GeckoViewsFactory.java for the Android to know.
A new attribute is added in attrs.xml, which will be used in subsequent patches to specify the private browsing state.
GeckoView.java.frag:
A state variable is stored to know if the view is in private mode or not. When (and only when) the value changes, the value is updated, and the Android is informed to refresh the drawing state. This will inturn create a new drawing state based on the StateListDrawable that the view supports (specified through XML in later patches).
Attachment #682325 -
Flags: review?(mark.finkle)
Assignee | ||
Comment 3•12 years ago
|
||
This patch adds the private browsing mode to BrowserToolbar. A new state is added to both XML, and onLightweightThemeChanged(). This will take care of private browsing mode being black even when "personas" are enabled.
Attachment #682329 -
Flags: review?(mark.finkle)
Assignee | ||
Comment 4•12 years ago
|
||
This adds the private browsing mode support for AwesomeBar.
Attachment #682330 -
Flags: review?(mark.finkle)
Assignee | ||
Comment 5•12 years ago
|
||
This adds the support for TabsButton. All new arrows, text colors, background textures.
Attachment #682367 -
Flags: review?(mark.finkle)
Assignee | ||
Comment 6•12 years ago
|
||
This adds the support for menu button. New purple menu button for phones and tablets.
Attachment #682369 -
Flags: review?(mark.finkle)
Assignee | ||
Comment 7•12 years ago
|
||
Private tabs support for awesomescreen.
Attachment #682375 -
Flags: review?(mark.finkle)
Assignee | ||
Comment 8•12 years ago
|
||
Background for AwesomeBar tabs. The target given to awesomebar is used by the tabs to know the state of the tab (new or current).
Attachment #682376 -
Flags: review?(mark.finkle)
Comment 9•12 years ago
|
||
Comment on attachment 682325 [details] [diff] [review]
Part 1: Shadowed android views
>diff --git a/mobile/android/base/GeckoView.java.frag b/mobile/android/base/GeckoView.java.frag
>+public class Gecko@APPVIEW@ extends @APPVIEW@ {
APPVIEW -> VIEW
>+ private static final int[] STATE_PRIVATE_MODE = { R.attr.state_private_mode };
state_private_mode -> state_private (to match the Android state_* attributes)
>diff --git a/mobile/android/base/Makefile.in b/mobile/android/base/Makefile.in
>+# Replace @APPVIEW@ with different View names.
>+$(FENNEC_PP_JAVA_VIEW_FILES): GeckoView.java.frag
>+ @rm -f $@
>+ cat $< | sed s,@APPVIEW@,$(patsubst Gecko%.java,%,$@),g >> $@ ; \
APPVIEW -> VIEW
>diff --git a/mobile/android/base/resources/values/attrs.xml b/mobile/android/base/resources/values/attrs.xml
>+ <declare-styleable name="PrivateBrowsing">
>+ <attr name="state_private_mode" format="boolean"/>
state_private_mode -> state_private (to match the Android state_* attributes)
r+ with those nits fixed
Attachment #682325 -
Flags: review?(mark.finkle) → review+
Updated•12 years ago
|
Attachment #682329 -
Flags: review?(mark.finkle) → review+
Updated•12 years ago
|
Attachment #682330 -
Flags: review?(mark.finkle) → review+
Updated•12 years ago
|
Attachment #682367 -
Flags: review?(mark.finkle) → review+
Updated•12 years ago
|
Attachment #682369 -
Flags: review?(mark.finkle) → review+
Comment 10•12 years ago
|
||
Comment on attachment 682375 [details] [diff] [review]
Part 6: AwesomeScreen
>diff --git a/mobile/android/base/CustomEditText.java b/mobile/android/base/CustomEditText.java
>+ public void setPrivateMode(boolean isPrivate) {
>+ // android:textColorHighlight cannot support a ColorStateList.
>+ setHighlightColor(isPrivate ? 0xFFD06BFF : 0xFFFF9500);
We might want to use CONSTs or colors.xml values for this, instead of hard coding them.
(True for any other hardoced colors I missed too)
r+ with nits fixed
Attachment #682375 -
Flags: review?(mark.finkle) → review+
Updated•12 years ago
|
Attachment #682376 -
Flags: review?(mark.finkle) → review+
Assignee | ||
Comment 11•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/cdf30a34dec9
https://hg.mozilla.org/integration/mozilla-inbound/rev/d5f4626f5b73
https://hg.mozilla.org/integration/mozilla-inbound/rev/e0a0a5b98b95
https://hg.mozilla.org/integration/mozilla-inbound/rev/944db176184e
https://hg.mozilla.org/integration/mozilla-inbound/rev/984a10bc4125
https://hg.mozilla.org/integration/mozilla-inbound/rev/585a7f8fc448
https://hg.mozilla.org/integration/mozilla-inbound/rev/abfc930bc7cd
(This definitely needs clobbering)
Comment 12•12 years ago
|
||
What were the color gradients used here? Maybe we can hijack them for the desktop as well? :-)
Assignee | ||
Comment 13•12 years ago
|
||
Orange is #FF9500 and Purple is #D06BFF
Comment 14•12 years ago
|
||
Hrm, I was mostly asking about the black gradients in https://bugzilla.mozilla.org/attachment.cgi?id=676594. (I haven't actually seen a real build with these changes yet!)
Assignee | ||
Comment 15•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/bf8f4b151716 <-- this was missing.
Assignee | ||
Comment 16•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/cd7c2afe0cb8 <-- sorry about that.
Comment 17•12 years ago
|
||
Assignee | ||
Comment 18•12 years ago
|
||
Pushed with proper null checks in AwesomeBar and AwesomeBarTabs:
https://hg.mozilla.org/integration/mozilla-inbound/rev/61680b40ff9d
https://hg.mozilla.org/integration/mozilla-inbound/rev/7aca474f43cb
https://hg.mozilla.org/integration/mozilla-inbound/rev/ed08b110d4cc
https://hg.mozilla.org/integration/mozilla-inbound/rev/30ae7de73333
https://hg.mozilla.org/integration/mozilla-inbound/rev/dd259d461971
https://hg.mozilla.org/integration/mozilla-inbound/rev/ff583cde143c
https://hg.mozilla.org/integration/mozilla-inbound/rev/90213ba41937
All green:
https://tbpl.mozilla.org/?tree=Try&rev=74d39b8a30af
Comment 19•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/61680b40ff9d
https://hg.mozilla.org/mozilla-central/rev/7aca474f43cb
https://hg.mozilla.org/mozilla-central/rev/ed08b110d4cc
https://hg.mozilla.org/mozilla-central/rev/30ae7de73333
https://hg.mozilla.org/mozilla-central/rev/dd259d461971
https://hg.mozilla.org/mozilla-central/rev/ff583cde143c
https://hg.mozilla.org/mozilla-central/rev/90213ba41937
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 20
Comment 20•12 years ago
|
||
The toolbar buttons in tablet UI (i.e. small tablet, Nexus 7) are not themed. Is there a bug for that?
Comment 21•12 years ago
|
||
Comment 22•12 years ago
|
||
(In reply to Thomas Stache from comment #20)
> The toolbar buttons in tablet UI (i.e. small tablet, Nexus 7) are not
> themed. Is there a bug for that?
That is bug 817138
Comment 23•12 years ago
|
||
The new PBM theme has landed on the latest Nightly build. Closing bug as verified fixed on:
Firefox 20.0a1 (2012-12-03)
Device: Galaxy S2
OS: Android 4.0.3
Status: RESOLVED → VERIFIED
status-firefox20:
--- → verified
Assignee | ||
Comment 24•12 years ago
|
||
A bare bones file to support light/dark themes in subsequent patches (that are aurora approved already). This doesn't have any trace of private browsing.
Attachment #696798 -
Flags: review?(mark.finkle)
Assignee | ||
Comment 25•12 years ago
|
||
Comment on attachment 696798 [details] [diff] [review]
Patch: For Aurora
[Approval Request Comment]
Bug caused by (feature/regressing bug #): New feature.
User impact if declined: This patch is needed by other persona related patched dealing with light/dark themes.
Testing completed (on m-c, etc.): Landed in m-c long long ago.
Risk to taking this patch (and alternatives if risky): Very low.
String or UUID changes made by this patch: None.
This is a bare-bones patch. Bits-n-bytes related to light/dark theme will be added later to this file.
Attachment #696798 -
Flags: approval-mozilla-aurora?
Comment 26•12 years ago
|
||
Comment on attachment 696798 [details] [diff] [review]
Patch: For Aurora
Is this the right patch?
Assignee | ||
Comment 27•12 years ago
|
||
Yes it is. GeckoView.java.frag is empty -- without private browsing.
Updated•12 years ago
|
Attachment #696798 -
Flags: review?(mark.finkle) → review+
Comment 28•12 years ago
|
||
Comment on attachment 696798 [details] [diff] [review]
Patch: For Aurora
Low risk , well tested ,( ~ a month) patch needed for persona's (targeting FF19). Approving on aurora.
Attachment #696798 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Assignee | ||
Comment 29•12 years ago
|
||
That one little patch for Aurora: https://hg.mozilla.org/releases/mozilla-aurora/rev/174fdb04facf
Updated•12 years ago
|
status-firefox19:
--- → fixed
Updated•12 years ago
|
Updated•4 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
•