-
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: figure out way to fallback to shortcode #1451
Comments
An |
This makes me think we should have specific |
So, existing content will work in the freeform block. We have a pretty cool new gallery block, with a column slider. We are probably going to want to recommend this new block going forward. I'm not sure I fully understand in which cases it's important to just output the shortcode. Would the following flow address this issue, for example?
|
We do have conversion from Gallery Shortcode to a Gallery block. Is this what's this issue is about. The opposite transformation doesn't make much sense to me. We should try to improve the Gallery Block to be the default right? |
This was in the case of plugins working with a dynamic gallery—tiled galleries, etc. It might be plugin territory. |
Related #5972 I couldn't find an issue specifically for it, but we'll need to decide on how we want to handle support for the |
Sorry, I'm just getting around to this issue and I don't understand it at all. I think there's some context missing? What are the steps to reproduce the issue here? I'm not quite sure where to start. |
@tofumatt I can give you a walkthrough if you'd like (and we can post the video here afterwards). It's a relatively nuanced issue. |
Sure thing! If you wanted to just post a video that works for me, but if you wanted to setup a time to meet/skype/whatever that's cool too. Just ping me on Slack if you wanted to meet for a walkthrough and we can work out a time 😄 |
@tofumatt and I chatted on Zoom today. Here's a video recording of the call: https://www.dropbox.com/s/ihm9zedsd2onn7s/20180814galleryexplanation.mov?dl=0 @tofumatt may provide a summarized transcription of the call at some point in the near future. |
I finished listening to the zoom @danielbachhuber and @tofumatt provided. Thank you so much for recording that. I wanted to post a summary here so we can get some traction on discussion. It seems the big issue with the Gallery block in terms of backwards compatibility, is that it bypasses the Many developers build custom gallery implementations by using that. The current Gallery block is more static than the previous so we have issues when things like an undefined
When the I have some thoughts that may be helpful or at the very least start of discussions toward a plan: I’m wondering if we could have a theme support option that can fallback to |
Yep, more or less (e.g. #5972)
This seems like it could be an option. I don't have a strong opinion about it as a solution though. I also don't have any great ideas on how we should make this decision at this point. If we were to prioritize backwards compatibility, then it might make sense for WordPress core default to |
To be clear: I've had a bit of a look at this but didn't get far and am un-assigning myself because I don't think I'll be able to get to this before WordPress 5.0. If that changes I'll have another look, but I think it's best to find someone new to work on this. (Thanks for looking at it again, @antpb.) Reading through this more and understanding it... I could actually see the merits in defaulting to |
I think this is a 5.0 task. I am still evaluating the remaining tasks for Media. I don't want to assign/commit this to myself just yet but I think I can be of help in this. On the chance someone comes in and can tackle this before me, I have an example of what is needed to accomplish the server side rendering bits. With the playlist block PR you can find how I'm storing/passing the attribute of here's that PR: #9169 Classic Editor galleries work similarly to playlists in that it is primarily dependant on The part to be discovered is how we will conditionally do either Gutenberg Gallery Block or |
I've started work in the above PR on an approach that sets the render callback based on |
@antpb Have you gotten sign-off on the proposed implementation? I think it'd make sense to do so before you invest too much time into a pull request. |
Happy to pause to get sign off. This was discussed a bit in the media meeting last week and it was mentioned that we could explore if We have three possibilities that I see going forward on this (feel free to suggest others):
@mtias do you have any thoughts on the above options? |
ProposalRender gallery only on server side.
Advantages:
Disadvantages:
If these two are a big issue, gallery block can be displayed as squares only after user clicks (or focuses) it. Or when the user clicks on "Edit Gallery" icon. Example mockup |
Why do you keep mentioning themes and theme_support for a core shortcode? |
What was needed in this issue was a way to parse the ids from the Gutenberg gallery. This has been achieved in #11540 so I'll be closing this. |
There will be cases where it's important galleries just output the shortcode for compatibility. How could we expose this? A setting in "settings -> media"? An
add_theme_support
call? A setting in the inspector?The text was updated successfully, but these errors were encountered: