-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Gallery Block: The "Edit Gallery" modal is unaware of any captions added within Gutenberg. #8310
Comments
Noticed this during some user testing. Adding this to the Editor milestone as I think it's an important rough edge to smooth off. |
Noting: the change would have to be made in the Image block and will solve Gallery as a result. Currently, the image block also does not update caption. I think I have some ideas on this. I'm going to assign it to myself and see what I can figure out. Any thoughts around this, feel free to keep the conversation going. :) |
@androb, there is the same issue not just with Gallery/Image caption, but with Image "alt attribute". Here are some thoughts: Option 1When image element within the gallery is clicked - add its fields to the sidebar on the right (either instead of "gallery" options, or not top of gallery options). Option 2Allow editing caption only within media modal. So when an image is clicked (or double-clicked, or edit icon clicked) - gallery edit modal opens with the selected image: Options 3Keep "Write Caption...". Do not add new fields to sidebar. When "Write Caption..." focus is lost - send a request to server to update media attachment caption field. Similar technique is used by WordPress already, when editing fields at Do we really need WYSIWYG (bold/italic/link/strike...) editor for caption text?It feels most uses of this feature is adding photo credit link, which is much more elegantly done via a separate media field. Which is styled by a theme afterward. |
I'm thinking that the Rich Text component may need an event for when focus leaves to make a REST call to update the ID associated with each image. |
Gallery captions are instance based by design. I think we should close this one. The caption field was meant to serve as a placeholder for text if needed at a per block or post basis. |
If this was just meant to be a placeholder, what could we use to actually show a caption on an image? I use tens galleries on my site with tens of images each, and not being able to re order them without losing the caption is a real hassle |
YES! Please. I like the new caption process. |
This is very frustrating, especially when one spends time writing meaningful captions. At least deactivate the Gutenberg captions for now, please. |
Howdy @antpb any progress on this issue? From what you tried, do you have any advice on how to proceed? Your comment here:
seems like a decent approach. |
@kjellr I have a PR with a small fix, although not the best it should make for better UX:
LMK :) |
Closing this as there's no Gallery Edit Modal anymore. |
@youknowriad You were saying? 😂 |
Interesting :) that "Media Upload" button is not mean to edit the gallery but just to pick new images from the MediaLibrary. We should create a new issue to fix that :) |
I really like how the gallery block made some progress. This issue has been closed and I'm not sure why. The issue is still there. I have 10 images and I've added my captions. I want to add another image to the gallery results in losing ALL captions. I have to force reload the browser tab to get a previous state. And there is no way of adding images to a gallery. @youknowriad Did you create an issue for that? How do I add images to a gallery without losing the captions? |
No I didn't, but I think the issue should be to "remove the Gallery Edit modal" and have the "media library" button behave as an appender. |
FYI for those that came across this thread from Google. This issue is still persists on the built-in Gutenberg in WP 5.4 But can be fixed by installing the latest Gutenberg plugin which is currently 7.8.1 |
Agree that we need to remove Edit Gallery from the media modal. I've created #21413 to track this. |
Describe the bug
If a user has entered image gallery captions from within Gutenberg, the "Edit Gallery" modal does not display them. Furthermore, if a user makes changes from the "Edit Gallery" modal, their custom captions will be deleted without warning.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
After step 3, I expected to see my image captions in the "Edit Gallery" modal.
Actual behavior
After step 3, the image captions in the "Edit Gallery" modal were blank.
After clicking "Update Gallery" in step 4, my custom captions were deleted without warning, for all images in the gallery.
Screenshots
The text was updated successfully, but these errors were encountered: