Wykres commitów

18616 Commity (c38db51559c0296cc4ad8a58f1f63f17ace7173d)

Autor SHA1 Wiadomość Data
Matt Westcott c38db51559 Add versionchanged note for new Page.save validation 2025-03-19 14:22:45 +00:00
Matt Westcott 04a174f0f2 Make get_latest_str fallback translatable 2025-03-19 14:22:45 +00:00
Matt Westcott 6a0bd93e5b Add an empty_value_display property on Column for use when value is blank
This surfaces an issue with SearchPromotion having a broken string representation when the query string is None, so fix that too
2025-03-19 14:22:45 +00:00
Matt Westcott 397edf2ec5 Support deferring validation on StreamField 2025-03-19 14:22:45 +00:00
Matt Westcott 5015eddef3 Preserve required asterisks on validation-deferred fields when re-showing form after an error 2025-03-19 14:22:45 +00:00
Matt Westcott 2ab55ac3c8 Use fallback for blank string representations on model index and edit views 2025-03-19 14:22:45 +00:00
Matt Westcott 3f70a0a52f Add fallback for blank string representations in audit log, and add tests for creating/editing invalid draft snippets 2025-03-19 14:22:45 +00:00
Matt Westcott f649856cf4 Defer validation when saving snippets as draft 2025-03-19 14:22:45 +00:00
Matt Westcott 0745ae53da Test that validation is still enforced on save_revision when saving or scheduling
As per https://github.com/wagtail/rfcs/pull/104#issuecomment-2691145020 - unless clean=False is explicitly passed, validation should be applied, including on fields that would accept nulls at the database level.
2025-03-19 14:22:45 +00:00
Matt Westcott 2b882743ec Enforce validation on save for FieldPanels corresponding to non-null, non-text-type model fields 2025-03-19 14:22:45 +00:00
Matt Westcott 96f9ebe3f6 Recognise required_on_save flag being set on model fields
It is clear from the test models and bakerydemo that title is frequently declared with a plain FieldPanel rather than TitleFieldPanel, so we should not rely on the presence of TitleFieldPanel or an explicit required_on_save flag on the FieldPanel to enforce form-level validation on the title.
2025-03-19 14:22:45 +00:00
Matt Westcott abb7a687e4 Add tests for creating / publishing EventPage with a blank (required) from_date field
The fix to EventPageForm.clean addresses a logic bug that existed before the change to validation - if `date_from` was left blank, it would be omitted from `cleaned_data` and so retrieving it would raise an uncaught KeyError.
2025-03-19 14:22:45 +00:00
Matt Westcott a20c55a9bc Add tests for validate-on-publish when editing 2025-03-19 14:22:45 +00:00
Matt Westcott 51629e8488 Add tests for validate-on-publish when creating pages 2025-03-19 14:22:45 +00:00
Matt Westcott a56888a7ab Defer validation on FieldPanel unless required_on_save passed 2025-03-19 14:22:45 +00:00
Matt Westcott d0e106b403 Fix test models to use TitleFieldPanel for the title field 2025-03-19 14:22:45 +00:00
Matt Westcott 1f210831dd Relax model validation when saving pages as draft 2025-03-19 14:22:45 +00:00
Matt Westcott 13dbf61323 Set default slug / draft_title / locale independently of full_clean method 2025-03-19 14:22:45 +00:00
Matt Westcott a80f40999e Refactor page create/edit views to decouple identifying the action from performing it 2025-03-19 14:22:45 +00:00
Matt Westcott 8cdbbcfe29 Add mechanism for deferring required field validation on WagtailAdminModelForm 2025-03-19 14:22:45 +00:00
LB 8f640a8cdb Add changelog for #12448 2025-03-15 15:51:57 +10:00
Andy Babic a983dc220b
Frontend cache: Fix n+1 query issues when batch purging page urls (#12448)
* Update tests to highlight the current issues
* Optimise PurgeBatch and util methods, and add docstrings
* Use page objects as the site_cache_target in tests
* Use 'cache_object' instead of 'site_cache_target' to better match terminology in Page methods
* Ensure self.captureOnCommitCallback() is applied when performing purges in tests
* Ensure tests check PURGED_URLS outside of captureOnCommitCallback()
2025-03-15 15:48:58 +10:00
LB de99b8b90f Docs - Minor whitespace cleanup 2025-03-15 15:25:30 +10:00
LB 57fcb353d8 Add changelog for #12278 2025-03-15 15:23:54 +10:00
smark-1 322d7e1620 Add documentation for setting the default privacy option on pages 2025-03-15 15:23:54 +10:00
smark-1 6bbd109072 Support showing the default (or parent) privacy setting on page edit/create
Fixes #3708
2025-03-15 15:23:54 +10:00
smark-1 8654aadb63 Add method to set a default privacy option on Page models
Fixes #3708
2025-03-15 15:23:54 +10:00
LB f0c7e88d0e Add changelog for CI test fixes #12960 & #12961 2025-03-15 11:20:41 +10:00
Sage Abdullah 8e4a721525 Fix nondeterministic page order in test_ordering_by_content_type 2025-03-15 11:18:04 +10:00
Sage Abdullah 8e8770d334
Release note for #12958 2025-03-13 21:29:42 +07:00
ashish-nagmoti 52ac35acea
Add color-scheme meta tag to Wagtail admin 2025-03-13 21:29:42 +07:00
Sage Abdullah ee83938fa5
Release note for #12555 2025-03-13 20:03:15 +07:00
LB 3c628b8ad2 Add Python unit tests to ensure the skip link element is present 2025-03-13 21:27:23 +10:00
LB 1772909551 Add FocusController story 2025-03-13 21:27:23 +10:00
LB 3c09da2fb8 Enhance & rework FocusController
- Update the Controller import & identifier to be `w-focus` not `w-skip-link`
- Rework methods to be easier to maintain, pull out the focus event attachment handler to a function
- Add JSDoc examples & refine description
- Only add then remove the tabindex attribute if needed
- Rework unit tests to be the emerging common structure, add unit test coverage & test for the preservation of existing tabindex attributes
2025-03-13 21:27:23 +10:00
LB 472c1e95c2 Create a force focus util for common forced focus usage 2025-03-13 21:27:23 +10:00
LB 5ccea76e3d Rename SkipLinkController to FocusController 2025-03-13 21:27:23 +10:00
Sage Abdullah 9edb8be32d
Release note for #12952 2025-03-13 17:53:52 +07:00
LB 7b7dd98c19 Stimulus controllers - Move repeated no-param-reassign declarations to top of file 2025-03-13 05:51:08 +10:00
LB 85665af504 Update Stimulus controller `@example` JSDoc items
- Use consistent ```html markdown blocks
- Use consistent two space indentation
- Move the description to the example row, not on the new line where applicable
- Add missing examples were practical
2025-03-13 05:51:08 +10:00
LB 83ec67d6c1 Update Stimulus JSDoc to use US English spelling 2025-03-13 05:50:41 +10:00
LB c793d302b4 Fix alpha sorting of Stimulus controller imports 2025-03-13 05:50:41 +10:00
LB bfcd0c7496
Clean up stubs & adapter
- Ensure Jest only adapter items are in adapter.js
- Ensure Jest AND Storybook items are in stubs.js
- Add mock for someElement.scrollIntoView in the adapter
2025-03-12 21:06:08 +07:00
Sage Abdullah 3d9a868a97
Fix LocaleController tests 2025-03-12 15:39:23 +07:00
LB cbfaecdfae Add changelog for #12805 2025-03-10 09:30:59 +10:00
joelwilliam2005 b82f0fb150 Add unit tests for InlinePanel initial min_num fix #12805 2025-03-10 09:30:59 +10:00
elhussein almasri 9dcdaeecfc Fix the initial order of InlinePanel with min_num set #11889
Fixes #9391
2025-03-10 09:30:59 +10:00
Baptiste Mispelon dbf920e00c Fix incorrect column label in promoted search tables (#12941)
The promoted search tables are not filtered by date.
2025-03-05 17:19:37 +00:00
Matt Westcott d9de2d781f Release note for #12886 2025-03-05 16:20:04 +00:00
Sage Abdullah a81b119821 Bump ruff to 0.9.6 2025-03-05 16:15:13 +00:00