- 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
- 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'.
Also move the insertion of the param to get_url_without_foo methods to avoid the param getting applied multiple times and to avoid having to parse the URL again.
Rename the filter_fragment to _w_filter_fragment to avoid clashes
Fixes #11420
Two issues existed;
1. Safari will not set `document.activeElement` as expected in all other browsers, instead, when a button is clicked it will keep the activeElement as `body`. This meant that the reset of the disabled button (before the confirm triggers a click) was not working.
2. Visually the button still had the loading spinner due to w-progress controller having triggered the loading visuals, this did not block the behaviour but looked broken.
See Safari behaviour docs:
- https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#clicking_and_focus
- https://bugs.webkit.org/show_bug.cgi?id=22261