Commit Graph

47 Commits

Author SHA1 Message Date
Gijs Kruitbosch
5a6c52f6a7 Bug 1354117 - only dispatch view events once, and fix synced tabs button test, r=jaws
Prior to this patch, both CustomizableUI itself and the PanelMultiView module
tried to ensure that onViewShowing/Shown/Hiding/Hidden listeners were invoked
when the relevant DOM events fired.

PanelMultiView was doing this manually because CUI was only adding listeners
once the corresponding widget was created. Now that the relevant views can be
accessed without the corresponding widgets (via the fixed appMenu), there was
no guarantee that the listeners would be attached, and this caused empty
subviews.

Unfortunately, if the widget *was* present, it caused events to fire more than
once, which understandably broke consumers like the sync remote tabs widget,
which broke the test we're fixing up here. For other views, even if they were
not completely broken it at least did busy-work.

This patch removes the manual event invocation, and delegates the event
listener work to CUI from the PanelMultiView side. This ensures events fire,
and fire only once.

MozReview-Commit-ID: 94GhcrdcBuB
2017-08-01 12:45:55 +01:00
Erica Wright
056e3d8dba Bug 1378016 - Fix keyboard navigation and selection on 'recent bookmarks'. r=Gijs
MozReview-Commit-ID: GJ7vRPz8zuo
2017-07-31 09:47:19 -04:00
Drew Willcoxon
fa08c7c97c Bug 1374477 - Add a new test for Photon page actions, along with some related code changes. r=Gijs
MozReview-Commit-ID: ADaEnEiGFvX
2017-07-29 20:25:14 -07:00
Mike de Boer
4ca08790fb Bug 1354533 - Update the History panelview when it's shown inside the new Library panel. r=mak
This patch changes the history-panelmenu widget with the following:
 - Move the Recently Closed Tabs and Recently Closed Windows lists into their own
   respective (nested) subview,
 - Add a Recent History header to list of history items,
 - Extend the list of Recent History items to be max 42 items long,
 - Share more code with Bookmarks panel,
 - Generalizes panelview event dispatching to always support customizable widgets.

MozReview-Commit-ID: 4sBR6llIvxG
2017-07-21 15:07:23 +02:00
Johann Hofmann
0bc53a79e8 Bug 1371219 - Increase margin of main menu items when accessed through touch. r=mikedeboer
MozReview-Commit-ID: 9gjxxc6O5YS
2017-07-20 16:45:02 +02:00
Gijs Kruitbosch
9f7ba17cbf Bug 1354086 - fix leaks caused by transitionend listeners that hang around, r=mikedeboer
MozReview-Commit-ID: DvvoAURmxH2
2017-07-19 15:36:44 +01:00
Gijs Kruitbosch
6ea9acbc72 Bug 1354086 - switch overflow panel to using a photonpanelmultiview, allowing webextension views to specify their own size, r=mikedeboer
MozReview-Commit-ID: 1uHEKXsO8vh
2017-07-19 21:23:46 +01:00
Paolo Amadini
6959771b4a Bug 1377793 - Fix scrolling in the non-Photon main menu on Windows. r=Gijs
This is a follow-up to the previous patch, required because on Windows we cannot measure the full height of the main view until it is visible.

MozReview-Commit-ID: 2pfYwMLPYIb
2017-07-09 16:05:03 +01:00
Mike de Boer
dcd0d62b03 Bug 1378790 - Remove keyboard navigation event listeners when a photonpanelmultiview instance is destroyed. r=Gijs
MozReview-Commit-ID: JcAUwLClq7M
2017-07-06 16:30:07 +02:00
Paolo Amadini
fbbbec581b Bug 1377793 - Fix scrolling in the non-Photon main menu. r=Gijs
MozReview-Commit-ID: 88IsXDvYjyK
2017-07-05 16:28:58 +01:00
Gijs Kruitbosch
2a9b14d9e7 Bug 1369729 - use descriptionheightworkaround for sync panel, r=mconley,Paolo
MozReview-Commit-ID: LQg6NEgCqz2
2017-06-28 17:50:43 +01:00
Mike de Boer
9c9a56e3df Bug 1354159 - Part 2 - Introduce a new Places view type, PlacesPanelview, which can visualize query results inside panelview nodes. r=Gijs,mak
MozReview-Commit-ID: Ft1RC7dsqKD
2017-06-29 17:57:24 -07:00
Carsten "Tomcat" Book
204ff0996c Backed out changeset a6d7647024de (bug 1369729) for reflow issues 2017-06-23 15:48:54 +02:00
Gijs Kruitbosch
f6870bdce2 Bug 1369729 - use descriptionheightworkaround for sync panel, r=Paolo
MozReview-Commit-ID: LQg6NEgCqz2
2017-06-19 16:06:01 +01:00
Sebastian Hengst
d2cef49fc5 Backed out changeset c0772946156f (bug 1369729) for failing browser-chrome's browser_appmenu_reflows.js with unexpected uninterruptible reflow. r=backout 2017-06-23 12:53:23 +02:00
Gijs Kruitbosch
2c74c6bc83 Bug 1369729 - use descriptionheightworkaround for sync panel, r=Paolo
MozReview-Commit-ID: LQg6NEgCqz2
2017-06-19 16:06:01 +01:00
Mike de Boer
f9f58d253a Bug 1370580 - Part 1 - Ensure that the overflow rules are set the exact same way for the temporary panel as for the appMenu panel. r=Gijs
These rules are set explicitly to allow the two views to be displayed next to
each other briefly when the slide-in transition starts.
This patch also applies the last remaining photon styles to the temporary panel,
which is used by the new Library widget as well.

