0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-25 13:10:14 +01:00
Commit Graph

1246 Commits

Author SHA1 Message Date
Matt Westcott
61dd1abba3 Update client-side block code to accept simplified JSON error structures
All setError methods now accept an instance of the error dict returned by get_error_json_data. Since this is consistent across all ValidationError subclasses, there is no longer any need for the exception type to match the block type (unless you care about propagating child block errors).

Fixes #5663
2023-02-23 11:47:34 +00:00
Matt Westcott
968b86287b Allow StructBlock to have non-block validation errors
Part of #7250. Documentation to follow when the rest of the updates are in place.
2023-02-23 11:47:34 +00:00
Lovelyfin00
2a9d01b849 Migrate initSlugCleaning to Stimulus SlugController
- Closes #10086
2023-02-21 08:57:20 +10:00
LB Johnston
8c006a16c9 Minor clean up items on ProgressController
- Relates to #10062
2023-02-17 13:40:35 +10:00
Thibaud Colas
4bea98d981 Convert userbar implementation to TypeScript 2023-02-17 01:13:51 +00:00
Albina Starykova
71cbf9087a Rename userbar.js to userbar.ts 2023-02-17 01:13:51 +00:00
Fabien Le Frapper
065df6064a
Remove unneeded float styles on 404 page (#8914)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2023-02-17 00:06:57 +00:00
Albina
afff60e3b9
Add unit tests for MinimapItem (#10083)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2023-02-16 23:51:00 +00:00
Lovelyfin00
ab05f7dd3c Rename AutoFieldController to SubmitController
- Closes #10092
2023-02-16 07:23:03 +10:00
LB Johnston
3f72b3ebf4 Prettier/Eslint - ignore storybook build folder - see #10089 2023-02-15 23:42:13 +10:00
Thibaud Colas
0246d3a6f4 Fix Storybook not supporting TypeScript declare class fields 2023-02-15 22:52:49 +10:00
Thibaud Colas
fa1cbfbe98 Fix Storybook pattern library proxying in Node 18 2023-02-15 22:52:49 +10:00
Thibaud Colas
a517ee6dc9 Fix Storybook stories intialisation broken due to script config dependencies 2023-02-15 22:52:49 +10:00
LB Johnston
38d678eca3 ActionController - add JSDoc note & type
- Relates to #9844
2023-02-15 21:41:26 +10:00
Lovelyfin00
c52074250b Refine Stimulus progress controller (button-longrunning)
- use milliseconds instead of seconds for duration
- allow `em` to be used without target attribute
- added connect method for labelTarget
- closes #8232
- closes #9910
2023-02-14 23:19:42 +10:00
Albina Starykova
6d007fc623 Add unit tests for collapseAll component 2023-02-14 20:39:27 +10:00
sag᠎e
d46d724d31
Fix side panel resize direction on RTL languages. Fix #9916 (#10044)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>

Fixes https://github.com/wagtail/wagtail/issues/9916
2023-02-14 10:38:57 +00:00
Albina
38ea027d04
Implement new simplified userbar designs (#9989)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2023-02-13 09:55:20 +00:00
Sage Abdullah
cf269272be Add ActionMenuItem sidebar component
This represents a button wrapped in a form element with customisable action and method attributes
2023-02-10 14:41:58 +00:00
Lovelyfin00
fd9eed97d7 Converted button-longrunning to a Stimulus Controller
- implemented afterLoad in Stimulus button-longrunning to support non-adopted data attributes
- Partial completed #9910
2023-02-09 09:44:18 +10:00
Matt Westcott
1c2d828e7b Remove deprecated createXChooser JS functions 2023-02-08 14:25:09 +00:00
Lovelyfin00
b336536015 User - Reimplement Gravatar switching without JS
- Resolves #9972
- Avoids inline script for a solution that can be CSS/HTML only
- Use translatable alt text for when the default avatar is selected
- Relates to #1288 & #5247 (CSP compliance)
2023-02-07 21:18:31 +10:00
Aadi jindal
1ffa497886 fixed Uncaught TypeError: Cannot read properties of undefined (reading 'getTextLabel') in admin and missing stream blocks. (#10023)
Fixes #9990
2023-02-06 19:37:11 +00:00
4the4ryushin
e10dc142de
Prevent account name from overflowing the sidebar 2023-02-02 11:08:01 +00:00
Albina Starykova
2afeca2875
Refactor accessibility checker userbar item
- Move dialog template code from the userbar base template to the
  accessibility item template
- Use fragment for the total results count in the header
- Wrap dialog header in a div to allow styling it separately from the
  rest of the dialog content
- Get selector from the first element of axe violation's node.target
2023-01-27 12:31:31 +00:00
Thibaud Colas
d4544ec9ee Re-enable strictPropertyInitialization in tsconfig
- Use declare for existing Stimulus controllers
- First enabled in #9761 & then disabled in #9818
2023-01-27 11:33:49 +10:00
Sage Abdullah
d4b69cbfc1 Fix header search when q URL param is not present 2023-01-19 22:07:50 +00:00
Thibaud Colas
0fc8df059a Fix positioning of StreamField and rich text "add" toggle buttons 2023-01-19 16:57:24 +00:00
Thibaud Colas
8b231d19c6 Replace StreamField block picker with new ComboBox 2023-01-19 16:57:24 +00:00
Thibaud Colas
a176616cda Use new ComboBox component in rich text 2023-01-19 16:57:24 +00:00
Thibaud Colas
3a7e489cdf Add new ComboBox React component based on downshift 2023-01-19 16:57:24 +00:00
Albina
a3f10acae1
Userbar & accessibility checker UI improvements (#9913)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2023-01-19 16:06:11 +00:00
Sage Abdullah
711d592052
Move pages/workflow_history templates to shared 2023-01-19 14:06:11 +00:00
Thibaud Colas
e33cdbf8db
Set up CSS LTR-RTL direction variable and fix incorrect transforms (#9914). Fix #9800
- Fix Draftail block toolbar trigger overlay in RTL mode
- Fix switch component rendering in RTL mode
- Fix panel header positioning in RTL mode
- Remove unused 404 styles
- Fix comments positioning in RTL mode
- Fix sidebar sub-menus transition direction
- Fix form side panels in RTL mode
- Fix minimap positioning in RTL mode
- Fix Draftail tooltips positioning in RTL mode
- Fix page explorer transition direction in RTL mode
- Set up CSS LTR-RTL direction variable
2023-01-19 12:06:43 +00:00
Thibaud Colas
1b7f92351f Improve page editor side panel closing animation 2023-01-19 11:19:25 +00:00
Albina
55d04366f7
Axe accessibility checker integration with floating dialog component (#9899)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2023-01-18 15:59:44 +00:00
Matt Westcott
4468b55d2d Enforce max_num on MultipleChooserPanel
Enable / disable the open-modal button on reaching the limit, as we do for InlinePanel's standard add button; and when handling the response from the modal, stop adding new items when max_num is reached
2023-01-18 14:31:08 +00:00
Matt Westcott
2574204b27 Make title into a label rather than a link when in multiple choice mode 2023-01-18 14:31:08 +00:00
Matt Westcott
32f8c78b58 Enable / disable submit button once a selection is made 2023-01-18 14:31:08 +00:00
Matt Westcott
f4125d04e0 Import ChooserFactory classes in telepath endpoint files, rather than relying on them existing in the global scope 2023-01-18 14:31:08 +00:00
Matt Westcott
89179da1fd Eliminate jquery from MultipleChooserPanel 2023-01-18 14:31:08 +00:00
Matt Westcott
af168d62f8 Implement multiple chooser UI on page chooser modal 2023-01-18 14:31:08 +00:00
Matt Westcott
78b88a605a Populate MultipleChooserPanel from modal results 2023-01-18 14:31:08 +00:00
Matt Westcott
67ff655111 Add mechanism for retrieving an existing widget instance from ChooserFactory 2023-01-18 14:31:08 +00:00
Matt Westcott
d534567f81 Add checkboxes for selecting multiple items 2023-01-18 14:31:08 +00:00
Matt Westcott
e94e268ecb Recognise 'multiple' option in ChooserModal as a URL parameter to pass to the modal view
the modal view doesn't do anything with it yet
2023-01-18 14:31:08 +00:00
Matt Westcott
c66b793957 Add JS initialiser / open-modal behaviour for MultipleChooserPanel 2023-01-18 14:31:08 +00:00
Matt Westcott
d56c25704b Add openModal method to ChooserFactory 2023-01-18 14:31:08 +00:00
Matt Westcott
d70bf142f3 Pass modalUrl in opts dict as standard, and use it in preference to the data-chooser-url attribute on the HTML element
We keep data-chooser-url in the HTML output, and use it as a fallback in the JS - for backwards compatibility with existing BaseChooser subclasses that don't pass an options dict (such as AdminTaskChooser, which overrides render_js_init)
2023-01-18 14:31:08 +00:00
Matt Westcott
8fe23a4f61 Standardise on camel case for opts dictionary keys
At this point we've been turning the 'opts' dict from a private API specific to PageChooser, that more or less transparently passes options on to the modal as URL query parameters, into a convention shared across all chooser widgets where the question of "will this option become a URL parameter" is an internal implementation detail. Since this is notionally a bundle of JS variables rather than a bundle of URL params, we should take this opportunity to consistently adopt camel case, before this pattern becomes widespread in third-party code and ends up as a mishmash of camel-case and snake-case.
2023-01-18 14:31:08 +00:00