- Fixes #11629
- Relates to clean up done as part of #11629 which removed a lot of styling for footer actions which appeared to be unused.
- Re-add some base styling to support the ability for basic customisations where buttons are added within the `extra_footer_actions` block.
- Allows one controlled w-bulk element to contain groups of toggles that work together
- Useful for tables where the DOM structure means that columns will need to be toggled / selected as one
- Basic support for 'multi' groups to avoid issues with space separated items
- Currently the code appears to try to fallback to an empty id, however this will never happen as we are building a non-empty string
- Instead if we have not found any closest panel, simply return the intersection map as is
Closes #11210
Include the ability to trigger the dialog from the sidebar
Include base styling and unit tests
Fixes ##11711
Relates to larger work for keyboard shortcuts in #3949
In the new designs, listings other than the page listings should show
the complete label for the main header button.
The page listing only shows the icon because much of the space is taken
by the side panel toggles.
The page listing's header button hasn't been refactored to use the
HeaderButton class, hence there is no changes to the page listings code
in this commit.
This uses a custom header template that extends the slim_header.html
We could do this without the custom header template, but this would mean
the slim_header.html will accept yet another variable (extra_form_fields),
which we are trying to avoid to prevent it from accepting so many variables
like header.html.
This is especially since this "extra fields" block is only needed for the
images listing (at least for the foreseeable future).
- Update JSDoc throughout controller for better internal documentation
- Ensure we 'clean up' the other controller attributes when the init has completed
- Allow for the ready event to have the preventDefault called and stop other events from dispatching
- Add unit tests to support the above changes
Avoid the need to load window.chooserUrls globally in the shared _editor_js.html include.
Instead pass in the lazy URLs to the link chooser entity options.
Instead of relying on global window.chooserUrls, add the support for also passing in entityType config objects that serve the same purpose.
Update JS unit tests to reflect that the future will no longer support the window.chooserUrls
This is useful when the controller is used in views that would produce an identical response if the page is hard-reloaded with the same params, e.g. listings
Issue was appearing when there was nested inline panels.
currentChild. find would match the parent up/down button
but also all the ones of the nested inline panels
Fixes #5919
This un-reverts commit 99dd11510b with fixes for Prettier mirror (it's rev must be 3.0.3 even if using a newer Prettier).
The original commit which was reverted is 5971ce7f3f
- React Button was only ever used to render a link (a element)
- This creates a potential accessibility issue if developers want to render a button, it's confusing and incorrect
- Additionally, the unused prop (dialogTrigger) & aria-haspopup is non-compliant and has been removed
Tippy unmounts its popper element from the DOM on hide, which means that
the filter fields get detached from the form. As a result, when
performing a search (which means the filters popup is closed), any
filters that have been applied will be lost. The issue does not occur
the other way around (filtering after search) because the filter fields
will still be in the DOM (as the popup is open while you're applying the
filters).
Unfortunately, Tippy does not offer a built-in option to keep the popper
mounted in the DOM when it's hidden.
As a workaround, use Tippy's hooks to re-append the popper to the DOM.
- onCreate: ensure the popper element is mounted even when the tippy was
just created (normally it's only mounted when shown). This is useful
to keep the filters when searching after a full-page refresh (e.g.
after navigating to the next page in pagination).
- onHidden: ensure the popper is still mounted, to solve the main issue
- onShow: remove the hidden attribute and let tippy move the popper
element as necessary (though usually this isn't necessary, because we
remount it in the same position (the controller's element).
The 'hidden' attribute shouldn't cause any issues here as Tippy doesn't
use it. Without it, the solution still works because Tippy uses CSS to
make the element invisible. However, the complete CSS doesn't get
applied until the tippy is shown at least once. This means on initial
load with the onCreate hook, the tippy will take up the space while
being invisible. Using the attribute fixes it (and display:none probably
would too).
This behaviour can be enabled using the newly-added DropdownController
value 'keepMounted'.