MozReview-Commit-ID: 45aYzVHwRYv
2017-06-16 15:41:57 +02:00
Sebastian Hengst
b75bf97136 Backed out changeset af176d040fad (bug 1370580) for frequently failing browser_ext_sidebarAction.js on Linux debug. r=backout a=backout
MozReview-Commit-ID: AwnMjAQTdmC
2017-06-17 23:18:55 +02:00
Mike de Boer
6ea7b945df Bug 1370580 - Part 1 - Ensure that the overflow rules are set the exact same way for the temporary panel as for the appMenu panel. r=Gijs
These rules are set explicitly to allow the two views to be displayed next to
each other briefly when the slide-in transition starts.
This patch also applies the last remaining photon styles to the temporary panel,
which is used by the new Library widget as well.

MozReview-Commit-ID: 45aYzVHwRYv
2017-06-16 15:41:57 +02:00
Sebastian Hengst
9c3bf7d0cd Backed out changeset d6be7dc56cc5 (bug 1370580) for failing test-oop-extensions/browser_ext_browserAction_popup_resize.js. r=backout 2017-06-15 19:24:39 +02:00
Mike de Boer
a351ec54ca Bug 1370580 - Part 1 - Ensure that the overflow rules are set the exact same way for the temporary panel as for the appMenu panel. r=Gijs
These rules are set explicitly to allow the two views to be displayed next to
each other briefly when the slide-in transition starts.
This patch also applies the last remaining photon styles to the temporary panel,
which is used by the new Library widget as well.

MozReview-Commit-ID: 45aYzVHwRYv
2017-06-15 12:49:18 +02:00
Mike de Boer
a0d071ae19 Bug 1369095 - calculate the size of the panel to be shown off-screen to work around all the panel layout issues. r=Paolo
MozReview-Commit-ID: ENxCccxcUZk
2017-06-13 14:06:35 +02:00
Wes Kocher
9072d7e7e8 Backed out changeset 9933f2d4d188 (bug 1369095) for timeouts in browser_page_action_menu.js a=backout CLOSED TREE
MozReview-Commit-ID: CErzYNn287D
2017-06-09 09:19:45 -07:00
Mike de Boer
919dc0fb1b Bug 1369095 - calculate the size of the panel to be shown off-screen to work around all the panel layout issues. r=Paolo
MozReview-Commit-ID: ENxCccxcUZk
2017-06-09 15:52:18 +02:00
Carsten "Tomcat" Book
46c2ff50e8 Merge mozilla-central to mozilla-inbound 2017-06-08 15:16:36 +02:00
Gijs Kruitbosch
35de252f36 Bug 1369564 - fix min-width issues with panels, r=mikedeboer
MozReview-Commit-ID: 3h5hCvcJbTc
2017-06-06 16:12:40 +01:00
Mike de Boer
082bab0665 Bug 1367970 - when switching panels quickly, the auto-resize workaround can cause wonky animations. Clear the timeout when a new animation starts. r=Gijs
MozReview-Commit-ID: CpQFjDDm2BR
2017-06-06 18:18:42 +02:00
Mike de Boer
97a3728d97 Bug 1369339 - make sure to flush layout when necessary for the description height workaround in panelviews. r=Paolo
This caused regressions in various panels, like the Identity panel, resulting in
cut-off descriptions and labels. Our first concern is correctness, then we try
performance.

MozReview-Commit-ID: GH7BZ9waXeW
2017-06-07 12:42:05 +02:00
Gijs Kruitbosch
5372cd544f Bug 1369407 - make showMainView only switch views if the main view isn't current, dispatch ViewHiding, and fix view child assumptions, r=mikedeboer
MozReview-Commit-ID: JWKr8pBd58m
2017-06-02 11:13:33 +01:00
Paolo Amadini
fcaeda71d0 Bug 1367776 - Calculate the maximum height of panelmultiview before the panel is displayed. r=Gijs
This allows the panel to open correctly when scrollable views like History are displayed as the main view, for example when the History button is moved to the toolbar.

