Add `w-kbd-scope-value` with support for `global` so that specific keyboard shortcuts (e.g. ctrl+s/cmd+s) can be used consistently even when focused on fields.
Fixes #11844
- Add legacy support for window.URLify with allowUnicode as a param
- Add release notes details for both window.URLify (deprecated) & window.XRegExp (removed)
- 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'.
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
bulk-action-checkbox is the checkbox in the <td> elements. On page
listings, if you're searching and there are no results, the table will
still be displayed (to give you the option to search the whole site).
The table has no data rows, which means there are no elements with
bulk-action-checkbox class.
Change the selector to target the bulk-actions-filter-checkbox class
instead, which is the bulk action's <th> checkbox. This element (in the
header cell) is always available even when there are no results.
- updated the font to its direct use theme and removed -title-height
- removed the 1-time used scss variables and updated directly in the files
- Fixes #11458
- Fix edge case where keyboard ordering and then drag drop ordering could get out of sync
- Ensure the sortable instance is cleaned up if the controller gets removed
- Relates to PR #11250 & Issue #10909
- Add w-dialog root classname to support overall styling of the dialog if a message is provided
- Fix up layout of dynamic classes to avoid additional spaces
- Fixes #11306
- Make the new table_header_choice select backwards compatible with tables stored before Wagtail 6.0
- Built on previous PRs #9673 & #6763
- Fixes #5989
- Closes #8507
- Make caption default to "" for tables that predate adding the caption field
- Update the html generated in JS so the rendered form matches our new styles
- Use a consistent period (full stop) at the end of the help text sentence (including table fields)
- Fully remove initTooltips util and replace with Controller usage
- Move plugins to their used Controller files
- Export hideTooltipOnEsc as it's used by other code
- Add unit tests for plugin behaviour in the controller tests
- Fixes #10668
- Built on #10869
The added CSS handles the case when nice padding is removed (to make the listing
go full-width) and no bulk actions are available (e.g. a ModelViewSet index view
or some other view that extends generic listing view).
This allows us to not rely on the full-width class (which should
eventually be removed) while correctly apply the spacing regardless
whether nice-padding is used or not, and whether bulk actions are
available or not.
If nice-padding is used, then the listing view will look as they
previously do.
We want to make the slim_header.html as the basis for the modern header
template that will be used everywhere, eventually replacing header.html.
Rather than making the page explorer be the special case where we want
the last item to be bigger, do it the other way around i.e. use the
smaller font size on the create/edit views. This ensures that the big
font size is used on all other views e.g. Inspect view.
Remove use of shared/filters.html, as it contains a duplicate `<form>` element we don't want, and generally has more stuff we don't want than stuff we do, to the point that it'll just get in the way of restyling.
Where possible, adopt a subset of stylelint-config-wagtail changes.
- Formatting & ordering (auto applied), this includes the padding/inset shorthand changes
- Adopt a small set of no-union-classes changes as an example of changes to come in future PRs
- Ignore some areas where we are selecting against data* attributes that will not be practical to change
- Move some no-important ignore rules to specific lines
- Ignore max-combinators in modeladmin styles (legacy)
- Remove error messages forced-color-adjust setting to none
- Ensure that some rules are always ignored in overrides (aka vendor) styles. This avoids us having to add ignore comments all over these styles.
- Resolves #10719
At this point wagtailadmin/shared/field.html is still used by FieldPanel, as well as third-party code. Replace this by a template that simply pulls the relevant context variables from the template and passes them on to `{% formattedfield %}` (which renders them using the old template, now renamed formatted_field.html). This will allow us to move logic from the template to the tag function without breaking the existing wagtailadmin/shared/field.html API.
- Set the side panel width custom property ('--side-panel-width') globally, not just on the form container.
- Use this custom property to determine the max width of the form content.
- Fixes #11038
Ensures that when the iframe content is loaded there is a background on the iframe. So that transparent websites show correctly in the preview panel.
Fixes #11174
These will not be removed in 6.0, to ensure that the two-release deprecation period is still in place.
The removal of the legacy moderation is an exception, as this was slated for removal from 2.x, long before the deprecation warnings were put in place.
- Remove the sidebar duplicate JS that would also add a ready class but NOT after a settimeout, only after the component renders
- This means we now have one location in the code that does this, driven by Stimulus
- Update the Storybook preview JS so that we can rely on similar behaviour in Storybook for transitions
- Controller will automatically add or remove some initial classes when connected
- An optional delay can be set to have this run after a settimeout
- Replace the core.js ready class addition (which would run after a settimeout)