Closed Bug 1044423 Opened 10 years ago Closed 10 years ago

Add more logics to AppChrome.js

Categories

(Firefox OS Graveyard :: Gaia::System::Browser Chrome, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: vingtetun, Assigned: vingtetun)

References

Details

Attachments

(1 file, 4 obsolete files)

Attached patch chrome-love.patch (obsolete) (deleted) — Splinter Review
This align better with the UX spec, while providing more features to the chrome UI. The patch still need more tests and some clean up thought.
Summary: More browser chrome love → Add more logics to AppChrome.js
Attached patch chromebar-additional.patch (obsolete) (deleted) — Splinter Review
I need to add some tests for all the new features. But in the meantime I believe that the non-tests part can be reviewed.
Attachment #8462977 - Attachment is obsolete: true
Attachment #8463109 - Flags: review?(etienne)
Attached patch chromebar-additional.patch (obsolete) (deleted) — Splinter Review
Same patch + tests.
Attachment #8463109 - Attachment is obsolete: true
Attachment #8463109 - Flags: review?(etienne)
Attachment #8463121 - Flags: review?(etienne)
Attached patch chromebar-additional.patch (obsolete) (deleted) — Splinter Review
Oups. I made a git commit mistake in the previous patch. Sorry for the noise.
Attachment #8463121 - Attachment is obsolete: true
Attachment #8463121 - Flags: review?(etienne)
Attachment #8463123 - Flags: review?(etienne)
Attached patch chromebar-additional.patch (deleted) — Splinter Review
I fixed some of the config flags in order to make them more explicit.
Attachment #8463123 - Attachment is obsolete: true
Attachment #8463123 - Flags: review?(etienne)
Attachment #8463125 - Flags: review?(etienne)
Comment on attachment 8463125 [details] [diff] [review] chromebar-additional.patch Review of attachment 8463125 [details] [diff] [review]: ----------------------------------------------------------------- r=me with those comments addressed (mainly test-related) ::: apps/system/js/app_chrome.js @@ +447,5 @@ > > + AppChrome.prototype.useCombinedChrome = function ac_useCombinedChrome(evt) { > + return this.app.config.chrome && > + this.app.config.chrome.navigation && > + this.app.config.chrome.bar; are we actually using the combined chrome? Looks like we could remove a bunch of code (keyboard handling/hiding closing) by getting rid of the navigation at the bottom of the screen. Let's track it in a follow up! ::: apps/system/js/home_searchbar.js @@ +134,5 @@ > // XXX: fix the WindowManager coupling > // but currently the transition sequence is crucial for performance > var app = AppWindowManager.getActiveApp(); > + if (app && !app.manifestURL) { > + this.setInput(app.config.url); can you add a small test for this case? ::: apps/system/js/rocketbar.js @@ +520,5 @@ > + * @memberof Rocketbar.prototype > + */ > + selectAll: function() { > + this.input.select(); > + }, can you add a tiny test for this, it will make the homesearchbar/rocketbar merge easier. ::: apps/system/style/chrome/chrome.css @@ +49,5 @@ > +} > + > +.controls .back-button:not([data-disabled]) + .forward-button:not([data-disabled]) + .urlbar { > + width: calc(100% - 9rem); > +} :) @@ +120,5 @@ > +} > + > + > +/* Progress */ > +.appWindow.navigation .progress { I think we need to specify .scrollable here. In an app with bottom navigation it's weird to have the loading in the middle of the app display. ::: apps/system/test/unit/app_chrome_test.js @@ +311,5 @@ > + var app = new AppWindow(fakeAppConfigBoth); > + var chrome = new AppChrome(app); > + chrome.handleEvent({ type: 'mozbrowserloadstart' }); > + assert.isTrue(chrome.containerElement.classList.contains('loading')); > + assert.isFalse(chrome._titleChanged); this is testing internal stuffs, can you instead * add a titlechange test where we get a `looadstart` in between * add a test for the titlechange with an empty value (this will cover the _currentURL stuff)
Attachment #8463125 - Flags: review?(etienne) → review+
(In reply to Etienne Segonzac (:etienne) (PTO -> August 12) from comment #5) > Comment on attachment 8463125 [details] [diff] [review] > chromebar-additional.patch > > Review of attachment 8463125 [details] [diff] [review]: > ----------------------------------------------------------------- > > r=me with those comments addressed (mainly test-related) > > ::: apps/system/js/app_chrome.js > @@ +447,5 @@ > > > > + AppChrome.prototype.useCombinedChrome = function ac_useCombinedChrome(evt) { > > + return this.app.config.chrome && > > + this.app.config.chrome.navigation && > > + this.app.config.chrome.bar; > > are we actually using the combined chrome? > Looks like we could remove a bunch of code (keyboard handling/hiding > closing) by getting rid of the navigation at the bottom of the screen. Let's > track it in a follow up! > I'm keeping the 'navigation' only chrome for now in case some of the dogfood use cases are regressing. So instead of backouting everything I can just adjust some of the 'config' flags and fallback on those. But yeah, we should definitively get rid of all this code before the end of 2.1. > @@ +120,5 @@ > > +} > > + > > + > > +/* Progress */ > > +.appWindow.navigation .progress { > > I think we need to specify .scrollable here. > > In an app with bottom navigation it's weird to have the loading in the > middle of the app display. > Oups! Good catch.
Assignee: nobody → 21
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: