kopia lustrzana https://github.com/wagtail/wagtail
				
				
				
			Add upgrade considerations
							rodzic
							
								
									5c26510f8a
								
							
						
					
					
						commit
						d82172f0ab
					
				|  | @ -52,8 +52,8 @@ class SettingsBlock(blocks.StructBlock): | |||
|         icon = 'cog' | ||||
|         # This block will be initially collapsed | ||||
|         collapsed = True | ||||
|         # The label when the block is collapsed | ||||
|         label_format = "Settings (Theme: {theme}, Available: {available})" | ||||
|         # The block's summary label when collapsed | ||||
|         label_format = "Theme: {theme}, Available: {available}" | ||||
| 
 | ||||
| 
 | ||||
| class PersonBlock(blocks.StructBlock): | ||||
|  |  | |||
|  | @ -536,7 +536,10 @@ The `form_attrs` keyword argument was added to all built-in structural block typ | |||
|     :param value_class: A subclass of ``wagtail.blocks.StructValue`` to use as the type of returned values for this block. See :ref:`custom_value_class_for_structblock`. | ||||
|     :param search_index: If false (default true), the content of this block will not be indexed for searching. | ||||
|     :param label_format: | ||||
|      Determines the label shown when the block is collapsed in the editing interface. By default, the value of the first sub-block in the StructBlock is shown, but this can be customized by setting a string here with block names contained in braces - for example ``label_format = "Profile for {first_name} {surname}"`` | ||||
|      Determines the summary label shown after the ``label`` when the block is collapsed in the editing interface. By default, the value of the first sub-block in the StructBlock is shown, but this can be customized by setting a string here with block names contained in braces - for example ``label_format = "{surname}, {first_name}"``. If you wish to hide the summary label entirely, set this to the empty string ``""``. | ||||
| 
 | ||||
|      .. versionchanged:: 7.1 | ||||
|         The block's original ``label`` is now always shown when the block is collapsed, and the ``label_format`` string is shown after it as the summary instead of replacing the ``label``. | ||||
| 
 | ||||
| 
 | ||||
| .. autoclass:: wagtail.blocks.ListBlock | ||||
|  |  | |||
|  | @ -0,0 +1,24 @@ | |||
| # Wagtail 7.1.2 release notes | ||||
| 
 | ||||
| _Unreleased_ | ||||
| 
 | ||||
| ```{contents} | ||||
| --- | ||||
| local: | ||||
| depth: 1 | ||||
| --- | ||||
| ``` | ||||
| 
 | ||||
| ## What's new | ||||
| 
 | ||||
| ### Bug fixes | ||||
| 
 | ||||
|  * Allow `label_format` to be set to an empty string to hide the block summary label (Sage Abdullah) | ||||
| 
 | ||||
| ## Upgrade considerations - changes affecting all projects | ||||
| 
 | ||||
| ### Changes to `label_format` behavior in `StructBlock` | ||||
| 
 | ||||
| In Wagtail 7.1, the `label_format` option for `StructBlock` has been changed to always show the block's original `label` when the block is collapsed, with the `label_format` string shown after it as a summary instead of replacing the `label`. This means that if you had previously set `label_format` to include (or be the same as) the `label`, you would likely want to remove the original `label`'s text from the `label_format` string. | ||||
| 
 | ||||
| If you wish to hide the summary label entirely (similar to setting `label_format = label` in Wagtail < 7.1), you can set `label_format` to the empty string `""`. This was not possible in Wagtail 7.1, but is now supported as of this release. | ||||
|  | @ -172,6 +172,12 @@ The panels mechanism used by the page and snippet editing forms now provides an | |||
|  * Upgrade django-tasks to 0.8.x (Jake Howard) | ||||
|  * Refresh accessibility targets in contributing docs (Thibaud Colas) | ||||
| 
 | ||||
| ## Upgrade considerations - changes affecting all projects | ||||
| 
 | ||||
| ### Changes to `label_format` behavior in `StructBlock` | ||||
| 
 | ||||
| The `label_format` option for `StructBlock` has been changed to always show the block's original `label` when the block is collapsed, with the `label_format` string shown after it as a summary instead of replacing the `label`. This means that if you had previously set `label_format` to include (or be the same as) the `label`, you would likely want to remove the original `label`'s text from the `label_format` string. | ||||
| 
 | ||||
| ## Upgrade considerations - changes affecting Wagtail customizations | ||||
| 
 | ||||
| ### Deprecation of `PageListingButton`, `SnippetListingButton`, and `UserListingButton` | ||||
|  |  | |||
|  | @ -7,6 +7,7 @@ Release notes | |||
|    upgrading | ||||
|    release_process | ||||
|    7.2 | ||||
|    7.1.2 | ||||
|    7.1.1 | ||||
|    7.1 | ||||
|    7.0.3 | ||||
|  |  | |||
		Ładowanie…
	
		Reference in New Issue
	
	 Sage Abdullah
						Sage Abdullah