MozReview-Commit-ID: ELSbC0RpuaK
2017-06-01 15:49:35 +01:00
Gijs Kruitbosch
f9931221c0 Bug 1354155 - use photon panelmultiview for individual subviews, r=mikedeboer
MozReview-Commit-ID: 9iEHcGDLbJt
2017-05-30 16:30:25 +01:00
Mike de Boer
930178b9cc Bug 1364738 - Fix up multi-line labels inside panelviews that have wrapped around and align elements in the banner. r=Gijs,Paolo
I updated, extended and refined Paolo's descriptionHeightWorkaround method to
support multi-line toolbar button labels.
Made the app menu use that method to ensure no scrollbars appear.
Also updated the styling of the banner to have icon and label align correctly
with those of the other buttons inside the panelview.

MozReview-Commit-ID: IzbahG0kyTu
2017-05-30 14:21:59 +02:00
Mike de Boer
d0a5e82c22 Bug 1366205 - add a browser mochitest with full coverage of the new menu panel keyboard navigation feature. r=Gijs
This also fixes two issues I found whilst writing the tests:
1. Exclude hidden items from the set of navigable buttons and
2. Exclude disabled items from the set of navigable buttons whilst navigating,
because they may get disabled in the meantime (like with the edit controls).

MozReview-Commit-ID: 5WThVoTZjbV
2017-05-26 13:44:55 +02:00
Paolo Amadini
efed284f45 Bug 1009116 - Redo resizing architecture of panelmultiview. r=Gijs
The height of the "panelmultiview" binding is now determined by the stack layout code, and doesn't have to be calculated manually via JavaScript anymore. This allows the removal of mutation and overflow observers, and reduces the number of synchronous layouts being made.

There is still a workaround included for wrapping blocks not being taken into account in height calculations.

MozReview-Commit-ID: 9rrPU5O5hUx
2017-05-23 17:08:01 +01:00
Mike de Boer
ee25998278 Bug 1365647 - Make sure that the panel height never shrinks below the height of the main view in panelviews, like the main menu. r=Gijs
MozReview-Commit-ID: EhjDg3Sci1y
2017-05-23 12:07:50 +02:00
Mike de Boer
2abbaf8ea7 Bug 1354144 - add support for keyboard navigation inside panel views. r=Gijs
MozReview-Commit-ID: GVMyXroGmAn
2017-05-22 12:53:43 +02:00
Mike de Boer
8d9d4c744a Bug 1364672 - take the padding of the views into account when calculating the height of each sub view. r=Gijs
It's ok to cache the padding size of the main view and re-use it in this case,
because the padding is maintained for each view consistently.
The performance characteristics are therefore maintained.

MozReview-Commit-ID: GYT59NIiBET
2017-05-17 18:05:58 +02:00
Mike de Boer
65df65f084 Bug 1363753 - Add an option for panelmultiviews to keep the width of the mainView synchronized across all other subviews. r=Gijs
MozReview-Commit-ID: ALgU1xWydWB
2017-05-15 15:02:32 +02:00
Florian Quèze
50b8c6608d Bug 1353542 - script-generated patch to remove .bind(this) calls we no longer need now that generator functions have been replaced with async functions, r=Mossop. 2017-05-12 14:47:41 +02:00
Florian Quèze
ff53eb9a63 Bug 1353542 - massive script-generated patch converting Task.async and Task.spawn calls, and generators clearly identifiable as tasks, rs=Mossop. 2017-05-12 14:42:39 +02:00
Florian Quèze
4ff7b0abff Bug 1353542 - pre-script hand-written cleanup patch, r=Mossop. 2017-05-12 14:41:20 +02:00
Mike de Boer
10ad513c9f Bug 1354127 - Add a 'More' toolbar button to the Photon app menu. r=Gijs
This also improves the styling of checkbox buttons inside the menu and improves
support for adopting panelviews into the app menu from another area properly.

MozReview-Commit-ID: 1I9CeBx3zrz
2017-05-11 16:23:16 -04:00
Mike de Boer
90b6d074fd Bug 1353360 - implement Photon design spec for panel menus. r=Gijs
MozReview-Commit-ID: BPMkiiP31BP
2017-05-10 17:29:36 -04:00
Mike de Boer
31b2c91c3c Bug 1354141 - Introduce a new binding for Photon panels that allows for more granular control in behavior and to fork the styles entirely. r=Gijs
MozReview-Commit-ID: CDzn5r0YmYO
2017-05-10 16:05:05 -04:00
Sebastian Hengst
0b1ed75727 Backed out changeset 3e704f6d9476 (bug 1354141) for failing mochitest browser_ext_browserAction_popup_resize.js. r=backout on a CLOSED TREE 2017-05-10 19:34:14 +02:00
Mike de Boer
672ded7033 Bug 1354141 - Introduce a new binding for Photon panels that allows for more granular control in behavior and to fork the styles entirely. r=Gijs
MozReview-Commit-ID: CDzn5r0YmYO
2017-05-10 11:06:06 -04:00
Mike de Boer
4892fae40e Bug 1363178 - Move the panelmultiview JS implementation to a separate module. r=Gijs
MozReview-Commit-ID: 92GCeTOp2cP
2017-05-08 16:42:16 -04:00