jonom/silverstripe-focuspoint

Can't edit focus point outside of Files section

Closed this issue ยท 7 comments

jonom commented

When working with images in the CMS outside of the Files section (e.g. HTMLEditorField insert), the editing form is disabled for some reason. I am guessing the SS4 team ran out of time to make this work in SS4.0, but expect it may be added in in a later release, as inline editing was available in SS3 in (e.g. on UploadFields).

Editing the focus point currently requires a trip to the Files section, which is a poor UX, but consistent with editing other file properties. Hopefully the native file editing experience will be improved in SS allowing all file properties (including focus point) to be edited outside of the Files admin.

with silverstripe 4.1 is there a way to use focus point for example in the uploadfields again?

Latest version of Silverstripe 4.3 has same issue, but worse because the Focuspoint edit area is shown, but doesn't work. Viewing an image from the uploadfield (where the image was added) will show the file, same as in the Files area but in a modal. Focuspoint doesn't work in this, but does work via the Files area.

jonom commented

I think that happened prior to 4.3 too. It's definitely not ideal. If it can't be editable at the moment, perhaps we can at least improve the experience. Maybe when you hover over a read-only focuspoint field, a button could be overlaid that says "Edit" and opens up the Files area in a new window?

I don't have time to work on this right now but PRs are always welcome!

I think this issue is related to: silverstripe/silverstripe-asset-admin#813

In summary, there is discussion as to how the edit form should be implemented and its functionality. I don't think think FocusPointField can be editable via the InsertMediaModal (used on the UploadField) until the issue I linked to is resolved.

Also @jonom I am getting another issue, I am not sure if it is related to this issue, or if it should be seperate. If I try to add a FocusPointField to a custom Form (in this case, one managed via a GridFieldDetailForm) then the FocusPointField doesn't display?

I am guessing this is because the the React component isn't binding to the legacy entwine form? But I am having no luck trying to add custom JS to bind the component...

Should this be a separate issue? Anyone got any ideas on what I can do?

jonom commented

I'm super short on time guys sorry, but I will aim to quickly review any PRs that come in. I haven't actually touched the React side of this project yet so @bummzack would be better placed to provide input on that if available.

jonom commented

Looked at the code today and found @bummzack had already implemented read only support ๐Ÿ˜„ just a little tweak was needed to activate it in this context. The field will now show as read only in the insert media dialogue and won't respond to clicking. I'd say this addresses the UX issue and the greater issue of being able to edit files in the insert media dialogue is a framework issue. If and when support for that returns, it should automatically be re-enabled for FocusPoint.

Screen Shot 2019-12-17 at 12 28 47 pm