-
Notifications
You must be signed in to change notification settings - Fork 56
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
Jetpack Tiled Gallery: Remove/Hide Image Settings and Caption #4190
Comments
Hi @SiobhyB, do you agree we could close #3907 now that the aspect ratio issue (#4010) is resolved and this issue tracks hiding inner image block settings and captions? Also, while this issue suggests using block contexts to solve the problem of hiding this functionality, we've recently discussed using CSS to achieve this in the short-term. I wonder if this issue should be updated to reflected the CSS approach and a new one created for revisiting this in the future. |
@guarani, I agree it makes sense to close #3907 now, I'll go ahead to do that. :)
Great point! I'll update the issue to reflect our most recent conversations. |
Sounds good, I'll see how far I'm able to get with the CSS approach and create a second ticket for revisiting if I'm able to get something merged out of it 👍 |
👋 @SiobhyB, when testing the Gutenberg Mobile feature branch, It looks like the best way to fix this is to simply update our feature branches with the latest from their repo's main branches, would you agree? If so, would you like to do that when you have a chance? It shouldn't need a PR I don't think. |
Thanks for the ping @guarani! You're right that I intentionally targeted the main branches of the repos with the others PRs, but forgot to update our feature branches. 🤦♀️ Updated the branches now! |
Gotcha, makes sense. Thanks for updating the feature branches! |
Describe the bug
Images are pulled into the Jetpack Tiled Gallery block via the inner blocks API. As a result of this implementation, all of the image block's settings are available by default, including its settings tab and editable caption field.
For the purpose of the Tiled Gallery block, it shouldn't be possible for users to edit an individual image's settings or caption. The reason for this is that this would add styles/attributes to the block's HTML and the web wouldn't know how to interpret this output.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It shouldn't be possible to access settings for individual images within the Tiled Gallery. Instead, mobile should match up with the web's behaviour, where individual settings and caption fields aren't accessible.
Smartphone (please complete the following information):
Additional context
A solution to this is likely to require block contexts. However, contexts for a third-party block have never been added before. If we do use contexts, we should ensure that they wouldn't only be useful for the Tiled Gallery block. They'd need to have a clear use for other third-parties who may wish to create a block using images as inner blocks.
In #4099, a proposal for "context constants" has been made. The idea behind these "context constants" is to better indicate when contexts aren't being serialised, and are primarily used for the purpose of styling or changing specific aspects of an inner block. If approved, it might be more straightforward to add contexts the type of contexts we're looking to add to address this issue.
A short-term workaround, in case the idea of contexts isn't approved, could be using CSS to hide these settings instead. This will need to be explored further.
The text was updated successfully, but these errors were encountered: