0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-29 09:33:54 +01:00
Commit Graph

1660 Commits

Author SHA1 Message Date
Matt Westcott
7fd4e14f8e Set datetimepicker events to bubble so that they trigger a filter form refresh 2024-01-17 15:33:07 +00:00
Rohit Sharma
6f93b1a2c4 Fix long comment UI issues (scroll shaking & comment overflow)
- Includes PR #11322
- Fixes #10984 (scrolling issues with long initial comments)
- Fixes #11324 (overflow of comment reply with long words)
2024-01-17 17:34:48 +10:00
nandini584
a88a775aea Ensure the sidebar account toggle has no duplicate accessible labels
- Remove the integration test for this element as it was failing even though the element has valid content.
- Fixes #11372
2024-01-17 12:43:38 +10:00
nandini584
daf0c96841 Fix close button visibility in new dialog non-message variant
- 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
2024-01-17 09:27:50 +10:00
DevilsAutumn
fe1a306285 Move to a select field for determining the way TableBlock will use headers
- Make the new table_header_choice select backwards compatible with tables stored before Wagtail 6.0
- Built on previous PRs #9673 & #6763
- Fixes #5989
2024-01-17 08:37:40 +10:00
Tommaso Amici
a4c18b4957 Add optional caption field to TypedTableBlock
- 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)
2024-01-17 08:15:35 +10:00
Aman Pandey
3de0eca7e4 Remove inline script usage for enabling commenting
- Fixes #11287
- Add basic unit tests for form element data attributes showing/not showing based on commenting configs
2024-01-15 09:01:26 +10:00
LB Johnston
b93508f4ce Enhance Stimulus InitController to support additional custom event dispatching 2024-01-15 09:01:26 +10:00
LB Johnston
edc5991f50 Remove initTooltips util & move plugins to controller files
- 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
2024-01-11 16:23:09 +00:00
vaishnav dasari
3680e32ca8 Fix a few grammar issues in code inline docs/comments
Closes #11429
2024-01-11 07:47:29 +10:00
Thibaud Colas
bc6ef43522 Replace visuallyhidden utility class with w-sr-only 2024-01-09 15:42:08 +00:00
Thibaud Colas
8e4285a04e Remove unused visuallyvisible styles 2024-01-09 15:42:08 +00:00
Thibaud Colas
b8e7a84a72 Remove invalid CSS styles / Sass selector concatenation 2024-01-09 15:42:08 +00:00
Thibaud Colas
7e213eadde Document correct class prefix in CSS comments 2024-01-09 15:42:08 +00:00
Thibaud Colas
bdb8ebdd82 Remove unused inline, inline-block, block classes 2024-01-09 15:42:08 +00:00
Thibaud Colas
294040dc82 Drop c- prefix for transition group 2024-01-09 15:42:08 +00:00
Thibaud Colas
02b4444369 Drop c- prefix for loading spinner component 2024-01-09 15:42:08 +00:00
Thibaud Colas
0865b9d716 Remove more unused class name prefixes 2024-01-09 15:42:08 +00:00
Thibaud Colas
77af0541be Remove usage of is- CSS class prefix 2024-01-09 15:42:08 +00:00
Thibaud Colas
9e65559d0e Replace u-hidden with Tailwind equivalent with and without !important 2024-01-09 15:42:08 +00:00
Thibaud Colas
27cc553dd8 Remove unused clearfix utility 2024-01-09 15:42:08 +00:00
Thibaud Colas
bfd23e4536 Remove unused divider-before utility 2024-01-09 15:42:08 +00:00
Thibaud Colas
d799f491c4 Replace reordering utility with generic tailwind 2024-01-09 15:42:08 +00:00
Thibaud Colas
5158dd688e Replace overflow utility with Tailwind 2024-01-09 15:42:08 +00:00
Thibaud Colas
38c0557434 Remove unused CSS layers 2024-01-09 15:42:08 +00:00
Thibaud Colas
484428b2d9 Combine o-pill and c-status styles, as they are always used together 2024-01-09 15:42:08 +00:00
Thibaud Colas
22fd74a451 Remove now-unused o-icon styles 2024-01-09 15:42:08 +00:00
Thibaud Colas
7077eb02c9 Move avatar styles from objects to components 2024-01-09 15:42:08 +00:00
Badr Fourane
e25c1bb1a0
Add right-to-left (RTL) support for the caret of select inputs (#11313)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2024-01-08 16:07:52 +00:00
Matt Westcott
5a524cb90f Add tests for maxlength on RichTextBlock 2024-01-02 19:05:21 +00:00
elhussein almasri
96b5f45fad display-character-count-to-RichTextBlock 2024-01-02 19:05:21 +00:00
Sage Abdullah
d792346752 Move filters to be inside the search form and use AJAX to submit the form
Also make the search form optional. The <form> element may still be
rendered as if there is either the search form or the filters, or both.
2024-01-02 09:00:58 +00:00
Sage Abdullah
a0a0b1343c Don't add padding to first column on report pages
Report pages have styles for .report that adds margins similar to nice-padding
2024-01-02 09:00:58 +00:00
Sage Abdullah
81ea6d6266 Remove nice-padding from documents, users, and generic listing views tables
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.
2024-01-02 09:00:58 +00:00
Sage Abdullah
1ad22f530d Enforce bulk action checkbox column via CSS
10px was never the right width.

Using CSS instead of the column's width attribute allows us to use media queries to change the width responsively
2024-01-02 09:00:58 +00:00
Sage Abdullah
28d21bf066 Make styles for header buttons consistent 2024-01-02 09:00:58 +00:00
Sage Abdullah
73f7a1abc4 Use button components pattern for slim header buttons 2024-01-02 09:00:58 +00:00
Sage Abdullah
c900ba6c8e Reduce slim header search bar height to match filter button 2024-01-02 09:00:58 +00:00
Sage Abdullah
8a7dd1f5a1 Don't use legacy header when breadcrumbs are used 2024-01-02 09:00:58 +00:00
Sage Abdullah
3cbf3b4b6a Add sublabel support to breadcrumbs 2024-01-02 09:00:58 +00:00
Sage Abdullah
4407c5b5b0 Improve styles of slim header's search and filters for better vertical alignment 2024-01-02 09:00:58 +00:00
Sage Abdullah
3fbf792621 Use bigger font size for last breadcrumb item by default except on create/edit views
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.
2024-01-02 09:00:58 +00:00
Sage Abdullah
f4f08ee2fe Move breadcrumbs styling in _listing.scss to its own _breadcrumbs.scss file 2024-01-02 09:00:58 +00:00
Sage Abdullah
6f92a71253 Move page explorer header's extra spacing to CSS
For better colocation with the CSS that increases the font size
2024-01-02 09:00:58 +00:00
Sage Abdullah
3c5f485201 Introduce get_header_title in WagtailAdminTemplateMixin for <title> and slim header's h1 2024-01-02 09:00:58 +00:00
Sage Abdullah
b0deeab728 Change page listing's add button to icon-only 2024-01-02 09:00:58 +00:00
Thibaud Colas
6cc4533a6f Refactor float usage within admin styles. Fix #8126 2023-12-19 15:38:22 +00:00
Matt Westcott
3c648369b0
Use a floating dialog for filters
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.
2023-12-18 14:55:18 +00:00
Matt Westcott
4e59266743
Use checkboxes for page type filter 2023-12-18 14:55:17 +00:00
LB Johnston
ffc6ac8833 Adopt a small set of stylelint-config-wagtail changes
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
2023-12-18 13:28:18 +00:00
LB Johnston
416fc1dde4 Update stylelint & stylelint-config-wagtail packages
- 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
2023-12-18 13:28:18 +00:00
the-r3aper7
bb33e7c508 Add ClipboardController to allow copying to the clipboard (Stimulus) 2023-12-15 13:53:26 +10:00
LB Johnston
3f38bf7ae8 Add ability for CloneController to auto-clear its own contents 2023-12-15 13:53:26 +10:00
Sage Abdullah
1cbfd1cc89
Restore teal color on table header sort link if it's active
Regression in 4426196046
2023-12-13 10:31:07 +00:00
nandini584
0024751a53 ActionController - Be more explicit about element checks for select method
- Move method to alpha order (after `reset`) and check for input/text area explicitly
- Fixes #11307
2023-12-13 11:20:29 +10:00
nandini584
96349aad3e ActionController - Add noop method
- Useful for leveraging data-action approaches without needing a specific method functionality
2023-12-13 11:20:29 +10:00
Matt Westcott
e97449dc5f Funnel all invocations of wagtailadmin/shared/field.html through the formattedfield tag
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.
2023-12-12 14:58:27 +00:00
Thibaud Colas
b7d2618d93
Remove Safari 14 support in Wagtail admin – update browserslist and TypeScript (#11258)
Co-authored-by: Sage Abdullah <sage.abdullah@torchbox.com>
2023-12-12 10:54:41 +00:00
Ben Morse
09d69d1667
Add display inline-block to the Comment Control's wrapped ToolbarButton 2023-12-06 15:50:03 +00:00
Chiemezuo
b7beb36df6 Ensure expanded side panel does not overlap form content for most viewports
- 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
2023-11-30 18:02:54 +10:00
Krzysztof Jeziorny
e763a614f1 Improve vertical alignment of page listing 'explore' arrow icon
Vertically align the arrow in the children cell
2023-11-23 07:20:43 +10:00
Thibaud Colas
82c0fdecbf
Change light theme floating toolbar active color (#11261)
Co-authored-by: Cassidy <cassidy.pittman@torchbox.com>
2023-11-20 12:45:34 +00:00
Thibaud Colas
4e08807d17 Remove unused icon styles 2023-11-17 21:04:57 +00:00
Matt Westcott
c631a64e44 Remove reference to icon font from Draftail/index.js 2023-11-09 08:57:56 +00:00
Matt Westcott
1ee655da0c Remove deprecated icons 2023-11-09 08:57:56 +00:00
Matt Westcott
59262fb47f Remove webpack rule for .woff 2023-11-09 08:57:56 +00:00
Matt Westcott
2616e24e0f Remove 'svg' qualifier from _dropdown.legacy.scss 2023-11-09 08:57:56 +00:00
Matt Westcott
5e6efdae51 Remove styles labelled 'iconfont' 2023-11-09 08:57:56 +00:00
Matt Westcott
7e9c582775 Remove variables for font icons 2023-11-09 08:57:56 +00:00
Matt Westcott
90d7a1cf61 Remove sass icon() mixin 2023-11-09 08:57:56 +00:00
Matt Westcott
d7ed0b2999 Remove icon font 2023-11-09 08:57:56 +00:00
meli-imelda
81baf940f4 Accounts settings panels - refine spacing and classes 2023-11-09 08:05:28 +11:00
meli-imelda
7b9fe92856 Block chooser - refine padding and hover on block-chooser buttons 2023-11-09 08:05:28 +11:00
meli-imelda
6d28dff48e Listings - Remove hover BG (dark mode) and refine padding/borders 2023-11-09 08:05:28 +11:00
elhussein almasri
8f75331825 Preserve whitespace in rendered comments
Fixes #11171
2023-11-06 22:28:28 +11:00
Ian Price
67a2ff28b2 Add a background on the preview iframe
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
2023-11-06 22:02:41 +11:00
Matt Westcott
c363f6dd27 Remove ModelAdmin 2023-11-01 16:52:20 +00:00
Matt Westcott
e97af885ec Bump deprecations started in 5.2 to RemovedInWagtail70Warning
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.
2023-11-01 16:52:19 +00:00
LB Johnston
12997b6e15 Move slugify/urlify to discrete utils & remove usage of window.unicodeSlugsEnabled 2023-10-31 13:56:19 +00:00
LB Johnston
538c654c14 Remove test for DomContentLoaded event listener
- No longer required as this event listener is not needed manually after deprecation removals
2023-10-31 13:56:19 +00:00
LB Johnston
0d6ca6e15c Remove deprecated creation of window.cancelSpinner in ProgressController 2023-10-31 13:56:19 +00:00
LB Johnston
191d4bf62d Remove deprecated creation of window.initTagField in TagController 2023-10-31 13:56:19 +00:00
LB Johnston
fe6ca9be30 Remove deprecated support for window.headerSearch in SwapController 2023-10-31 13:56:19 +00:00
LB Johnston
23288bbb4b Move Stimulus stories to the one location 2023-10-30 22:12:26 +11:00
CheesyPhoenix
871c09fd2e Ensure the sidebar's explorer does not trigger action-button of current view
Fixes #11037
Co-authored-by: Christer Jensen <chr.code@gmail.com>
2023-10-26 08:59:32 +11:00
Chiemezuo
415b569b29 Remove RevealController initial class
- This is not used and was added as part of #10793
- Avoid this controller managing this behaviour and instead if needed we can use w-init
2023-10-25 08:55:09 +11:00
LB Johnston
f0b6509f29 Rework sidebar .ready class addition
- 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
2023-10-25 08:55:09 +11:00
Chiemezuo
fcc09e8829 Add w-init / InitController to replace body .ready class
- 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)
2023-10-25 08:55:09 +11:00
Sage Abdullah
3adb569849 Fix bulk actions more button items
Use data attributes to select the items, because the classname isn't rendered for items inside the dropdown due to the use of base_attrs_string
2023-10-19 22:53:15 +01:00
Sage Abdullah
a2b0d04563
Hide dropdown menu on click in awaiting review dashboard panel 2023-10-19 11:14:26 -04:00
Sage Abdullah
b3846a63fc
Fix workflow action buttons in awaiting review dashboard panel 2023-10-19 11:14:26 -04:00
LB (Ben Johnston)
74aada038b
Add BulkController support for shift+click behaviour (#10861) 2023-10-19 13:25:41 +01:00
LB Johnston
1da3e5fde7 Refactor Stimulus util & module export
- 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
2023-10-19 07:28:27 +01:00
Thibaud Colas
ad488a5a49
Use a smaller font size for page listing headers 2023-10-19 02:13:10 -04:00
sag​e
56b14e8f97
Use dropdown buttons on listings in dashboard panels (#11083)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2023-10-19 07:12:39 +01:00
Sage Abdullah
85d74e42a4 Do not render minimap if there are no panel anchors 2023-10-19 06:39:35 +01:00
Chiemezuo
3df622f2ef Migrate publishing schedule dialog field resets to Stimulus
- Remove ...admin/schedule-publishing.js
- Builds on #11043 & #11066
- Closes #11029
2023-10-19 08:00:15 +11:00
Chiemezuo
29d73a3b68 DialogController add support for notifyTargets
- Allowing the dispatching of events to internal targets for key modal events
- See ##11029
2023-10-18 18:52:04 +11:00
dependabot[bot]
75fb953754 Bump @babel/traverse from 7.17.3 to 7.23.2 in /client/tests/integration
Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.17.3 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-18 08:50:47 +11:00
Matt Westcott
4426196046 Add switch between searching current section and whole site 2023-10-17 19:06:24 +01:00
Chiemezuo
aa47776b8a Allow long words in comments to wrap if needed
Fixes #11048
2023-10-17 21:16:39 +11:00
Chiemezuo
959913ee18 Create reset method in w-action controller
Enabling prep for #11029
2023-10-17 21:08:22 +11:00
faishalmanzar
e9d88528e7 Added JS Events for Inline panel added/removed
- Added docs for InlinePanel JS events
- Added w-formset:ready w-formset:added & w-formset:removed events and expanded test suite
- Fixes #9105
2023-10-17 11:53:16 +11:00
Chiemezuo
4269d824f9 Migrate jQuery 'select all on focus' in Image URL generator to Stimulus
Adds support of this useful shared functionality in the ActionController
Fixes #11031
2023-10-13 11:29:18 +11:00
LB Johnston
7b0807d17e Update ActionController unit tests to use a setup function 2023-10-13 11:29:18 +11:00
LB Johnston
a008554b9c Move chooser views from search into searchpromotions 2023-10-09 20:56:09 +11:00
LB Johnston
bd730ecba6 Eslint - allow new SomeClass() in unit tests
- This constraint is not required in unit tests where the output of a class is not the main thing being tested
- Avoid noise in tests by just removing disabling this linting rule in these files
2023-10-06 20:36:42 +11:00
rohitsrma
e2ce772017 Fix help block link contrast
Fixes #10990
2023-10-05 21:30:03 +11:00
Sage Abdullah
1a1fc5c1a7
Refactor default snippets listing buttons to reuse the generic IndexView buttons 2023-10-04 11:30:24 +01:00
LB Johnston
76a0c4968a Adopt classname instead of classnames in all MenuItem/Sidebar usage
- Adds a deprecation path, including documentation to further remove unpredictable naming of adding `classname` in Python APIs
- Intentionally keeps `classNames` in Telepath adaptor inner usage as this convention is not set, however, the server side value passed in will use `classname`
- See https://docs.wagtail.org/en/stable/contributing/general_guidelines.html#use-classname-in-python-html-template-tag-variables
- See #9769 & #9770
2023-10-04 08:05:52 +11:00
Matt Westcott
235f1f4104 Set title line-height in em rather than rem 2023-09-21 09:51:51 +01:00
Matt Westcott
2ed0910e26 Remove margin on ul elements within tables
Fixes the Usage view - https://github.com/wagtail/wagtail/pull/10896#discussion_r1328281681
2023-09-21 09:51:51 +01:00
Matt Westcott
4c7a1aae94 Make action buttons in listings always visible 2023-09-21 09:51:51 +01:00
Matt Westcott
210a9c5df3 Set title-wrapper to inline so we don't have to change it to a span everywhere 2023-09-21 09:51:51 +01:00
Matt Westcott
04eca55b13 Add folder icon for pages with children 2023-09-21 09:51:51 +01:00
Matt Westcott
1746cdec58 Remove align-top classname and use top alignment in listings as standard
This is the most sensible rendering when one cell's content is overly tall - see for example the thumb image column on the bakerydemo People listing.
2023-09-21 09:51:51 +01:00
Matt Westcott
7ee53a9714 Update listing table styling 2023-09-21 09:51:51 +01:00
mansi0829
0fde1ca404 Update InlinePanel JS to support empty form as Template
- Keep backwards compatibility with script element
2023-09-17 21:20:51 +10:00
Subhajit Ghosh
f86a832a4b Add support for offset value in Dropdown & Tooltip controllers 2023-09-14 09:09:59 +10:00
LB Johnston
aa6f190139 Clean up - align html template tag usage in tests
- There is one case where the closing tag was malformed
- All other cases are just ensuring the final backtick is on the closing tag's line
- This allows IDEs to better pick up on html within template tags
2023-09-13 15:06:52 +01:00
LB Johnston
51353c7c43
Do not use jest inside stubs.js to prevent Storybook from crashing 2023-09-13 15:04:04 +01:00
faishalmanzar
3a86efaf12 Add ability for InlinePanel to set focus on newly created items
Fixes #10764 - Inserting a new InlinePanel function improved
2023-09-13 07:54:57 +10:00
LB Johnston
b96d2d7faa Adopt w-messages (CloneController) in unsaved changes warning
- Replace global util window.updateFooterSaveWarning with the w-messages usage
- Remove window.updateFooterSaveWarning usage in core.js & move 'delay before clearing' time delay to the Stimulus value
- Fix JSDoc usage in `enableDirtyFormCheck`
- Add aria-live="polite" so message updates can be advised to screen readers
- Add release considerations and for `window.updateFooterSaveWarning` removal
- Closes #10091
2023-09-13 07:40:04 +10:00
Hussain Saherwala
e4fdf6da2a Update CloneController / w-clone for editor unsaved messages
- Changes default show-delay to zero (immediate) and update the w-messages (page messages) to have the 100ms delay
- Add support for 'hide' classes to be added/removed based on clone usage
- Add support for calling the clear method from actions, and resetting classes if used after a clear delay value
- Add JSDoc descriptions to most other properties, add better TS types
- Pull out logic to get template content to class method
- Based on initial work in #10327
2023-09-13 07:40:04 +10:00
LB Johnston
65a40f39e3 Rename MessagesController to CloneController
- Register with two identifiers; w-messages & w-clone
- Update unit tests and basic JSDoc to align with new naming
- This allows the Controller to reflect the 'behaviour' not the 'usage'
2023-09-13 07:40:04 +10:00
LB Johnston
325d584a9b Refine debounce implementation
- Allow the debounced function to be used with a Promise API
- Allow debounce to be called with a non-number/falsey to indicate there should be no wait (runs immediately)
- Add error handling
- Refine types to be better to work with for callers
- Add full unit test suite to implementation
2023-09-13 07:40:04 +10:00
Gareth Palmer
a63689869e Add support for merging cells in TableBlock.
Handsontable has support for merging table cells using the `mergeCells`
plugin but there was no support in Wagtail for storing which cells have
been merged or rendering them in the output template.

The client JavaScript will now save which cells have been merged and
the output template will merge or hide cells.

See https://handsontable.com/docs/6.2.0/Options.html#mergeCells
2023-09-08 08:30:49 +10:00
Matt Westcott
a3029bbe3a Implement linked_fields on ChooserViewSet 2023-09-06 15:58:36 +01:00
LB Johnston
8a52269da5 Update w-breadcrumb root class to w-breadcrumbs (plural)
- This way we align with the controller name
2023-09-05 20:05:56 +10:00
LB Johnston
857ea05c2e Migrate breadcrumb JS to Stimulus RevealController
- Adds a new generic `RevealController` that handles the ability for content to be opened/closed while updating the relevant parts of the DOM such as aria-expanded on the toggle.
- Register this controller as a generic `w-reveal` and also the `w-breadcrumb` identifiers so that we can differentiate usage via different DOM attributes and events.
- Closes #10118
2023-09-05 20:05:56 +10:00
LB Johnston
0d09eba59e Rename breadcrumbs.js to RevealController 2023-09-05 20:05:56 +10:00
LB Johnston
dfaa488add Remove work arounds for dispatch target events
- See https://github.com/hotwired/stimulus/issues/642
- Adopt streamlined approach in SwapController for 'targetElement'
2023-08-24 17:01:56 +02:00
LB Johnston
585a08fea0 Adopt w-bulk Stimulus controller for form submissions listing 2023-08-24 20:53:49 +10:00
LB Johnston
b9b444fd70 Clean up unit tests that passed a function/data to Promise.resolve
- Passing anything to Promise.resolve just means that will be the return value of the promise (.then)
- This does not actually run the function (e.g. in the case of requestAnimationFrame)
- Avoiding unit tests that could cause confusion in the future
2023-08-09 09:00:34 +10:00
Storm B. Heg
2c43ddbbd3 Add support for options/attrs in Telepath widgets & add required/aria-describedby
- This allows us to pass extra data for the widget to use in a backwards-compatible way.
- FieldBlock: render 'required' and 'aria-describedby' attributes when appropriate
- Ensure options passed to `render` override defaults
- FieldBlock: add test proving options are constructed and passed down
- Allow Telepath's widget rendering to take options
- Include extra accessibility-related attributes in html output
- Resolves missing required attribute on input elements for required fields
- Resolves missing aria-describedby attribute on input element when the field has help text.
- Partial work on #10300
2023-08-05 08:55:53 +10:00
Storm B. Heg
3be4e685c0
Remove unused WorkflowStatus view, urlpattern, and workflow-status.js 2023-08-03 15:16:08 +01:00
LB Johnston
fb340f1971 Remove CommentApp state update util
- The `update` util's types are not compatible with future TS v5 adoption.
- This util is simply a wrapper around `Object.assign` and only used in three places.
- Instead use the Object.assign in place for simplicity instead and remove the `update` util.
2023-08-02 21:00:25 +10:00
LB Johnston
1a95163138 Update eslint configs & align linting changes
- Align JS with latest Eslint package updates
- Update configs to ignore new defaults not required in test files
- Update Controller js usage & configs for classProperty naming rules
- Remove eslint ignore directives no longer required due to changed defaults
2023-08-02 21:00:25 +10:00
LB Johnston
35dfdea89c Update formatting - Prettier 3.0
- Run formatting with latest version of Prettier
2023-08-02 21:00:25 +10:00
Sage Abdullah
7fca33c47d
Fix preview panel iframe not loading immediately when preview panel is opened in snippets 2023-07-28 09:25:45 +01:00
Sage Abdullah
0eda6a0a49
Fix loading spinner being shown indefinitely in preview panel 2023-07-28 09:25:45 +01:00
Sage Abdullah
9122ab2aee
Fix initial size of 'Preview unavailable' content in preview panel 2023-07-28 09:25:45 +01:00
dependabot[bot]
f66cb7cbb5 Bump word-wrap from 1.2.3 to 1.2.4 in /client/tests/integration
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-19 18:07:56 +10:00
LB Johnston
f3c3d31e23
Ensure userbar dialog can sit above other website content
- Fixes #10471
2023-07-18 13:53:06 +01:00
LB Johnston
aa3863f17c DropdownController - fix test & refine events & methods
- Test that uses setTimeout never ran as Tippy relies on `transitionend` events, which JSDom will not dispatch. Rework tests to correctly test this custom event gets dispatched
- Use Stimulus dispatch method for custom event dispatching as the controller name (e.g. 'w-dropdown') will automatically be added, work around TypeScript bug in Stimulus which should be fixed in a future release https://github.com/hotwired/stimulus/issues/642
- Add show/hide methods, pull out options to own get method
- Add unit tests for show/hide, content being in dropdown
- Relates to #10557
2023-07-18 21:46:07 +10:00
Storm B. Heg
fef8c4ac3c Ensure StreamField panels validation errors are visible (#10673)
...by rendering panels as expanded, regardless of the collapse
setting specified by the Wagtail implementor.

Fixes #8990 partially.
2023-07-18 12:43:17 +01:00
Thibaud Colas
be2eb7fafc
Use inactive field border styles for read-only FieldPanel 2023-07-18 10:42:05 +01:00
Thibaud Colas
3ae40d87f0
Use a theme-agnostic color token for read-only panels support in dark mode 2023-07-18 10:40:07 +01:00
LB Johnston
995809a318 Adopt data attribute usage of SwapController (w-swap) for all header searches
- Removes six inline scripts completely, no longer relying on window.headerSearch
- Update the fallback Stimulus Swap controller afterLoad to be a deprecated method
- Add upgrade considerations
- Fix regression from d554cbe310 where manually submitting page search results would load the partial, not full page response
- Closes #9950
2023-07-18 07:09:28 +10:00
LB Johnston
b0dc6c1ea5 Revise the default SwapController target to the more common '#listing-results' 2023-07-18 07:09:28 +10:00