-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Fix issues in Tiled Gallery block #26363
Comments
Thanks for setting up an issue to cover all these loose ends @simison. I'm afraid I can't commit to tackling any of these any time soon, but I'll make time to answer questions for anyone who gets stuck in :) |
Should users be able to convert from Jetpack Gallery to default gallery and vice versa? (like it's done with old [gallery] implementation). If user creates a Jetpack Gallery and then deactivates the plugin, it will break. Or I am missing something? |
Should users be able to convert from Jetpack Gallery to default gallery and vice versa?
Yep! We'll implement this for sure.
If user creates a Jetpack Gallery and then deactivates the plugin, it will break.
Correct; the rendered HTML markup will function at your site but the
gallery will not look exactly like it did before because styles are now
missing.
When editing the page, it will show up as a non-recognized block.
…On Fri, 5 Oct 2018, 03:02 Marc Finsev, ***@***.***> wrote:
Should users be able to convert from Jetpack Gallery to default gallery
and vice versa? (like it's done with old [gallery] implementation).
If user creates a Jetpack Gallery and then deactivates the plugin, it will
break. Or I am missing something?
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#26363 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAFUgFtGyo6Qc3dUplEhkNlmSb6Om4Czks5uhwP6gaJpZM4VkjC4>
.
|
I mean two scenarios: First
Expected behavior: all galleries are now displayed as a tiled mosaic. Second
Expected behavior: all galleries are now displayed as default Gutenberg gallery. Should the gallery block be rendered just on the backend to preserve backward compatibility? (instead of being rendered only on frontend via React) |
I think this really gets at the core of how blocks should behave when a block is no longer available. There are certain blocks like Tiled Galleries, where it would make sense to just fall back to a core gallery. However, I do not really know the best way to make that happen. It seems like something core Gutenberg should support at some point. @mtias what do you think? |
Follow-ups to #27458 |
Tiled Gallery block was merged in #26223
We left off most of the changes the block needs to be properly up-to-date with latest Gutenberg/React.
TODO
Add Prettier
@format
pragmaBlock uses React components → they should be nested blocks if possible
UNSAFE_
's in them.CSS is currently what was in Jetpack previously and doesn't follow Calypso's CSS naming guidelines. Linting for this was disabled using
/* eslint wpcalypso/jsx-classname-namespace: 0 */
— CSS should be rewritten and possibly use flexbox. See SDK: refactor the style file for the tiled gallery block #26551 (comment)not able to upload files directly by clicking the "Upload" button in the media placeholder - after selecting files, nothing happens:
Using media library and already uploaded images or uploading new ones there works for a fresh block. Perhaps the MediaPlaceholder component API has changed?
Adding new images to an already existing gallery throws an error. Insert a tile gallery with some images. Then try adding images to it and uploading new image fails with an error:
After saving the block with some images in it, and refreshing the page, it either isn't saved properly or isn't recognized properly:
This is also reproducible without saving and refreshing the page if you "Edit as HTML", then click inside the HTML code.
Looking at the frontend, it seems the images are not saved with the block output:
Tried to save the block as a shared block, and then reuse it, but the images are again lost when attempting to reuse it in another post. This might be related to the above issue of images not being saved properly when saving the block.
/cc @haszari has offered to help with any questions. He originally worked on Tiled Gallery Block in Automattic/jetpack#9434. Further reading: p7rd6c-1Kz-p2
The text was updated successfully, but these errors were encountered: