While this creates several methods with just 1 callsite, given the previous length of the
showSubView method (230 lines), it seems wise to split this up and to try to reduce the
nesting, as well as making it easier to reason about what happens if we hide the panel
mid-transition.
MozReview-Commit-ID: 9Vf4p4fVBSs
--HG--
extra : rebase_source : f21ca55eaeb4bda49ba51f2694ecb5620f47e941
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
--HG--
extra : rebase_source : 4df42939aa06ec10b7f86c3c2e4fe75160c7e7bd
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
--HG--
extra : rebase_source : 2758dd643cd504448ee1f19296670a588bf56069
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
--HG--
extra : rebase_source : 0391a619f551b5e100688ea231d12ac26e0868c8
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
--HG--
extra : rebase_source : 0bf4fc4effc9de9e431ee50dfcf5fc7206e252cf
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
--HG--
extra : rebase_source : 0bf4fc4effc9de9e431ee50dfcf5fc7206e252cf
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
--HG--
extra : rebase_source : f142e3dbba0d70effe129dad43f139e494070d82
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
--HG--
extra : rebase_source : 82feb289936d99939ee664cf7b2aff32c1039b85
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
--HG--
extra : rebase_source : c1de4919c524c63f9ffdcda8576308fce223cad3
extra : amend_source : 5af3fe6044e23ccf4302cc2a8099afbd22fd1672
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
--HG--
extra : rebase_source : 8a6c4e5ac7b1c0d30f53b732730629b5d8ca7166
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
--HG--
extra : rebase_source : e0bd85192e7b1043ecf04b7d9d3b546aadb004c9
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
--HG--
extra : rebase_source : b872c14a553c4293ac476d5d22c634a5a0f6cb24
extra : intermediate-source : bf96469b6ea7daee29eb75a60d11f017a1c86a64
extra : source : 719bb4e7286fbd3baf32061929e4b7d9f953c671
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
--HG--
extra : rebase_source : 5bf7962367f1ff48f4e61a20535a4fbda82f419e