-
-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A case when image picker not being handled in CMS #253
Comments
Hey @jamestagal, thanks for the video that's super helpful! Only showing the image widget when prefixing the path with "assets" actually is by design. I agree with what you said at 1:07 that it's a cleaner approach to pull out the static parts of the path (like the "assets" prefix and ".jpeg" suffix) and put them in your template. The problem is that it doesn't give the "discoverable" aspect of the CMS enough context to figure out what type of default field widget to use based on the JSON content value. We look for a very specific pattern in order to avoid accidentally loading an image widget when you maybe were just trying to describe an image path in text. The developer instinct to abstract away the common parts makes a lot of sense if the end user was editing the JSON directly (or markdown equivalent like other SSGs). Fortunately with Plenti, the end user experience editing these types of fields should generally be through the widget, so the path complexity shouldn't be apparent. Of course if the developer isn't aware of this convention, their site won't break, they just won't get the enhanced editing experience. In the future it would be nice if the schema override to add this widget was aware of original path convention and would allow you to still get the image widget to work with a shortened path. |
Hi @jimafisk Cheers, |
Sounds great @jamestagal, thanks for helping keep the documentation / announcements up-to-date! |
Hi @jimafisk ,
I found a situation when the images picker in the CSM didn't work on images when the relative path such as
assets/
is defined in the html as follows:See a short screen share video talking through the issue.
https://www.loom.com/share/5f9fbea4292a4fc0b21bf82668e766c2
Regards,
Ben
The text was updated successfully, but these errors were encountered: