Skip to content
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

Resolve empty gallery preview on demo post content #1785

Merged
merged 3 commits into from
Jul 17, 2017

Conversation

aduth
Copy link
Member

@aduth aduth commented Jul 7, 2017

This pull request seeks to resolve an issue where the demo post content does not display the gallery preview correctly despite markup containing images. This is also the related cause of #1784. It appears attributes was removed in 118db19, but we must be able to parse the initial attributes from saved content. Currently we're only assigning new attributes for a block added during the editor session.

I'm not sure restoring the previous parsing is necessarily the correct solution given 118db19, but we will need attributes initialization.

Testing instructions:

Verify that the preview is shown correctly for the gallery block on Gutenberg > Demo.

@aduth aduth added [Feature] Blocks Overall functionality of blocks [Type] Bug An existing feature does not function as intended labels Jul 7, 2017
@aduth aduth requested a review from mkaz July 7, 2017 15:13
@mkaz
Copy link
Member

mkaz commented Jul 7, 2017

This change breaks opening up the gallery during editing and having the images selected in the media library (#1445) Could we just update the demo post content to include the proper comment attributes?

@aduth
Copy link
Member Author

aduth commented Jul 7, 2017

Could we just update the demo post content to include the proper comment attributes?

Sure. I wasn't familiar with whether this was an issue with the demo post content or the attributes parsing itself.

@aduth
Copy link
Member Author

aduth commented Jul 8, 2017

@mkaz In 8a71aef, I updated the serialized content to include images in the comment attributes. I'm finding that we're saving alot of data in images, trimmed down in my commit, but perhaps worth exploring separately (do we need all thumbnail sizes to be serialized, for example?).

@aduth aduth merged commit 6a8e248 into master Jul 17, 2017
@aduth aduth deleted the fix/gallery-initialization branch July 17, 2017 15:21
@mtias
Copy link
Member

mtias commented Jul 24, 2017

@aduth @mkaz we should put some more thinking on this. I am not sure what attributes are necessary and for what reasons, but we should be minimal. If needed, we can discuss with the Media group.

@mtias mtias added the [Feature] Media Anything that impacts the experience of managing media label Jul 24, 2017
Tug pushed a commit that referenced this pull request Feb 28, 2020
…tyles

Style improvements for template previews
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Blocks Overall functionality of blocks [Feature] Media Anything that impacts the experience of managing media [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants