From d94075b02ca9130bd1a686ca37181ef3f5af2a22 Mon Sep 17 00:00:00 2001 From: Maxime Rainville Date: Mon, 13 Jul 2020 10:55:43 +1200 Subject: [PATCH] DOC Restore in-modal editing entry to changlogs --- docs/en/04_Changelogs/4.6.0.md | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/docs/en/04_Changelogs/4.6.0.md b/docs/en/04_Changelogs/4.6.0.md index 1c2b5dd2c..7a6df8533 100644 --- a/docs/en/04_Changelogs/4.6.0.md +++ b/docs/en/04_Changelogs/4.6.0.md @@ -162,20 +162,28 @@ class MyDataObject extends DataObject } ``` -## Editing files directly in the insert-media modal{#in-modal-editing} +## Editing files directly in the Insert Media modal {#in-modal-editing} -Editors can now directly edit file details when selecting a file in an -UploadField or when inserting media in a HTMLEditorField. The "image placement" -and "file link" forms that show when inserting an image or a link in an -HTMLEditorField have been simplified. +Authors can now directly edit file details when selecting a file in an +`UploadField` or when inserting media in a `HTMLEditorField`. The "image +placement" and "file link" forms that show when inserting an image or a link in +an `HTMLEditorField` have been simplified. -This does mean that the order and structure of fields have changed somewhat. If -you have customised the forms in the asset administration area or in the -"Insert Media Modal", you should do some regression testing when upgrading to -make sure your customisations still work as expected. +If you have customised the fields in the asset administration UI or Insert Media +modal, you will need to do some regression testing when upgrading, and will +likely need to make some minor adjustments to your code. -If your project uses the popular [jonom/focuspoint](https://github.com/jonom/silverstripe-focuspoint) -community module, you should upgrade it as well. +Implementing the new Edit Details UI required filtering the fields generated in +`File::getCMSFields()` into two `Form`s. The implementation in 4.6.0 does not +expose a clear API to custom fields for differentiating between the `Form`s, and +by default any fields added via an extension will appear in both views. For the +time being, a simple way to resolve this is to check for the presence of the +`Editor.Details.Title` field and add your field based on this. See the community +module [jonom/focuspoint](https://github.com/jonom/silverstripe-focuspoint/pull/78/files#diff-cc697eb8345aa25a5f88c89d1a87ff6aR27-R34) +for an example implementation, and ensure you update this module during your +upgrade to 4.6.0 if you have it installed. + +We intend to improve this pattern in a future release of Silverstripe CMS. ## MIME Type validation now a core module {#mime-validator}