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)
- Accessing constructor was confusing and createController is not a core requirement
- Avoid modifying the base Stimulus application class
- Expose `window.StimulusModule` as the module output
- Expose `window.wagtail.app` as the Wagtail Stimulus application instance
- Rename root element variable to `root` in initStimulus (so we do not conflict with potential action option registration that uses `element` variable names)
- Pull in the wagtail.components to the same core.js file and add JSDoc for exposed global
- Relates to #10197