浏览代码

Refine 6.4 release notes

- Fix a few small typos & formatting issues
- Ensure the form builder changes are better documented
- Add links to other docs pages where possible
- Improve consistency with usage of `code` backticks on modules
- Add docs reference for StreamField `get_template` docs
LB 2 月之前
父节点
当前提交
2ce58fed95
共有 2 个文件被更改,包括 13 次插入10 次删除
  1. 11 10
      docs/releases/6.4.md
  2. 2 0
      docs/topics/streamfield.md

+ 11 - 10
docs/releases/6.4.md

@@ -39,12 +39,12 @@ Thank you to Sævar Öfjörð Magnússon and Alex Fulcher for creating this new
 
 ### Alt text improvements
 
-Building upon improvements in past versions, this releases comes with further enhancements to alt text management:
+Building upon improvements in past versions, this release comes with further enhancements to alt text management:
 
  * The [content modeling accessibility considerations](content_modeling) now reflect the latest capabilities for alt text.
- * The new ImageBlock alt text is now populated from the image’s default alt text when selecting a new image.
- * The ImageBlock alt text field is also populated from the image’s default alt text when converting from an ImageChooserBlock.
- * Alt text quality is now checked by default as was intended with the `alt-text-quality` content check.
+ * The new `ImageBlock` alt text is now populated from the image’s default alt text when selecting a new image.
+ * The `ImageBlock` alt text field is also populated from the image’s default alt text when converting from an ImageChooserBlock.
+ * Alt text quality is now checked by default, as was intended with the `alt-text-quality` content check.
 
 Thank you to Matt Westcott, Thibaud Colas, and Cynthia Kiser for their work on these improvements.
 
@@ -153,12 +153,12 @@ This feature was developed by Thibaud Colas and Sage Abdullah, thanks to a spons
  * Fix link to `HTTPMethod` in `Page.handle_options_request()` docs (Sage Abdullah)
  * Improve [](pages_theory) with added & more consistent section headings and admonitions to aid in readability (Clifford Gama)
  * Fix non-functional link to the community guidelines in the [Your first contribution](../contributing/first_contribution_guide.md) page (Ankit Kumar)
- * Introduce tags and filters by name in "Writing templates" docs (Clifford Gama)
+ * Introduce tags and filters by name in the [](writing_templates) docs (Clifford Gama)
  * Fix Django HTML syntax formatting issue on the [documents overview](documents_overview) page (LB (Ben) Johnston)
  * Separate virtual environment creation and activation steps in tutorial (Ankit Kumar)
  * Update tutorial to use plain strings in place of `FieldPanel` / `InlinePanel` where appropriate (Unyime Emmanuel Udoh)
- * Update example for customizing "p-as-heading" accessibility check without overriding built-in checks (Cynthia Kiser)
- * Document `get_template` method on StreamField blocks (Matt Westcott)
+ * Update example for customizing ["p-as-heading" accessibility check](built_in_accessibility_checker) without overriding built-in checks (Cynthia Kiser)
+ * Document [`get_template` method on StreamField blocks](streamfield_get_template) (Matt Westcott)
 
 ### Maintenance
 
@@ -177,7 +177,7 @@ This feature was developed by Thibaud Colas and Sage Abdullah, thanks to a spons
  * Remove unnecessary DOM canvas.toBlob polyfill (LB (Ben) Johnston)
  * Ensure Storybook core files are correctly running through Eslint (LB (Ben) Johnston)
  * Add a new Stimulus `ZoneController` (`w-zone`) to support dynamic class name changes & event handling on container elements (Ayaan Qadri)
- * Migrate jQuery class toggling & drag/drop event handling within the multiple upload views to the Stimulus ZoneController usage (Ayaan Qadri)
+ * Migrate jQuery class toggling & drag/drop event handling within the multiple upload views to the Stimulus `ZoneController` usage (Ayaan Qadri)
  * Test project template for warnings when run against Django pre-release versions (Sage Abdullah)
  * Refactor redirects create/delete views to use generic views (Sage Abdullah)
  * Add JSDoc description, adopt linting recommendations, and add more unit tests for `ModalWorkflow` (LB (Ben) Johnston)
@@ -216,7 +216,9 @@ DATA_UPLOAD_MAX_NUMBER_FIELDS = 10_000
 
 ### Form builder - validation of fields with custom `related_name`
 
-On previous releases, form page models (defined through `AbstractEmailForm`, `AbstractForm`, `FormMixin` or `EmailFormMixin`) did not validate form fields where the `related_name` was different to the default value of `form_fields`. As a result, it was possible to create forms with duplicate field names - in this case, only a single field is displayed and captured in the resulting form. As of Wagtail 6.4, validation is now applied on these fields. Existing forms will continue to behave as before and no data will be lost, but editing them will now raise a validation error.
+On previous releases, form page models (defined through `AbstractEmailForm`, `AbstractForm`, `FormMixin` or `EmailFormMixin`) did not validate form fields where the `related_name` was different to the default value of `form_fields`. As a result, it was possible to create forms with duplicate field names - in this case, only a single field is displayed and captured in the resulting form.
+
+In this new release, validation is now applied on these fields, existing forms will continue to behave as before and no data will be lost. However, editing them will now raise a validation error and users may need to delete any duplicated fields that they had previously missed.
 
 ### Background tasks run at end of current transaction
 
@@ -275,7 +277,6 @@ The old style will now produce a deprecation warning.
 
 Previously, the `content_panels`, `promote_panels` and `settings_panels` attributes on the base `Page` model were defined as lists of `Panel` instances. These lists now contain instances of `wagtail.models.PanelPlaceholder` instead, which are resolved to `Panel` instances at runtime. Panel definitions that simply extend these lists (such as `content_panels = Page.content_panels + [...]`) are unaffected; however, any logic that inspects these lists (for example, finding a panel in the list to insert a new one immediately after it) will need to be updated to handle the new object types.
 
-
 ### Removal of unused Rangy JS library
 
 The unused JavaScript include `wagtailadmin/js/vendor/rangy-core.js` has been removed from the editor interface, and functions such as `window.rangy.getSelection()` are no longer available. Any code relying on this should now either supply its own copy of the [Rangy library](https://github.com/timdown/rangy), or be migrated to the official [`Document.createRange()`](https://developer.mozilla.org/en-US/docs/Web/API/Range) browser API.

+ 2 - 0
docs/topics/streamfield.md

@@ -494,6 +494,8 @@ class EventBlock(blocks.StructBlock):
 
 In this example, the variable `is_happening_today` will be made available within the block template. The `parent_context` keyword argument is available when the block is rendered through an `{% include_block %}` tag, and is a dict of variables passed from the calling template.
 
+(streamfield_get_template)=
+
 Similarly, a `get_template` method can be defined to dynamically select a template based on the block value:
 
 ```python