0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-30 01:46:24 +01:00
Commit Graph

15840 Commits

Author SHA1 Message Date
Sage Abdullah
9e91362231
Rename pages template context variable in breadcrumbs.html to items 2023-09-13 16:25:55 +01:00
Sage Abdullah
90afe525ca
Extract breadcrumbs_items block and define page-specific items in page_breadcrumbs.html template 2023-09-13 16:25:46 +01:00
Sage Abdullah
1e08d77d4a
Introduce page_breadcrumbs.html template for the page_breadcrumbs template tag 2023-09-13 16:25:43 +01:00
Sage Abdullah
74d5a4c9fb
Rename breadcrumbs template tag to page_breadcrumbs 2023-09-13 16:25:39 +01: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
rohitsrma
451c21ea52 Page status sidebar - add support for actual published date date in tooltip
Fixes #10789
2023-09-13 08:20:45 +10:00
rohitsrma
0a977cc54d human_readable_date - update template tag to support tooltip position 2023-09-13 08:20:45 +10: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
0daf33b1b4 Add changelog for #10835 2023-09-13 07:40:04 +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
Hatim Makki Hoho
bf709279d5 Update focal_points.md (#10878)
corrected the load from {% load wagtailimages %} to {% load wagtailimages_tags %}
2023-09-11 20:13:19 +01:00
Matt Westcott
386e7c896e Release note for #10866 in 5.1.2 2023-09-11 19:06:48 +01:00
Matt Westcott
7cfe67f3c4 Add fallback on full-word search to generic model IndexView 2023-09-11 17:28:06 +01:00
Matt Westcott
e017225c0f Add release note recommending the use of AutocompleteField 2023-09-11 17:11:26 +01:00
Matt Westcott
4b28e481a3 Restore fallback behaviour on chooser search for models without AutocompleteFields 2023-09-11 17:10:57 +01: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
Sage Abdullah
28d55f8c24
Release notes for #10826 and #10827 in 5.1.2 2023-09-07 13:58:01 +01:00
Matt Westcott
d00c2fe12c Release note for #10847 in 5.1.2 2023-09-07 12:22:54 +01:00
Matt Westcott
d322d60228 Release note for #10847 in 5.0.3 2023-09-07 12:22:53 +01:00
Jake Howard
0d7f1bdaf0 Use new migration rather than modifying existing in place
This won't change the impact, but ensures deployments definitely have a reset counter, even if they've already released 5.0.
2023-09-07 12:18:40 +01:00
Jake Howard
0ade1f19e8 Reset search promotions sequence after copying table content
We insert values manually, including an explicit pk, but don't ensure the sequence is set to a value higher than the largest pk.

See also https://code.djangoproject.com/ticket/17415
2023-09-07 12:18:40 +01:00
Matt Westcott
b6bd047598 Add documentation for non-model choosers using queryish (#10863) 2023-09-07 11:27:10 +01:00
Matt Westcott
0cea5a70d4 Release note for #10836 in 5.1.2 2023-09-06 17:56:57 +01:00
Matt Westcott
d112127178 Release note for #10836 in 5.0.3 2023-09-06 17:56:00 +01:00
Sage Abdullah
6a0b01bdf9 Do not use ignore_conflicts when creating extra permissions for snippets 2023-09-06 17:48:44 +01:00
Matt Westcott
6a30d5ebc1 Release note for #10859 2023-09-06 16:00:15 +01:00
Sage Abdullah
96165421a6 Add test for adapting chooser widget with linked_fields 2023-09-06 15:58:36 +01:00
Matt Westcott
15a8acd14b Change no-results message to "There are no results".
As per https://github.com/wagtail/wagtail/pull/10859#discussion_r1317288103, referring to the act of creating items is a distraction from the current workflow, and particularly misleading for filtered listings (where records might exist, just not matching the current criteria).
2023-09-06 15:58:36 +01:00
Matt Westcott
8223162c93 Add documentation for linked_fields 2023-09-06 15:58:36 +01:00
Matt Westcott
a3029bbe3a Implement linked_fields on ChooserViewSet 2023-09-06 15:58:36 +01:00
Matt Westcott
7b64f08e74 Allow ChooserViewSet to be filtered by specified URL parameters 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
Matt Westcott
187f010c34 Check that model_class is not None in get_permission_policy
Co-authored-by: sag᠎e <laymonage@gmail.com>
2023-09-05 10:37:25 +01:00
Matt Westcott
98784fa153 Skip extract_references on ChooserBlock if model is not a real model 2023-09-05 10:37:25 +01:00
Matt Westcott
2dcfdedc37 Apply duck-typing for model-like classes within ChooserViewset
* allow any class to pass through resolve_model_string, not just models
* use BlanketPermissionPolicy if model_class is not a real model
2023-09-05 10:37:25 +01:00
Matt Westcott
e40b0b1fd0 Only try to order by _updated_at if column exists 2023-09-05 10:37:25 +01:00
Matt Westcott
cbeb9a2512 Docs and release note for ChooserViewSet.get_object_list (#10851) 2023-09-04 18:45:39 +01:00
Matt Westcott
48313bd38c Support overriding get_object_list from ChooserViewSet 2023-09-04 16:14:20 +01:00
Matt Westcott
fced56b65c Release note for #10849 2023-09-04 16:13:36 +01:00
Matt Westcott
dd31ec54af Use get_common_view_kwargs for ChooserViewSet 2023-09-04 16:13:36 +01:00
Matt Westcott
e9c291c1be Move common kwargs in SnippetViewSet to get_common_view_kwargs 2023-09-04 16:13:36 +01:00
Matt Westcott
2ab876fc9c Use construct_view for other views in SnippetViewSet 2023-09-04 16:13:36 +01:00
Matt Westcott
5429d4ecbf Introduce a set of common view kwargs 2023-09-04 16:13:36 +01:00
Thibaud Colas
06a7bc6124
Fix outdated reference to BlogCategory in tutorial 2023-09-01 16:22:00 +01:00