Sam
a393ea8091
Fix dialog component's message to have rounded corners at the top side
...
Fixes #10177
2023-03-07 18:36:02 +00:00
Matt Westcott
486a49797b
Refactor ListBlockValidationError to use a dict for block_errors
2023-03-01 11:47:18 +01:00
4the4ryushin
9537547b46
Migrate initErrorDetection to a Stimulus Controller w-count
...
- Used for tabs error counts
- Fixes #10090
2023-02-27 23:11:19 +10:00
Matt Westcott
c66b86b756
Move repeated error message handling code into an include
2023-02-23 11:47:34 +00:00
Matt Westcott
ff70382ebb
Remove obsolete client-side BlockValidationError classes and telepath adapters
2023-02-23 11:47:34 +00:00
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
sage
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
Matt Westcott
3dc3d37bbf
Move FooChooserFactory definitions into the widget JS endpoints rather than the telepath ones
...
This makes it cleaner for FooChooser and FooChooserFactory to share definitions (e.g. modal handler classes)
2023-01-18 14:31:08 +00:00
Matt Westcott
ed8d999887
Use the base ChooserFactory class for PageChooserFactory
2023-01-18 14:31:08 +00:00
Matt Westcott
536d1096c2
Change PageChooser widget constructor to accept parent_id
as part of the opts dict
...
The old signature is still accepted for backwards compatibility.
This then matches the signature of the other chooser widget JS classes, allowing PageChooserFactory to extend the generic ChooserFactory.
2023-01-18 14:31:08 +00:00
Matt Westcott
dcba3a9194
Consistently pass an opts dict to the constructors of Chooser and ChooserFactory
2023-01-18 14:31:07 +00:00
Matt Westcott
f238d659ee
Move PageChooserFactory to its own JS endpoint
...
This will allow us to refactor it, including adding class-level references to window.PageChooser and window.PageChooserModal as necessary, without dealing with the possibility of telepath/widgets.js being imported before the includes that define those.
2023-01-18 14:31:07 +00:00
Matt Westcott
7a1ae9f16b
Eliminate jQuery from PageChooserFactory.render
...
This matches the implementation in components/ChooserWidget. This change breaks the tests that pass a jQuery collection object rather than a DOM element, but that was never valid in the first place as per https://docs.wagtail.org/en/stable/reference/streamfield/widget_api.html - fix the tests accordingly.
2023-01-18 14:31:07 +00:00
Matt Westcott
947a7883f9
Add a higher-level API for chooser modals
...
Previously, anything invoking the chooser modal needed to make its own call to ModalWorkflow, which meant it needed to import the corresponding 'onloadHandlers' dict, know the appropriate chosen response identifier to listen to, and know how to modify the chooser URL to pass parameters (if applicable). This would mean a lot of duplicated logic if there were multiple places where the modal is invoked.
Here we introduce a ChooserModal base class which encapsulates those details - a caller just needs to instantiate it with the base URL, and call `open` on it to open the modal (passing an options dict and a response callback).
2023-01-18 14:31:07 +00:00
Lovelyfin00
b929694203
Migrate lock/unlock actions to w-action controller
...
- Revise 'redirect' from a string to a 'continue' boolean that defaults to false
- Use 'continue=true' for cases where we do not want to create a next param on submit that takes the user back to the current page
- Fixes #9815
2023-01-18 19:00:47 +10:00
Lovelyfin00
9e9a84c953
Pull out loadiconSprite function from inline script
...
- wrote test for initIconSpirite
- changed from xmlhttprequest to fetch
- prepared a domReady util
- Fixes #9811
2023-01-18 08:04:55 +10:00
Thibaud Colas
34f6bab633
Rich text toolbar refinements from usability testing. Fix #9281 ( #9905 )
2023-01-17 17:21:45 +00:00
Thibaud Colas
b02f08d8d9
Fix JS error in dirty form checks from NodeList - array API differences ( #9906 )
2023-01-17 13:43:55 +00:00
sage
c8981416ef
Load Axe configuration and error messages defined in Python ( #9898 )
...
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2023-01-16 13:42:09 +00:00
Lovelyfin00
004faac53c
Migrate workflow and workflow tasks enable action to a Stimulus controller ( #9844 )
...
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2023-01-12 21:55:40 +00:00
Albina
1e9f580b8c
Add base Axe accessibility checker integration within userbar, with error count ( #9850 )
...
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2023-01-12 12:21:58 +00:00
Thibaud Colas
1884447a6b
Slim header design fixes
2023-01-12 09:51:51 +00:00
Thibaud Colas
90ffcb05b0
Sidebar spacing fix
2023-01-12 09:51:51 +00:00
Thibaud Colas
eed32d01a6
Generic header spacing fixes
2023-01-12 09:51:51 +00:00
Thibaud Colas
e056a70083
Dashboard header design fixes
2023-01-12 09:51:51 +00:00
LB Johnston
c8dca0a7f2
Migrate upgrade notification to Stimulus (UpgradeController)
2023-01-12 09:26:31 +10:00
LB Johnston
e8fc3d9cf0
Rename initUpgradeNotification to UpgradeController
2023-01-12 09:26:31 +10:00
GLEF1X
5ee706ca46
fix JS error on enableDirtyFormCheck
2023-01-12 06:40:48 +10:00
Matt Westcott
03aa7a8f66
Remove unused React / ReactDOM imports from wagtailadmin.js
...
These are no longer required as of d036f10e61
and are raising eslint warnings.
2023-01-11 13:33:46 +00:00
Lovelyfin00
554311752b
Eslint - Removed legacyCode rules
...
- Fix any issues in files being ignored
- Fixed linting errors where appropriate
- Include some rules being ignored in the src/components folder
- Closes #8731
2023-01-11 22:55:06 +10:00
Thibaud Colas
0513a78fb5
Refactor Wagtail userbar to use core.css stylesheet like other components
2023-01-11 20:20:15 +10:00
Lovelyfin00
9ccf30ed19
Convert initSkipLink to Stimulus and write unit tests
2023-01-11 08:42:34 +10:00
LB Johnston
95e0bcc28a
Rename initSkipLink files to SkipLinkController
2023-01-11 08:42:34 +10:00
Thibaud Colas
d036f10e61
Remove react-axe package usage ( #9865 )
2023-01-10 11:12:19 +00:00
Albina
a37c4bab3d
Re-implement design system colors so HSL values exactly match the desired RGB. Fix #9571 ( #9856 )
...
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
Fixes https://github.com/wagtail/wagtail/issues/9571
2023-01-10 08:31:51 +00:00
Thibaud Colas
4230630ceb
Update focus outline color ( #9839 )
2023-01-10 00:23:56 +00:00
Matt Westcott
99eaef6ee6
Remove resize handles from autosize text areas ( #9713 )
...
Fixes #7210 , replacing #9651 as per https://github.com/wagtail/wagtail/issues/7210#issuecomment-1325707942 . AdminAutoHeightTextInput now inserts a w-field__autosize classname which explicitly disables the resizing handle, leaving resizing fully in control of the jquery.autosize plugin.
2023-01-05 14:13:29 +00:00
dependabot[bot]
e04dd2cb1a
Bump json5 from 2.2.0 to 2.2.3 in /client/tests/integration
...
Bumps [json5](https://github.com/json5/json5 ) from 2.2.0 to 2.2.3.
- [Release notes](https://github.com/json5/json5/releases )
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md )
- [Commits](https://github.com/json5/json5/compare/v2.2.0...v2.2.3 )
---
updated-dependencies:
- dependency-name: json5
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
2023-01-05 12:04:42 +00:00
Thibaud Colas
1de29709de
Remove unused search-bar and button-filter styles ( #9812 )
...
- Remove unneeded search-bar class from templates
- Remove _file_field_as_li template with unneeded overrides
- Remove unused search-bar styles
2023-01-03 09:39:21 +00:00
Albina
5cf621660c
Refactor Wagtail userbar as a web component ( #9816 )
...
* Add a border around the userbar menu in Windows high-contrast mode so it can be identified
* Make sure browser font resizing applies to the userbar
* Switch userbar to initialise a Web Component to avoid styling clashes
* Refactor userbar stylesheets to use the same CSS loading as the rest of the admin
2022-12-27 16:55:19 +00:00
Albina
5eb2064574
Close the userbar when clicking its toggle. Fix #9342 ( #9808 )
...
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
Fixes https://github.com/wagtail/wagtail/issues/9342
2022-12-27 15:36:05 +00:00
LB Johnston
86f8d2b7ad
Add AutoFieldController
...
- used to provide the ability for an input element to submit its form once changed or interacted with
2022-12-19 14:00:11 +00:00
LB Johnston
ede189ada5
Set up initial stimulus application integration
2022-12-19 14:00:11 +00:00
LB Johnston
70681ec2bb
Fix Draftail unit test failure
2022-12-19 14:00:11 +00:00
Lovelyfin00
2695a53265
Clean up unit tests & super usage in JS
...
- fixed the prototype error in table.test.js and also the build error
- added super to constructor class due to the error shows during testing
2022-12-11 15:32:47 +10:00
Lovelyfin00
6997ff1d68
Use browser URLSearchParams to determine q param (core.js)
...
- Fixes #9765
- removed the function for getURLParam function and replaced with URLSearchParam method
- already used in many other places in the same file
2022-12-10 07:19:48 +10:00
LB Johnston
734932c0c4
eslint - add fix for linting error in utils/action
...
- prefer-default-last was the only issue which is easily fixed in utils/action
- move global ignoring of utils folder
- add basic unit tests for actions.ts
2022-12-10 07:05:39 +10:00
LB Johnston
1f9a9c50bf
move identity
util to shared utils file
2022-12-10 07:05:39 +10:00
Thibaud Colas
0bf26a73c1
Fix horizontal positioning of rich text inline toolbar
2022-12-10 06:56:54 +10:00
Sage Abdullah
7323973673
Move page-locked class in _tabs.scss to content-locked in _panel.scss
...
This allows locking even if the panels do not use TabbedInterface.
2022-12-09 17:46:54 +00:00
LB (Ben Johnston)
4e66afad0a
Eslint - disable rule class-methods-use-this ( #9482 )
2022-12-09 07:33:28 +00:00
LB (Ben Johnston)
a3fa3b86be
Eslint - disable rule max-classes-per-file ( #9483 )
2022-12-09 07:14:49 +00:00
Matt Westcott
2335d28b7c
Move InlinePanel child initialisation into the InlinePanel constructor
2022-12-08 07:37:32 +10:00
Matt Westcott
3c3bb68a9b
Make ExpandingFormset responsible for managing the opts dict again
...
With the custom onAdd logic eliminated, it is now safe for ExpandingFormset and InlinePanel to work from the same opts dict
2022-12-08 07:37:32 +10:00
Matt Westcott
54a1901c69
move InlinePanel onAdd logic into an overridden addForm method
2022-12-08 07:37:32 +10:00
Matt Westcott
100727eb13
make InlinePanel a subclass of ExpandingFormset
2022-12-08 07:37:32 +10:00
Matt Westcott
c632df8dee
Allow skipping onAdd/onInit callbacks when adding a new form to ExpandingFormset
...
This will help us to make InlinePanel a subclass of ExpandingFormset, since we'll want InlinePanel to extend the addForm method and only call the callbacks after it's done its thing.
Also rename this.opts in ExpandingFormset, so that we can have a separate set of options passed to ExpandingFormset while we're refactoring.
2022-12-08 07:37:32 +10:00
Matt Westcott
24a8a459b4
Fix misleading use of formCount in form 'add' logic
2022-12-08 07:37:32 +10:00
Matt Westcott
9f3c0b0492
Add an addForm API endpoint to InlinePanel
2022-12-08 07:37:32 +10:00
Matt Westcott
ef9d56723d
Make InlinePanel into a proper JS component class
2022-12-08 07:37:32 +10:00
Matt Westcott
393c1b3374
Move InlinePanel include module to components
2022-12-08 07:37:32 +10:00
Matt Westcott
89099d9a19
Import the ExpandingFormset class for InlinePanel instead of calling window.buildExpandingFormset
...
This eliminates the dependency on expanding-formset.js, and avoids having to mock buildExpandingFormset when testing InlinePanel
2022-12-03 15:53:48 +10:00
Matt Westcott
2834cd5ad5
Move ExpandingFormset tests to the component module
2022-12-03 15:53:48 +10:00
Matt Westcott
3b4cb3cafe
Convert buildExpandingFormset into a component class
2022-12-03 15:53:48 +10:00
Sage Abdullah
a5b372e47a
Remove grey background from .content-wrapper
...
- Fixes #9667
2022-11-30 07:57:38 +10:00
dependabot[bot]
ccf6ec15f7
Bump minimatch from 3.0.4 to 3.1.2 in /client/tests/integration
...
Bumps [minimatch](https://github.com/isaacs/minimatch ) from 3.0.4 to 3.1.2.
- [Release notes](https://github.com/isaacs/minimatch/releases )
- [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2 )
---
updated-dependencies:
- dependency-name: minimatch
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-11-29 07:57:41 +10:00
Thibaud Colas
bf217a54fb
Use the correct padding for autocomplete block picker
2022-11-28 11:44:22 +00:00
Loic Teixeira
5c1c2c8f53
Enforce the use of a single string formatting mechanism for translation source strings
...
Close #9377
2022-11-26 11:00:05 +01:00
Thibaud Colas
713636a00e
Always show the page editor title field’s border when the field is empty. Fix #9318 ( #9719 )
2022-11-25 17:16:05 +00:00
4the4ryushin
a03bbba347
Fix pluralisation for Tab error count shown to screen readers
...
Fixes #9521
2022-11-23 07:52:24 +10:00
Lovelyfin00
731f96e9a8
Removed no plus plus eslint rule and fixed errors from linting
...
- Relates to #8731
2022-11-23 07:39:35 +10:00
Theresa-o
af1f1715a3
Refine the grid position of uploaded images
...
Closes #9674
Ensure that when there are less images to fill up the columns, the columns still have the same max width
2022-11-20 21:18:23 +10:00
Ivy
4fbccd1c88
Support text resizing in workflow steps cards ( #9525 )
...
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2022-11-18 23:23:39 +00:00
Theresa-o
8d30e716f7
Move DateField, DateTimeField, TimeField comment buttons to be right next to the fields. Fix #9543 ( #9549 )
...
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2022-11-18 23:07:24 +00:00
Coen van der Kamp
b91ed2cce4
Allow button labels to wrap onto two lines in dropdown buttons. Fix #9613 ( #9643 )
...
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2022-11-17 16:37:21 +00:00
sage
8cd8769eb6
Use consistent heading styles on top-level fields in the page editor ( #9659 )
...
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2022-11-17 16:23:38 +00:00
sage
dd0d2c4b88
Make it possible to resize the page editor’s side panels ( #9276 )
...
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2022-11-17 15:53:15 +00:00
Yekasumah
119f288a3c
Added unit tests & JSDoc to initDissmisibles
...
- Fixes #9495
2022-11-17 18:21:25 +10:00
jacobtoppm
34c37bc914
Stop comments being added on inline panels
...
- They do not have stable ids when models are not persisted to the database
- Fixes #9641
This feature should was enabled unintentionally. It would be great to add the ability to comment on child models in the future, but just like ListBlock before the addition of ids, we need a stable way to calculate the id to attach a comment before we can do this. This is a problem we'll need to solve - potentially via a uuid field on the model to identify models that haven't yet been saved to the database outside revisions.
2022-11-17 07:55:30 +10:00
Sage Abdullah
87e868d315
Move preview_settings to wagtail_config template tag
2022-11-11 14:18:12 +00:00
Sage Abdullah
ff8a33733c
Use CSRF_HEADER_NAME from global config for preview panel DELETE request
2022-11-11 14:18:12 +00:00
xomcodes
4eb720b6c6
Move initTagField from core.js to initTagField.ts
...
- Add JSDoc & unit tests for pulled out includes file
- Fixes #9496
2022-11-11 08:08:39 +10:00
Thibaud Colas
77a63c224f
Make sure minimap error indicators follow the minimap scrolling ( #9624 )
2022-11-10 08:31:00 +00:00
FatumaA
d4792785b8
Refactor - convert initTooltips to TypeScript, add JSDoc & tests
...
- Fixes #9505
2022-11-10 07:34:43 +10:00
Seremba
dcd8148dfe
Style default secondary buttons with icons
...
- Style secondary button with icon to match according to Wagtail Design System
- Fixes #9198
2022-11-10 07:24:27 +10:00
Albina Starykova
d36790640e
Remove unnecessary box-sizing: border-box declarations
...
- box-sizing: border-box added to all elements globally in #8921
- Relates to #9031
2022-11-10 06:52:09 +10:00
Lovelyfin00
933a730928
Removed no-prototype-builtins rule from eslintrc and fixed minor additional issues
2022-11-10 06:40:40 +10:00
Lovelyfin00
67c7f82de5
Create a util hasOwn
to simplify object property checks
2022-11-10 06:40:40 +10:00
mohammadareeb95
66f2512ef5
Ensure links that have .nolink (current link) can be seen in WHCM
...
- Fixes #9578
2022-11-09 22:55:03 +10:00
AdeboyeJuliet
c225172c1f
fix:Tippy tooltip arrows render as rectangles in WHCM
...
- Fixes #8835
2022-11-09 22:12:57 +10:00
Albina Starykova
b1c4ca5489
Fix tag field styles in WHCM
...
- Fixes #9529
2022-11-09 21:45:50 +10:00
AdeboyeJuliet
f41a219697
Migrate initSkipLink to typescript, add unit tests & JSDOC
...
- Additionally clean up the exports and imports to be sorted & align with named export usage
- Fixes #9541
2022-11-09 21:25:53 +10:00
Dev-Yusuf
c2ba84e825
Resolved the skip link contrast issues to meet requirements
...
- Update client/scss/components/_skiplink.scss
- fixes #9515
2022-11-09 21:17:37 +10:00
LB Johnston
55f5cad7f2
Ensure the ngettext (JS) util emulates the Django global if not present
...
Follow up from #9617
2022-11-08 09:09:45 +10:00
Lovelyfin00
0000ed88f7
removed unused styles from utility.legacy.scss file and clean up
...
- `divider-before` not used
- add w-list-none to Tailwind utility classes
- remove now unused unlist class
- relates to #8947
2022-11-08 08:45:23 +10:00
LB Johnston
da36c3994b
Rename test file - #9593
2022-11-08 08:38:56 +10:00
Lovelyfin00
b1c1618c9b
Migrated initButtonSelects from core.js to own includes file
...
- removed initButtonSelects from core.js , migrate to Typescript & and wrote test for it
- Fixes #9494
2022-11-08 08:28:59 +10:00
Matt Westcott
5703bc1133
Fix disabled style on StreamField add button
...
Fixes #9512
An `opacity: 0.2` style is defined for the disabled button state, but the `opacity: 1` hover style takes precedence over it. As a result, the only time it kicks in - on media with hover support - is when the StreamField does NOT have hover / focus, which would ordinarily be the time when the button is hidden entirely.
Fix this by adding hover states to the `&[disabled]` case, to match the order of precedence for the normal button state.
2022-11-07 12:24:54 +00:00
Theresa-o
0ebdd51882
Fix help block <a> to meet colour contrast guidelines
...
- Fixes #9569
2022-11-07 19:56:36 +10:00
LB Johnston
acd412e8f3
Update gettext unit tests to clearly test their functionality
...
- instead of mocking the Django global functions, test each function's export that it correctly uses the global if present or test the default behaviour
2022-11-07 19:51:13 +10:00
LB Johnston
e609f15a93
Ignore test files from extract-translatable-strings
...
Avoid unit test translation usage from being added to translation strings
2022-11-07 19:51:13 +10:00
LB (Ben Johnston)
f6a35268c7
cleanup - remove commented out scss in _listing.scss ( #9619 )
2022-11-06 23:27:05 +01:00
Yekasumah
aeae816b27
Fix comments notice background overflow ( #9567 )
2022-11-04 18:24:13 -04:00
Jordan-Rob
9c29e6a12e
Remove duplicate code to escape HTML in JavaScript
...
* added an import for escapeHtml from utils/text and added back window.escapeHtml = escapeHtml
* Fixes #9492
2022-11-02 06:41:14 +10:00
Thibaud Colas
b7c04ed960
Avoid force-scrolling the minimap when unneeded
2022-10-31 23:09:58 +00:00
Thibaud Colas
3e2cbea51a
Ignore "collapse all" for minimap hover reveal
2022-10-31 23:09:58 +00:00
Thibaud Colas
769d3e2340
Add animated transition for minimap reveal
2022-10-31 23:09:58 +00:00
Thibaud Colas
8679d29233
Fix minimap toggle button remaining visible when closing
2022-10-31 23:09:58 +00:00
Thibaud Colas
24f432dfb4
Fix legacy dropdown buttons using a different size from toggle. Fix #9476 ( #9551 )
2022-10-31 16:06:33 +00:00
Matt Westcott
d8ff3cbcf2
Fix JS string extraction for ngettext
...
The definition for ngettext in extract-translatable-strings had incorrect argument positions, and as a result strings translated with ngettext were missed from the .po file.
2022-10-28 11:30:19 +01:00
Matt Westcott
b848254873
Apply correct pluralisation to minimap error count
...
Fixes #9497
2022-10-28 07:20:03 +10:00
Sage Abdullah
78a7652f6b
Move scheduled publishing dialog root to editor form element
2022-10-27 17:39:51 +01:00
Lovelyfin00 (Nutjob)
bd62927958
Ensure logo shows correctly on log in page in Windows high contrast
...
- Added a class to the logo image and also added forced mode to the logo image class
- Fixes #9428
2022-10-27 08:29:09 +10:00
xomcodes
3dcde23e02
Fixed auth form field padding (Log in / password reset)
...
- Fixes #9440
2022-10-27 08:01:08 +10:00
Mary Ojo
aea9f14558
Fix status tag font-size units for proper resizing ( #9382 )
2022-10-23 13:56:55 -04:00
Albina Starykova
bd13f567fe
Ensure visual consistency between buttons and links as buttons in WHCM
...
- Fix secondary-button disabled state
- Fix legacy dropdown in WHCM
- Fixes #9078
2022-10-21 08:35:12 +10:00
Lovelyfin00 (Nutjob)
91de7a126d
Ensure authentication forms have a visible border in Windows high contrast mode
...
- fixes #9350
2022-10-20 23:01:30 +10:00
Lovelyfin00
86437515a3
Make sure workflow timeline icons are visible in high-contrast mode. Fix #9349 ( #9383 )
...
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2022-10-19 21:35:05 +01:00
Thibaud Colas
52e55a7c46
Implement new minimap component for forms with side panels. Fix #8673 ( #9345 )
2022-10-17 18:52:09 +01:00
Sage Abdullah
0a0e07abc0
Add help menu with dismissible badges
...
By default, the menu contains a link to a blog post
showcasing features in Wagtail 4.1 and a link to the editor guide.
We need to update the links and labels manually in the next release.
2022-10-17 17:39:37 +01:00
Sage Abdullah
28ed884581
Add WhatsNewInWagtailVersionPanel to home dashboard
...
Can be disabled via WAGTAIL_ENABLE_WHATS_NEW_BANNER setting.
We need to update the link and content in the next release if necessary.
2022-10-17 17:39:37 +01:00
Sage Abdullah
b115e03d28
Add view and client script for Dismissibles
2022-10-17 17:39:37 +01:00
Sage Abdullah
34a79d36ad
Add attrs to base MenuItem class and default it to empty dict
2022-10-17 17:39:37 +01:00
Sam Moran
45f0c73ff4
Update version.js to accept dev build version format
...
- fixes #9184
2022-10-17 22:06:08 +10:00
Steve Stein
5112c0eaa8
Improve side panels’ resizing in page editor and listings, and breadcrumbs alignment. Fix #9036 ( #9090 )
...
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2022-10-17 12:18:02 +01:00
Matt Westcott
c165814311
Fix focus handling when blocks are inserted with animation
...
Calling focus() on a block immediately after inserting it with animate:true has been broken since d3e58f7908
, since the field only becomes focusable once the animation begins. Address this by adding a new 'focus' option to the BaseSequenceChild constructor and related insert methods, to indicate that the block should be focused as soon as it becomes available.
2022-10-14 18:36:08 +01:00
Matt Westcott
e0266c276a
Don't split block when inserting a new block at the end
2022-10-14 18:34:05 +01:00
Matt Westcott
6885eedb52
Pass widget instance to command classes
2022-10-14 18:34:05 +01:00
Matt Westcott
e635daf5a3
Move split command into its own class
2022-10-14 18:34:05 +01:00
Matt Westcott
afc0c6d0a4
Move logic for Draftail block insertion commands into its own class
2022-10-14 18:34:05 +01:00
Matt Westcott
0de901014b
Remove misleading dynamic text for split command
...
The splitter always splits into 2 - the number of blocks in the content is not relevant.
2022-10-14 18:34:05 +01:00
Matt Westcott
80f17710d1
Move getFullOptions into a method on BoundDraftailWidget
2022-10-14 18:34:05 +01:00
Matt Westcott
813c1fa74b
Make boundDraftail into a proper class
2022-10-14 18:34:05 +01:00
Thibaud Colas
a005f66475
Make sure chooser buttons can be revealed for all widgets. Fix #9260
2022-10-14 14:32:02 +01:00
sage
01dbababa9
Remember last opened side panel in the editor on page load ( #9269 )
...
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2022-10-14 14:27:59 +01:00
Thibaud Colas
7c1d73cbea
Update InlinePanel’s headings text and level ( #9316 )
2022-10-14 14:14:04 +01:00
Thibaud Colas
8ef002994e
Switch StreamField to use same panel component as other collapsible sections. Fix #9180 , #8047 ( #9319 )
2022-10-14 13:51:46 +01:00
Albina Starykova
b6d4af418f
Update pattern library background & text examples
...
- Add better text examples to the Type scale story
- Set the background to white for Storybook stories
- fixes #8659
2022-10-13 06:56:15 +10:00
LB Johnston
2e8709e0d6
Documentation - update dead/redirected links
2022-10-11 20:44:08 +10:00
Steve Stein
aeae0089d3
Adjust checkbox and radio label colours, remove margin on fields in group permission tables, and adjust spacing between error icon and message ( #9074 )
2022-10-07 08:40:13 +01:00
LB Johnston
eb398a5f9b
eslint - move 'prefer-destructuring' disabling to core rules
...
- this rule does not align with preferred code approach
2022-09-27 14:53:18 +01:00
Sage Abdullah
41c8512789
Reset scheduled publishing fields when dialog is closed
2022-09-22 14:55:44 +01:00
Sage Abdullah
c17ab8b77a
Render PublishingPanel inside dialog component
2022-09-22 14:51:16 +01:00
Sage Abdullah
1ab4c66f26
Set datetime picker z-index relative to dialog's z-index if it's within a dialog
2022-09-22 14:46:54 +01:00
Sage Abdullah
7b39c198c8
Allow specifying dialog_root_selector in dialog component
2022-09-22 14:44:34 +01:00
Helen Chapman
bf3a054c04
Add a toggle to collapse/expand all page panels at once. Fix #9152 ( #9167 )
2022-09-16 11:24:46 +01:00
Nicholas Johnson
9e810ce5b0
Make report titles sentence case consistently
...
Fix a few more "Locked Pages" references
2022-09-16 07:04:46 +10:00
Steve Stein
d96510949a
Update alignment and reveal logic of fields’ comment buttons. Fix #9025 ( #9164 )
...
Co-authored-by: Steven Steinwand <steven_ts@hotmail.com>
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2022-09-14 16:30:37 +01:00
Steve Stein
66ea563fec
Use the correct type scale for heading levels in rich text. Fix #9027 ( #9189 )
...
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2022-09-14 13:58:43 +01:00
PaarthAgarwal
b345014fad
Align hover behaviour for delete button with new designs
...
- relates to #3823
- relates to #8790
2022-09-14 15:45:13 +10:00
Matt Westcott
7eefd98dc2
Revert chooser button labels to "Choose another X"
...
Fixes #9113
2022-09-14 07:40:38 +10:00
LB Johnston
c0ae976471
avoid usage of disabled class in expanding formset & update button usage
...
- remove check for disabled class on expanding formset - InlinePanel uses disabled attribute
- remove existing potentially disabled expanding formset usage of links instead of buttons
2022-09-09 09:06:07 +10:00
PaarthAgarwal
6906273609
applied new designs to disabled buttons
...
- add pointer-events: none; to disabled buttons (useful when using with links)
- added warnings about using disabled as a class instead of disabled as an attribute on elements
2022-09-09 09:06:07 +10:00
PaarthAgarwal
73f39c35d7
applied new designs to secondary buttons
...
* Added note in 4.1.md for .button-secondary not being compatible with .no/.serious
* Added comment for button-secondary class not being compatible with serious/no classes
* Fixed message button-secondary hover states
* Relates to #8790
2022-09-09 08:28:57 +10:00
PaarthAgarwal
3146a57c26
remove unused yes button styles
...
- relates to #8790
2022-09-09 06:47:32 +10:00
PaarthAgarwal
d266b5abc0
applied new design to delete button in comments
2022-09-07 22:11:43 +10:00
PaarthAgarwal
0e21d2e239
fix icon button
2022-09-07 22:11:43 +10:00
PaarthAgarwal
99ca7f90e9
applied new design for no/serious (delete) buttons
...
- added hover overrides for disable button so that hover makes no visual change
- make the delete button background white instead of transparent
- adopt new designs for no/serious
2022-09-07 22:11:43 +10:00
LB Johnston
aa70a9f5bd
button stying fixes & follow up
...
* follow up to #9104
* relates to #8790
* fix up styleguide example buttons for yes/no variants, add more disabled variants
* add type="button" to styleguide example buttons
* revert box-sizing change and use line-height with calc for borders instead
* revise border overrides to set border-color only
* fix modal button override
2022-09-07 08:15:45 +10:00
LB Johnston
174488accf
move inlinePanel function to src/includes and add basic test
...
- basic unit test is mostly a smoke test that the init functions get called
- add JSDOC to inlinePanel function body
- name some internal functions
2022-09-06 15:49:00 +01:00
LB Johnston
4b521c51cd
fix issue inline panel ordering
...
- fixes #9145
- no longer working with the new DOM structure introduced by #8983 / ca7f23d176
- instead of using `$.children` use `$.find` to find the panel's input fields but ensure we still supported nested fields by finding based on the child panel's id
2022-09-06 15:49:00 +01:00
LB Johnston
2d2649e861
taggit / autocomplete - add backgrounds to overlay items
...
- original backgrounds removed in client/scss/vendor/jquery-ui-1.10.3.verdant.css 4eb35dbc0a
via #8419
- also ensure the dropdown items show correctly in high contrast mode
- fixes #9128
2022-09-06 13:33:11 +01:00
Vaibhav Shukla
66d9463d5c
show different locked indicator for locked by current user
...
- ensure it works for colour contrast, windows high contrast mode and non-colour only visible change
- only show the change if page is locked by the current owner
- added assert check for the locked-indicator-owner in test
- adopt new icons for privacy indicator also
- ensure the icons show correctly for high contrast mode
2022-09-06 10:20:20 +10:00
LB Johnston
a8aa747bde
rename privacy_indicator styles file to indicator
2022-09-06 10:20:20 +10:00
Joshua Munn
78fe000b19
Add custom jest matcher for block id duplicate tests
2022-09-06 08:08:34 +10:00
Joshua Munn
94d6ca055f
Simplify StreamBlock duplication tests, add StructBlock dup tests
2022-09-06 08:08:34 +10:00
Joshua Munn
135fe6724c
Add getDuplicatedState method to ListBlock and ListChild
2022-09-06 08:08:34 +10:00
Joshua Munn
6f1fde7cfc
Add getDuplicatedState methods to block classes
...
Fixes duplication of block ids when duplicating stream field blocks
2022-09-06 08:08:34 +10:00
PaarthAgarwal
6433aebe6b
refactored button styles
...
- relates to #9104
- Removed: .button-neutral, .button-strokeonhover and .hover-no.
- Replaced hardcoded font size, font weight values with theme variables.
- Removed overridden duplicate styles for .yes, .no and .bicolor.
- Merged a few styles under one class.
- Removed non-link button which was using span tag from styleguide, remove other unhelpful examples
2022-09-05 18:48:06 +10:00
jacobtoppm
acf6f419a0
Postpone add comment widget initialisation until after comments are enabled. ( #9124 )
...
This prevents errors when comments.js is loaded but a view does not use
the commenting functionality, which caused issues for StructBlocks containing
FieldBlocks on non page-models. In future we should only load comments.js
where it is actually needed as well.
2022-09-02 15:01:17 +01:00
Mehrdad Moradizadeh
a0f038af14
move branding_title to the end of page title
...
Ensure the title of the Web page first identifies the topic of the page, then shows the group name followed by the name of the parent organisation.
* fixes #9054
* https://www.w3.org/WAI/WCAG21/Techniques/general/G88
* https://www.w3.org/WAI/WCAG21/Understanding/page-titled.html
2022-08-31 22:10:57 +10:00
Thibaud Colas
167a923fb1
Adjust comment button positioning to avoid overlaps in field rows
...
Co-authored-by: Steven Steinwand <steven_ts@hotmail.com>
2022-08-31 12:53:54 +01:00
Thibaud Colas
1f08152d42
Customize comment focused colours for draftail
...
Co-authored-by: Steven Steinwand <steven_ts@hotmail.com>
2022-08-31 12:53:54 +01:00
Thibaud Colas
5890cf5bda
Highlight side panels toggles when expanded
...
Co-authored-by: Steven Steinwand <steven_ts@hotmail.com>
2022-08-31 12:53:54 +01:00
PaarthAgarwal
1d5824dcc7
remove redundant unbutton styles
...
- relates to #8790
2022-08-31 08:03:27 +10:00
PaarthAgarwal
b924456b65
centered spinner icon and signing in text
2022-08-26 06:49:19 +10:00
Jake Howard
efe8f17280
Adopt lazy image loading throughout admin
...
This improves page responsiveness on first load, especially on pages with many images (eg images list in Wagtail admin)
* Lazy load thumbnails on modeladmin lists
* Update oembed photos to use lazy loading
* Use lazy loading for `MediaBlock`, the avatar in the sidebar and comments
* Just decode chooser images async
2022-08-25 18:20:45 +10:00
jacobtoppm
51de90fc81
Fix FieldBlocks ending up with a null annotationTemplateNode and making commenting impossible if they initialise pre-CommentPanel
...
- fixes #9035
2022-08-25 06:45:40 +10:00
Steven Steinwand
700d8fde07
Simplify css selectors
2022-08-24 13:50:20 +01:00
Steven Steinwand
1c1dc8170e
Format css
2022-08-24 13:50:20 +01:00
Steven Steinwand
e27e0b8bf4
Hide anchors and toggles for page titles from screen readers
2022-08-24 13:50:20 +01:00
PaarthAgarwal
4e747326fa
fix formatting issues with modal header
...
- formatting fix for the header on small devices
- ensure the padding left is not set so that the outside is fully clickable
- fixed close button colours
- fix alignment and heights of smaller breakpoint modal header
- fixes #9053
- fixes #9014
2022-08-22 16:52:16 +10:00
Steven Steinwand
d1167d8446
Add pseudo element to increase hoverable area for the drafttail field and the add block trigger button.
...
- Change variables for sizing
- Move hover extended styling to BlockToolbar
- fixes #9024
2022-08-21 09:13:17 +10:00
Sage Abdullah
32b5b992b3
Clear existing preview data on initial load of the create/edit view
...
This prevents stale preview data from being initially shown after reloading the PreviewOnCreate view
- fixes #9058
2022-08-21 08:25:34 +10:00
Sage Abdullah
b20a64f13b
Fix live preview error banner overlapping with preview mode selector
2022-08-18 12:39:46 +01:00
Matt Westcott
323dfe49e9
Fix error insertion logic for modal upload forms
...
Fixes #9019
* The `[data-field]` element (not the input) should be queried to find the `[data-field-errors]` element
* The code should not assume the presence of an icon element
2022-08-18 09:32:21 +01:00
Matt Westcott
cc4675aa5e
Use correct classnames for showing/hiding edit button on chooser widget
...
Fixes #9008
2022-08-17 07:50:29 +10:00
PaarthAgarwal
011099dd45
fixed console error for breadcrumbs
2022-08-16 07:35:23 +10:00
Matt Westcott
8564383ef5
remove stray console-log from page-editor.js
2022-08-16 06:13:30 +10:00
Thibaud Colas
ca7f23d176
Update InlinePanel and StreamField styles for new designs ( #8983 )
2022-08-12 13:17:40 +01:00
LB (Ben Johnston)
6a11ae711a
Only use hidden until-found in panels if browsers supports it ( #8962 )
2022-08-12 12:19:48 +01:00
Matt Westcott
267cac0fe1
Remove outdated fixme comment and redundant results_only parameter
2022-08-12 17:35:42 +10:00
Thibaud Colas
cee3e6d28b
Add target styles for block toolbar
2022-08-10 15:15:20 +10:00
Thibaud Colas
5014c2ea1c
Move rich text comments from block toolbar to inline
2022-08-10 15:15:20 +10:00
Thibaud Colas
dca2294293
Fully move rich text split from meta toolbar to block toolbar
2022-08-10 15:15:20 +10:00
Thibaud Colas
53dded86c8
Update base Draftail/TextField form styles to match designs
2022-08-10 15:15:20 +10:00
Thibaud Colas
c620e58c86
Fix keyboard focus not showing the chooser‘s actions
2022-08-10 15:08:57 +10:00
Thibaud Colas
21b5ad5ce9
Update chooser styles across all types
2022-08-10 15:08:57 +10:00
Matt Westcott
90e91e0e4a
Consistently use edit_url in the state representation of choosers
...
Previously we were using edit_link in dicts handled by JS, and edit_url in dicts handled by Python, meaning that ChooserBlock.get_form_state had to rewrite it
2022-08-10 14:53:41 +10:00
Matt Westcott
0077183682
Add a base class for Telepath adapters for chooser widgets
2022-08-10 14:53:41 +10:00
Matt Westcott
d4c146ad01
Add a base class for chooser factories
2022-08-10 14:53:41 +10:00
Sage Abdullah
f322e9d868
Improve Snippets listing styles
2022-08-09 13:01:50 +01:00