Closed Bug 918007 Opened 11 years ago Closed 11 years ago

Disable toolbar elements (menu, back, forward, tabs) while in editing mode on tablets

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(firefox26 verified, firefox27 verified, firefox28 verified, b2g-v1.2 fixed, fennec26+)

VERIFIED FIXED
Firefox 28
Tracking Status
firefox26 --- verified
firefox27 --- verified
firefox28 --- verified
b2g-v1.2 --- fixed
fennec 26+ ---

People

(Reporter: lucasr, Assigned: lucasr)

References

Details

Attachments

(3 files)

Not an issue on the phone UI as it's possible to do that.
tracking-fennec: --- → ?
tracking-fennec: ? → 26+
Assignee: nobody → lucasr.at.mozilla
Ian, any thoughts on how this should behave?
Flags: needinfo?(ibarlow)
I have a couple of options on how we could approach this. http://cl.ly/image/3y0R2c1z2F0N 1. We disable the forward and back buttons when we focus the URL bar. To exit out of edit mode, the user can either use the Android back button or scroll page content 2. The back and forward buttons take on the same characteristics of the Android Back button for this state: they hide the keyboard and unfocus the URL bar. After this, the next time the user taps either back or forward it returns to whatever the previous page was.
Flags: needinfo?(ibarlow)
Hm, looking at bug 917776 makes me lean more toward option 1: disabling other title bar elements when the URL bar is focused, and re-enabling them when it is unfocused.
Summary: Tapping on back/forward buttons should dismiss editing mode on tablets → Disable toolbar elements (menu, back, forward) while in editing mode on tablets
Summary: Disable toolbar elements (menu, back, forward) while in editing mode on tablets → Disable toolbar elements (menu, back, forward, tabs) while in editing mode on tablets
Status: NEW → ASSIGNED
Blocks: 928589
Blocks: 928592
Is this still targeting 26 on Aurora? We don't have our tracking flags set, so we're assuming not.
tracking-fennec: 26+ → ?
I really want this fixed before going to beta. It is a major usability issue.
Attachment #820393 - Flags: review?(wjohnston)
Attachment #820394 - Flags: review?(wjohnston)
Attachment #820393 - Flags: review?(wjohnston) → review?(sriram)
Attachment #820394 - Flags: review?(wjohnston) → review?(sriram)
Comment on attachment 820393 [details] [diff] [review] Factor out method to enable/disable buttons (r=wesj) Review of attachment 820393 [details] [diff] [review]: ----------------------------------------------------------------- r+ with that. ::: mobile/android/base/BrowserToolbar.java @@ +1566,5 @@ > > + public void setButtonEnabled(ImageButton button, boolean enabled) { > + final Drawable drawable = button.getDrawable(); > + if (drawable != null) { > + final int alpha = (int) (255 * (enabled ? 1.0f : 0.24f)); I don't like this conversion to float, and back to int. I see this value is used in second patch. But I guess, we can use a comment here and make it simple. drawable.setAlpha(enabled ? 255 : 77);
Attachment #820393 - Flags: review?(sriram) → review+
Comment on attachment 820394 [details] [diff] [review] Disable toolbar elements while in editing mode on tablets (r=wesj) Review of attachment 820394 [details] [diff] [review]: ----------------------------------------------------------------- r+ with suggested changes. ::: mobile/android/base/BrowserToolbar.java @@ +1298,5 @@ > + > + final int actionItemsCount = mActionItemBar.getChildCount(); > + for (int i = 0; i < actionItemsCount; i++) { > + final View actionItem = mActionItemBar.getChildAt(i); > + This new line is not needed. And thinking again, both the statements could be made into one. It would still be easier to understand. mActionItemBar.getChildAt(i).setEnabled(enabled); @@ +1304,5 @@ > + } > + ViewHelper.setAlpha(mActionItemBar, alpha); > + > + final Tab tab = Tabs.getInstance().getSelectedTab(); > + Could you please enclose the following statements inside "tab != null" check. That way, we don't need a two new variables. if (tab != null) { setButtonEnabled(mBack, enabled && tab.canDoBack()); ... }
Attachment #820394 - Flags: review?(sriram) → review+
(In reply to Sriram Ramasubramanian [:sriram] from comment #9) > Comment on attachment 820393 [details] [diff] [review] > Factor out method to enable/disable buttons (r=wesj) > > Review of attachment 820393 [details] [diff] [review]: > ----------------------------------------------------------------- > > r+ with that. > > ::: mobile/android/base/BrowserToolbar.java > @@ +1566,5 @@ > > > > + public void setButtonEnabled(ImageButton button, boolean enabled) { > > + final Drawable drawable = button.getDrawable(); > > + if (drawable != null) { > > + final int alpha = (int) (255 * (enabled ? 1.0f : 0.24f)); > > I don't like this conversion to float, and back to int. > I see this value is used in second patch. But I guess, we can use a comment > here and make it simple. > > drawable.setAlpha(enabled ? 255 : 77); Fair enough. Done.
(In reply to Sriram Ramasubramanian [:sriram] from comment #10) > Comment on attachment 820394 [details] [diff] [review] > Disable toolbar elements while in editing mode on tablets (r=wesj) > > Review of attachment 820394 [details] [diff] [review]: > ----------------------------------------------------------------- > > r+ with suggested changes. > > ::: mobile/android/base/BrowserToolbar.java > @@ +1298,5 @@ > > + > > + final int actionItemsCount = mActionItemBar.getChildCount(); > > + for (int i = 0; i < actionItemsCount; i++) { > > + final View actionItem = mActionItemBar.getChildAt(i); > > + > > This new line is not needed. > And thinking again, both the statements could be made into one. It would > still be easier to understand. > > mActionItemBar.getChildAt(i).setEnabled(enabled); Ok, done. > @@ +1304,5 @@ > > + } > > + ViewHelper.setAlpha(mActionItemBar, alpha); > > + > > + final Tab tab = Tabs.getInstance().getSelectedTab(); > > + > > Could you please enclose the following statements inside "tab != null" check. > That way, we don't need a two new variables. > > if (tab != null) { > setButtonEnabled(mBack, enabled && tab.canDoBack()); > ... > } This will change the semantics a bit but won't be a problem in this case. Done.
Comment on attachment 820393 [details] [diff] [review] Factor out method to enable/disable buttons (r=wesj) [Approval Request Comment] Bug caused by (feature/regressing bug #): bug 862793 (new about:home) User impact if declined: All types of problems such as bug 928589 and bug 928592 Testing completed (on m-c, etc.): Landing in m-c now. Let's bake it for 1-2 days in Nightly and then uplift it. Risk to taking this patch (and alternatives if risky): It's not a minor fix. But it's critical enough that we have to uplift to Fx26. String or IDL/UUID changes made by this patch: n/a
Attachment #820393 - Flags: approval-mozilla-aurora?
Comment on attachment 820394 [details] [diff] [review] Disable toolbar elements while in editing mode on tablets (r=wesj) [Approval Request Comment] Bug caused by (feature/regressing bug #): bug 862793 (new about:home) User impact if declined: All types of problems such as bug 928589 and bug 928592 Testing completed (on m-c, etc.): Landing in m-c now. Let's bake it for 1-2 days in Nightly and then uplift it. Risk to taking this patch (and alternatives if risky): It's not a minor fix. But it's critical enough that we have to uplift to Fx26. String or IDL/UUID changes made by this patch: n/a
Attachment #820394 - Flags: approval-mozilla-aurora?
tracking-fennec: ? → 26+
Comment on attachment 824695 [details] [diff] [review] Use clearEditText() and enterText() to input URLs (r=gbrown) This patch changes BaseTest to enter URLs without relying on input injection. Fixes the weird test failures with the patches for this bug (and potentially a few other intermittent failures).
Attachment #824695 - Flags: review?(gbrown)
Comment on attachment 824695 [details] [diff] [review] Use clearEditText() and enterText() to input URLs (r=gbrown) Review of attachment 824695 [details] [diff] [review]: ----------------------------------------------------------------- It would be nice to understand those failures. The sendKeys() approach worked reliably for a long time. But I don't think we gain anything by using sendKeys() for all tests, and I note that it is still used in some tests (testInputUrlBar, testSearchSuggestions, etc), so I think this change is fine.
Attachment #824695 - Flags: review?(gbrown) → review+
Comment on attachment 820393 [details] [diff] [review] Factor out method to enable/disable buttons (r=wesj) [Approval Request Comment] Bug caused by (feature/regressing bug #): bug 862793 (new about:home) User impact if declined: All types of problems such as bug 928589 and bug 928592 Testing completed (on m-c, etc.): Landing in m-c now. Let's bake it for 1-2 days in Nightly and then uplift it. Risk to taking this patch (and alternatives if risky): It's not a minor fix. But it's critical enough that we have to uplift to Fx26. String or IDL/UUID changes made by this patch: n/a
Attachment #820393 - Flags: approval-mozilla-beta?
Comment on attachment 820394 [details] [diff] [review] Disable toolbar elements while in editing mode on tablets (r=wesj) [Approval Request Comment] Bug caused by (feature/regressing bug #): bug 862793 (new about:home) User impact if declined: All types of problems such as bug 928589 and bug 928592 Testing completed (on m-c, etc.): Landing in m-c now. Let's bake it for 1-2 days in Nightly and then uplift it. Risk to taking this patch (and alternatives if risky): It's not a minor fix. But it's critical enough that we have to uplift to Fx26. String or IDL/UUID changes made by this patch: n/a
Attachment #820394 - Flags: approval-mozilla-beta?
Keywords: verifyme
Attachment #820393 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Attachment #820394 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Attachment #820394 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #820393 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Verified as fixed on Samsung Galaxy Tab (Android 4.0.4), on Nightly 28.0a1 (2013-11-03).
Keywords: verifyme
Verified as fixed on Samsung Galaxy Tab (Android 4.0.4) - on Aurora 27.0a2 (2013-11-04) - on Firefox 26 Beta 2
Status: RESOLVED → VERIFIED
Depends on: 934900
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: