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

1464 Commits

Author SHA1 Message Date
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