0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-25 05:02:57 +01:00
Commit Graph

1819 Commits

Author SHA1 Message Date
Thibaud Colas
d79bac199f Adjust footer action styles based on new designs 2024-01-17 16:42:00 +00:00
Thibaud Colas
7c057661ff Remove legacy dropdown component 2024-01-17 16:42:00 +00:00
Thibaud Colas
885cf7b76c Clean up footer actions styles 2024-01-17 16:42:00 +00:00
Thibaud Colas
e801e6cec4 Convert pages footer actions to dropdown_button 2024-01-17 16:39:31 +00:00
Thibaud Colas
67c97b2168 Add warning styles for dropdown-button 2024-01-17 16:39:30 +00:00
Thibaud Colas
bc461d4de3 Convert all header dropdowns to new dropdown_button component 2024-01-17 16:39:30 +00:00
Thibaud Colas
91aa28b11a Add new dropdown-button component 2024-01-17 16:39:30 +00:00
Sage Abdullah
85408d8626 Implement design for active filter pills 2024-01-17 15:33:07 +00:00
Sage Abdullah
0de0cf4dd5 Add info-125 shade to color variables 2024-01-17 15:33:07 +00:00
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
LB Johnston
4afe01104b Adopt Stimulus SwapController for task-chooser-modal use case
- Builds on #9952
- Create a new method `submit` and `submitLazy` to serialise a form's inputs and submit (GET) async to replace content
- Create a lazy version of `replace` and add unit tests for it
- Partial progress on #9950
2023-07-18 06:24:49 +10:00
Albina Starykova
457e260622 Update styles for userbar and a11y checker in dark mode 2023-07-16 22:07:24 +10:00
Albina Starykova
ecb2126cea Update Wagtail logo to the latest version
- Partial progress on #10404
2023-07-16 17:20:26 +10:00
Lovelyfin00
9868be7900 Adopt DialogController & TeleportController in the userbar 2023-07-15 23:03:57 +10:00
Lovelyfin00
62786ebd13 Adopt DialogController & TeleportController in admin 2023-07-15 23:03:57 +10:00
Lovelyfin00
c556acef35 Create DialogController (w-dialog) & TeleportController (w-teleport) 2023-07-15 23:03:57 +10:00
LB Johnston
a15f7d188b Rename includes/dialog to controllers/DialogController 2023-07-15 23:03:57 +10:00
Sage Abdullah
994698d76c
Do not use FieldRowPanel for scheduled publishing fields
To prevent inconsistent layout if only one of the fields has an error
2023-07-14 15:21:57 +01:00
Sage Abdullah
876b0e0f19
Move comments counter badge markup to base SidePanelToggle component 2023-07-14 15:21:57 +01:00
Albina
e5da22586b
Update styles for block picker in dark mode (#10644)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2023-07-14 14:42:12 +01:00
Albina
a84fdd4919
Update styles for critical buttons in dark mode (#10643)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2023-07-14 09:35:43 +01:00
dependabot[bot]
d886e5eadb Bump tough-cookie from 4.0.0 to 4.1.3 in /client/tests/integration
Bumps [tough-cookie](https://github.com/salesforce/tough-cookie) from 4.0.0 to 4.1.3.
- [Release notes](https://github.com/salesforce/tough-cookie/releases)
- [Changelog](https://github.com/salesforce/tough-cookie/blob/master/CHANGELOG.md)
- [Commits](https://github.com/salesforce/tough-cookie/compare/v4.0.0...v4.1.3)

---
updated-dependencies:
- dependency-name: tough-cookie
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-13 18:07:49 +10:00
Albina
0b2ea1edac
Update rich text Link/Document Tooltip styles (#10639)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2023-07-13 08:19:59 +01:00
LB Johnston
ae4c3c20c8 Update all snapshots to Jest 29 format
- See https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
2023-07-13 07:51:26 +01:00
LB Johnston
f80e64989e Update failing tests for Jest v29
- Use a console.error spy to avoid the console error bubbling into logs for FieldBlock.test.js (also allows us to confirm an error was thrown)
- Adopt proper approach to 'flush promises' now that API is available for JSDom usage of microtasks/animation frame
- Adapt to new Jest timer mocking approach, use legacy timers in one file as there is not a suitable setTimeout (with zero delay) while also using async await
2023-07-13 07:51:26 +01:00
LB Johnston
f90e03ab35 Update Jest to v29, uuid v9 & update stubs
- `uuid` update is required to avoid import errors - https://github.com/uuidjs/uuid/blob/main/CHANGELOG.md#900-2022-09-05
- Add stubs for window.scrollTo to avoid console errors when running tests
- Filter out warnings for Draftail React warnings, these are unlikely to be resolved anytime soon and add noise to the Jests tests that are unhelpful
- Closes #10043
2023-07-13 07:51:26 +01:00
LB Johnston
2ad71493a9 Add TooltipController (w-tooltip) & remove bootstrap tooltips
Adds a new Stimulus controller for Tippy.js tooltips to replace only the Bootstrap tooltip usage & removes the bootstrap JS tooltip code.

- Dashboard - moderation listing panel
- Reports - Workflow listing status tooltip
- Shared Avatar - user name tooltip
- Workflow listing - steps item tooltip

Closes #8565
2023-07-13 00:43:17 +01:00
Sage Abdullah
db0b985484
Use flex display for listing header .right class
Workaround until #10148 is fixed
2023-07-12 09:18:11 +01:00
Matt Westcott
cbd6a1328c Convert page listing view to tables framework 2023-07-11 10:28:12 +01:00
Matt Westcott
69b7ed0815 Use table component for page search results 2023-07-10 15:21:46 +01:00
LB Johnston
04d1e8162b Migrate header search to a Stimulus controller (w-swap)
- Removes the jQuery slide animation so content will be instantly replaced
- Removes the autofocus behaviour on the search fields as this is not helpful for screen readers / keyboard control
- Includes support for `window.header` if provided alongside dynamic adding of data-* attributes if not included
- Base implementation for #9950
- Co-authored-by: sag᠎e <laymonage@gmail.com>
2023-07-06 20:10:31 +10:00
Thibaud Colas
f4ea0156a2 Implement new Draftail customisation APIs
- Fixes #5580
- Remove TSLA/TWTR/BTC references and replace with clean energy FSLR / NEE stocks
2023-07-06 13:14:54 +10:00
LB Johnston
8251072e6d Replace usage of innerHTML with textContent
- Stimulus CountController content is programatically generated but best to avoid writing HTML accidentally
- ChooserModel field required label should avoid risk of translations with HTML
- Image focal point chooser's label does not need to support HTML
- FieldBlock us using h util but this can be avoided by built in browser escaping when innerText is used
- focal-point-chooser gets value from its set up but we should avoid innerHTML if we can
2023-07-06 12:26:43 +10:00
LB Johnston
1e271afc92 Chore - remove unused global declaration
- Was triggering an Eslint warning
2023-07-05 08:13:38 +10:00
SebCorbin
d52484f524 Auto-select single block in StreamField
- Closes #3998
2023-07-04 17:38:45 +10:00
LB Johnston
150e988f4d
Migrate Tagit init JS to TagController
- Closes #10100
2023-06-27 09:23:01 +01:00
LB Johnston
82ca711f16
Rename initTagField to TagController 2023-06-27 09:23:01 +01:00
LB Johnston
4195f80d29
Create shared util domReady 2023-06-27 09:23:01 +01:00
Sage Abdullah
0ba6cb726c Fix taggit/tagit autocomplete text colour in dark mode
- Relates to #10418
2023-06-27 08:01:57 +10:00
Thibaud Colas
4bd1f7b267 Add a way to hide the tooltip on click for chooser widgets 2023-06-26 13:55:09 +01:00
Thibaud Colas
466e43e571 Fix "More" dropdown for bulk actions 2023-06-26 13:55:09 +01:00
Thibaud Colas
65c37b34bc Fix text wrapping 2023-06-26 13:55:08 +01:00
Thibaud Colas
55fd422eb6 Remove now-unused c-dropdown / data-dropdwon implementation 2023-06-26 13:55:08 +01:00
Thibaud Colas
3b3d4ed981 Remove Tippy implementation migrated to Stimulus 2023-06-26 13:55:08 +01:00
Thibaud Colas
7516b55e83 Switch bulk actions’ "More" dropdown to new component 2023-06-26 13:55:08 +01:00
Thibaud Colas
2b1f13a109 Add missing exports 2023-06-26 13:55:07 +01:00
Thibaud Colas
9798306f0e Update chooser styles to match designs 2023-06-26 13:55:07 +01:00
Thibaud Colas
1f15f52a6d Update chooser widgets to use new dropdown component 2023-06-26 13:55:07 +01:00
Thibaud Colas
d288b2f81e Add new dropdown component based on Tippy.js 2023-06-26 13:55:07 +01:00
Thibaud Colas
f985262959 Allow all stories within subfolders of shared templates to appear in the same section 2023-06-26 13:55:07 +01:00
Matt Westcott
6c818f1695
Restore the valign='top' style 2023-06-26 11:07:13 +01:00
Sage Abdullah
aebca4781e Defer preview panel iframe src loading until it's opened 2023-06-22 08:11:54 +10:00
Sage Abdullah
281a980736 Defer preview data updates until the preview panel is opened 2023-06-22 08:11:54 +10:00
Sage Abdullah
e598589ac6 Debounce live preview updates to prevent making too many requests 2023-06-22 08:11:54 +10:00
Thibaud Colas
f3f2589b7c Use custom dark theme colors for revision comparisons. Fix #10552 2023-06-20 13:24:09 +01:00
Thibaud Colas
284a4ef78e Move all slim header button classes to be defined in slim_header.html 2023-06-15 15:53:53 +01:00
Thibaud Colas
9285e77734 Allow 2px borders in utility classes 2023-06-15 15:53:53 +01:00
LB Johnston
ba8a975273 SyncController - add better performance & enhance
- Add support for a default 100ms debounce on apply calls so that multiple events (e.g. keyup) do not impact performance
- Refine the delay for updating the field to not use setTimeout by default as this async behaviour is no longer needed for basic usage
- Add unit tests for debounce functionality and clean up unit testing to ensure each test can run in isolation
- Add explicit tests for non-inpu fields such as select (update code to ensure we use setter not setAttribute to support these)
- Add ability to support an action param for a fixed value being synced to another field
- Relates to #10517
2023-06-15 12:22:55 +01:00
LB Johnston
015c4339d7 Slug Controller - enhance default compare function
- Allow compareAs behaviour to be overridden via the event detail OR a param
- Enhance types to be more strict, refine JSDoc to be clearer about the default behaviour
- Add unit tests for default compare function and make logic a bit easier to read in regards to how the slugify/urilify methods are conditionally called
- Relates to #10532
2023-06-14 18:50:43 +01:00
LB Johnston
3ce2b5f007 Chooser modal - update spinner logic on error
- When errors occur on chooser modal content, find the local progress buttons that are in loading state and update the value
- Stimulus will automatically resolve all DOM changes based on the dynamic value update
- Add unit tests for functionality
- Fixes #10498
- Regression from #9910 & #10062
2023-06-13 12:59:45 +01:00
LB Johnston
35de8a98b7 Progress Controller - add backwards compatible cancelSpinner
- support legacy cancelSpinner global for any other code that may still rely on this
- see #10498
2023-06-13 12:59:45 +01:00
LB Johnston
380e04a2fb Small typo in JSDoc - gettext
- The function created is pluralIdx (capital I), the underlying Django function is pluralidx
- Update our gettext JSDoc to align with our usage of pluralIdx (capital I)
2023-06-12 12:14:11 +01:00
Thibaud Colas
40335ba9d1 Add tests to help with maintenance of theme color tokens 2023-06-12 10:55:12 +01:00
Thibaud Colas
fb793f2b4b Remove all unused color tokens 2023-06-12 10:55:12 +01:00
Thibaud Colas
e0f3f05ffd Remove usage of color tokens which are duplicates 2023-06-12 10:55:12 +01:00
LB Johnston
aa9e9cddc7 Resolve multiple typos (spelling and grammar)
- Optimized/Customized/Catregorize -> Optimised/Customised/Categorise
- Github -> GitHub (80% were spelt with capital H, this is the way GitHub spells itself)
- GitPod -> Gitpod (most were without the capital P, Gitpod's site does not use capital P)
- Remove duplicate words (to to, the the)
- De-coupled -> decoupled
- implementors -> implementers (all other references used 'site implementers' so just aligning with the common case)
- Fix a/an usage in one case
- Fix one comment usage of ok, replace with OK
2023-05-30 21:07:37 +10:00
Thibaud Colas
6bb7e129b6 Fix color contrast of red error messages in dark mode 2023-05-25 08:36:49 +01:00
Thibaud Colas
7cb23a00d9 Simplify rich text commenting color styles for dark mode compatibility 2023-05-25 08:36:49 +01:00
Thibaud Colas
b920ced26d Fix text color for time picker options 2023-05-25 08:36:48 +01:00
Thibaud Colas
56f97890da Fix hover styles for secondary buttons in listings 2023-05-25 08:36:30 +01:00
Thibaud Colas
de12dbbd4e Remove unneeded border for footer actions 2023-05-25 08:36:30 +01:00
Thibaud Colas
ed13e0f7e8 Fix text color for selected / highlighted items in chooser modal listings 2023-05-25 08:36:30 +01:00
Thibaud Colas
cf116f90cf Fix close button appearances in choosers & dialogs 2023-05-25 08:36:30 +01:00
Thibaud Colas
13df497014 Use the correct hover color for form panel icons 2023-05-25 08:36:30 +01:00
Thibaud Colas
4d4feb2ca0 Fix switch component having a white border in dark mode 2023-05-25 08:36:30 +01:00
Thibaud Colas
aca7159b45 Re-add distinctive borders in page explorer 2023-05-25 08:36:30 +01:00
Thibaud Colas
91f2e18b22 Update focus color to a shade that works better in dark mode 2023-05-25 08:36:29 +01:00
Sage Abdullah
a29d573af8 Remove comment button on InlinePanel fields 2023-05-23 08:22:53 +01:00
sag᠎e
f8a9ddff09
Move comment notifications toggle to the comments side panel (#10437)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2023-05-22 10:56:15 +01:00
Thibaud Colas
efb75c0ae3
Ensure comment buttons always respect WAGTAILADMIN_COMMENTS_ENABLED. Fix #10406 2023-05-17 10:49:16 +01:00
Matt Westcott
8b32acb2ad add mock for updateSettings when testing TableBlock 2023-05-15 15:29:11 +01:00
Sage Abdullah
31948fc9db Fix TableBlock resize target selector
Fixes #10427.

In d51ec00ce1, the target was changed from
'[data-field] > .handsontable' to '.handsontable', as the .handsontable
element is no longer a direct descendant of the [data-field] element.

However, this means that we're marking ALL elements with .handsontable
as resize targets, which is not ideal as pretty much all elements
generated by Handsontable have that class.

The original logic would presumably only select the outermost element
with the .handsontable class, which is equal to the element with the
foo-handsontable-container ID (we store this in the containerId
variable).

Frankly, removing this selector outright would also fix the issue. That
said, let's keep this selector in anyway, to match the logic in older
releases.
2023-05-15 14:39:06 +01:00
Sage Abdullah
b42e934449 Fix incorrect check of Handsontable size options
Regression in 933a730928 introduced in 4.2.

This causes the discrepancy seen between 4.1 vs 4.2 (and later). In 4.2,
this check was broken, which means the event handler never gets added.

The combination of the event handler and the incorrect selector (fixed
in the next commit) would resize all Handsontable elements, resulting in
the bug where the table cannot be interacted with.

The commit b9f8a6b6c0 fixed another cause
of the issue, which was calling `resizeWidth(getWidth())`. The
getWidth() function should only be used to set the Handsontable's
settings, while resizeWidth should be called with '100%' as done within
the event handler.

However, seeing that the event listener is not even attached in 4.2
onwards, dispatching the resize event might not be necessary and
Handsontable might already handle this correctly. That said, let's
avoid making other changes that could potentially cause issues.

With this commit, the bug should reappear in 4.2 and later releases,
making it consistent with 4.1. The bug will be fixed in the next commit.
2023-05-15 14:37:45 +01:00
LB Johnston
c9a51968a8 Count Controller unit tests - avoid dupe body
- body element used but already appending to document.body
2023-05-12 17:09:13 +10:00
Thibaud Colas
dae099affa Prevent overlap between side panels resize grips and comments, preview 2023-05-02 13:06:03 +01:00
Thibaud Colas
418d3ec8b4 Add back minimap overflow when expanded, to display error badges 2023-05-02 13:06:03 +01:00
Sage Abdullah
f4ce346fe1 Fix side panel stuck in resize state when pointer is released outside the grip 2023-04-28 17:22:17 +01:00
sag᠎e
aa96dda15a
Fix dismissible SubMenuItem not showing the number badge when there's a new item (#10107)
Previously, we rely on the fact that the SubMenuItem itself is a dismissible. So, we decide how to show/hide the number badge based on the value for the SubMenuItem's dismissible ID on the server. However, this means that if the user has dismissed the SubMenuItem and we add new dismissible child items within it (e.g. update the ID for the 'What's new in Wagtail version' child item), the number badge will not show up. This commit changes the logic to show/hide the number badge based on whether there are any undismissed items within the SubMenuItem and whether the it has been opened or not.
2023-04-28 15:58:57 +01:00
Andy Babic
e60e4dbb43 Negate top margins on .w-field_label, so that the h3 version looks the same as regular labels 2023-04-25 16:06:08 +01:00
Andy Babic
4086c7de7a Add read_only option support to FieldPanel 2023-04-25 16:05:27 +01:00
Sage Abdullah
d8a0ff98e3 Add handsontable styles override to fix background color in dark mode 2023-04-20 11:34:09 +01:00
Sage Abdullah
2ef3b36c11 Fix comment notice text color in dark mode 2023-04-20 11:34:09 +01:00
Sage Abdullah
b9f8a6b6c0 Dispatch resize event to resize Handsontable on initialisation (#10367)
Fixes #10355
2023-04-20 09:48:58 +01:00
Thibaud Colas
b81ec15e3d
Fix comment "add" buttons being hidden in StreamField 2023-04-20 14:14:25 +07:00
Thibaud Colas
64ae146e29
Swap comment "add" button icons between default and hover 2023-04-20 14:14:24 +07:00
Thibaud Colas
5ef6af178e
Prevent reaching side panel close button while tabbing 2023-04-20 14:14:24 +07:00
Thibaud Colas
d8731c2dc6
Fix inconsistent comment button positions for fields in and out of StreamField 2023-04-20 14:14:24 +07:00
Thibaud Colas
82ea1fd975
Fix StreamField comment controls initialisation 2023-04-20 14:14:24 +07:00
sag᠎e
ed36b5b9b6
Improve customisability of the accessibility checker configuration. Fix #10137 (#10333)
* Extract userbar BaseItem.get_context_data()
* Extract Axe config into smaller attributes and methods for easier overrides
* Add TypeScript interface for WagtailAxeConfiguration
* Improve typings for userbar.ts
* Separate Axe `runOnly` and `rules` options
* Pass request object to all axe configuration methods
* Remove Axe runOnly option if it's falsy
* Add docs for customising the accessibility checker
* Use lists for Axe include and exclude selectors
* Parse JSON script when testing accessibility checker config
* Add tests for customising accessibility checker configuration

Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2023-04-20 07:46:56 +01:00
Sage Abdullah
52739832bc Fix nested SubmenuMenuItem from being hidden when expanded 2023-04-19 15:13:42 +01:00
sag᠎e
70bb15a7e1
Prevent long preview mode names from making the select element overflow the side panel. Fix #10240 (#10354) 2023-04-19 14:30:21 +01:00
Thibaud Colas
bf1f15c3d5 Update relevant color declarations to use theme-agnostic color tokens 2023-04-19 13:38:23 +01:00
Thibaud Colas
567b999548 Set up new color design tokens for light and dark themes 2023-04-19 13:38:23 +01:00
Thibaud Colas
35868364c5 Remove unused dropzone styles 2023-04-19 13:38:23 +01:00
Thibaud Colas
42600f8bec Fix Storybook rendering of body element 2023-04-19 13:38:23 +01:00
Thibaud Colas
8f797266d2 Change the width of the minimap 2023-04-18 15:58:07 +01:00
Thibaud Colas
cd867ec952 Make sure link text conveys they can be used to expand minimap 2023-04-18 15:58:07 +01:00
Thibaud Colas
fdf930e49f Implement nicer hover styles for side panel resizing 2023-04-18 15:58:07 +01:00
Thibaud Colas
6a8096bdb8 Reveal section on minimap click 2023-04-18 15:58:07 +01:00
Thibaud Colas
1c27af0618 Move the minimap to be next to side panels 2023-04-18 15:58:07 +01:00
Thibaud Colas
caf78e1ce9 Make the minimap store its state between page reloads 2023-04-18 15:58:07 +01:00
Thibaud Colas
64058647ec Update resize icon in side panels 2023-04-18 15:58:07 +01:00
Thibaud Colas
79df3f8f01 Fix minimap overlapping with footer actions on mobile 2023-04-18 15:58:07 +01:00
Thibaud Colas
78eb3d5844
Always set Sass output to expanded so CSS process is identical in dev and prod builds (#10347) 2023-04-18 15:32:05 +01:00
LB Johnston
dd2a21bad1 Allow blocking redirect in Stimulus Action controller #10035
- If values were false/empty string, it would fall back to the event value
- Instead, ensure that the custom event details OR the param can be used to override this and stop redirection
2023-04-18 15:38:41 +10:00
Karl Hobley
7f297cd019
Update comment list positioning so that they slide in/out with the sidebar (#8345) 2023-04-18 00:58:14 +01:00
Aadi jindal
ed58c692ca Allow Action controller to trigger a redirect
- Migrate site switcher to use Stimulus approach via w-action
- Closes #10035
2023-04-18 08:30:22 +10:00
Suyash Srivastava
39fa706ff2 Update ActionController with a click method
- Partial change towards #10167
2023-04-18 08:04:01 +10:00
Suyash Srivastava
e72e454ba5 Migrate autosize jQuery to stimulus controller w-autosize
- Closes #10170
2023-04-18 05:41:00 +10:00
Lovelyfin00
cc23aa6be7 Migrated initDismissibles to a Stimulus controller w-dismissible
- Closes #10166
2023-04-17 23:27:24 +10:00
LB Johnston
39dfa020fe Rename initDismissible to DismissibleController 2023-04-17 23:27:24 +10:00
Albina
935d29e2f5
Accessibility checker outlines feature (#10176)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2023-04-17 09:59:55 +01:00
Thibaud Colas
a13af28aac Fix spacing of TableBlock fields 2023-04-17 09:28:16 +01:00
Thibaud Colas
aa7ce61cef Revise alignment, position, size of StreamField/InlinePanel/RichTextField "Add" buttons 2023-04-17 09:28:16 +01:00
Thibaud Colas
9f47052150 Add target StreamField / InlinePanel nesting highlighting effect with :has 2023-04-17 09:28:16 +01:00
Thibaud Colas
f0a5a16bf6 Implement correct indentation of StreamField and InlinePanel with nesting 2023-04-17 09:28:16 +01:00
Thibaud Colas
859d59b765 Implement vertical alignment of field inputs and panels 2023-04-17 09:28:16 +01:00
Thibaud Colas
9f23b19b17 Rework type scale according to latest designs 2023-04-17 09:28:16 +01:00
Thibaud Colas
e0f9014c91 Add missing w-field__help class to other field markup implementations 2023-04-17 09:28:16 +01:00
Thibaud Colas
b307549e3c Use an SVG icon for rich text horizontal line 2023-04-14 08:38:01 +01:00
Thibaud Colas
6866293d4e Styling tweaks for new icons 2023-04-14 08:38:01 +01:00
Thibaud Colas
93732690a3 Update icon visuals to FontAwesome 6, with deprecation warnings for removed icons 2023-04-14 08:38:01 +01:00
Hanoon
70a6230a65 Migrate submit translation bulk toggle to Stimulus Controller (w-bulk)
- Closes #10247
- adding BulkController files and removing {% block extra_js %} from submit_translation.html
- add unit tests for new controller
- partial work on CSP compliance #7053
2023-04-13 22:28:17 +10:00
Thibaud Colas
5ffb48a015 Convert workflow and page listing icons to SVG 2023-04-12 11:51:00 +01:00
Thibaud Colas
b3ecfabf64 Earmark icon font setup scheduled for deletion in Wagtail 6.0 2023-04-12 11:51:00 +01:00
LB Johnston
1532eedf20 Ensure datetimepicker widget overlay shows over modals
- Update to the exact same z-index as the modal
- Fixes #3604
2023-04-01 01:00:22 +01:00
Thibaud Colas
f82ff1e22c
Move help text above all form fields (#10302)
* Move all help text above fields
* Adjust vertical spacing of form fields and panels
* Move the page title’s help text below the field
* Release notes
2023-03-31 17:05:20 +01:00
Thibaud Colas
e1861978eb Always display StreamField "Add" buttons 2023-03-30 00:14:03 +01:00
Thibaud Colas
6b32591c85 Always show StreamField and InlinePanel nesting guide lines 2023-03-30 00:14:03 +01:00
Thibaud Colas
9855382a62 Always show StreamField and InlinePanel block actions 2023-03-30 00:14:03 +01:00
Thibaud Colas
978d62122c Convert form submissions listings to use the same ordering icons as other listings 2023-03-29 13:20:23 +01:00
Thibaud Colas
e8ead77b7a Remove dead styles from legacy dropdown 2023-03-29 13:20:23 +01:00
Thibaud Colas
620f4ee11f Convert add multiple thumbnail icon to SVG 2023-03-29 13:20:23 +01:00
Thibaud Colas
de0f876744 Convert "after" ordering icons to SVG 2023-03-29 13:20:23 +01:00
Thibaud Colas
531f71a924 Convert jQuery Datetimepicker to SVG icons 2023-03-29 13:20:23 +01:00
Thibaud Colas
6adc13abf2 Convert error messages to SVG icons 2023-03-29 13:20:23 +01:00
Thibaud Colas
c2dc689fc9 Convert privacy switch to SVG icons 2023-03-29 13:20:23 +01:00
Thibaud Colas
1d3d04972f Remove unused help-inverse icon 2023-03-29 13:20:23 +01:00
Thibaud Colas
593e21ca4f Remove unneeded icon-help definitions 2023-03-29 13:20:23 +01:00
mansi0829
433d70d3bf Adopt w-status instead of status for classes
- Fixes #10244
2023-03-29 08:07:47 +10:00
LB Johnston
c7ad413e1f userbar tests - fix small eslint warning
- variable length warning
2023-03-29 07:34:07 +10:00