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

Jetpack Tiled Gallery Block: save functionality #21481

Merged
merged 6 commits into from
Oct 21, 2021

Conversation

illusaen
Copy link
Contributor

@illusaen illusaen commented Oct 20, 2021

Adding workaround to allow for loading of serialized HTML into the mobile editor. Currently using the workaround to unblock the rest of the block functionality that still needs to be done; will revisit in the future. One known bug is that loading a 1-column HTML still shows "Problem Displaying Block".

See issues:

Changes proposed in this Pull Request:

Allows us to load serialized HTML for the mobile app so that the saved Tiled Gallery Block shows up on the editor.

Does this pull request change what data or activity we track or use?

N/A

Testing instructions:

  1. Create a tiled gallery block.
  2. Add 2 images to the block.
  3. Switch to HTML view.
  4. Select all of the serialized HTML and cut.
  5. Switch back to visual mode.
  6. Switch to HTML mode again (these steps force the visual editor to update).
  7. Paste in the HTML that was cut.
  8. Switch back to visual mode.
  9. See that the correct Tiled Gallery Block shows up.

Screenshots:

screen-20211020-153558.mp4

@illusaen illusaen requested a review from guarani October 20, 2021 20:37
@github-actions github-actions bot added the [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ label Oct 20, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Oct 20, 2021

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ⚠️ All commits were linted before commit.
  • ✅ Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • 🔴 Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available.


🔴 Action required: Please add missing changelog entries for the following projects: projects/plugins/jetpack

Use the Jetpack CLI tool to generate changelog entries by running the following command: jetpack changelog add.
Guidelines: /docs/writing-a-good-changelog-entry.md


Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped.
Then, add the "[Status] Needs Team review" label and ask someone from your team review the code.
Once you’ve done so, switch to the "[Status] Needs Review" label; someone from Jetpack Crew will then review this PR and merge it to be included in the next Jetpack release.


Jetpack plugin:

  • Next scheduled release: November 2, 2021.
  • Scheduled code freeze: October 25, 2021.

@github-actions github-actions bot added the [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! label Oct 20, 2021
Copy link
Contributor

@guarani guarani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this and it's working well. I didn't see any issues after three attempts.
If we find any issues with this workaround we can of course fix them in a separate PR.
Thanks for finding this solution @illusaen!

@illusaen illusaen merged commit 6f9ba31 into rnmobile/add/tiled-gallery-block Oct 21, 2021
@illusaen illusaen deleted the tiled-gallery-save branch October 21, 2021 01:33
@github-actions github-actions bot removed [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! [Status] Needs Team Review labels Oct 21, 2021
@guarani
Copy link
Contributor

guarani commented Oct 21, 2021

From the "Could not cleanly apply this PR to synced wpcom files" message under CI checks, it looks like there was an issue syncing to WP.com. I've ran into a similar error and was told it's safe to ignore (and is likely due to unrelated issue). If syncing had worked, we were going to mark the sync "abandoned" since we're not merging to master yet, so this seems safe to ignore.

@jeherve
Copy link
Member

jeherve commented Oct 21, 2021

we're not merging to master yet, so this seems dafe to ignore.

Exactly. Since you're merging into a feature branch, this can be ignored for now.

SiobhyB pushed a commit that referenced this pull request Oct 28, 2021
* [not verified] WIP implementation of save.

* [not verified] WIP: Got block attributes to show up in serialization

* [not verified] Make columnWidths nested array

* [not verified] WIP: Now converts serialized HTML images to inner blocks on load if they weren't already in store.

* [not verified] WIP load from save. Hacked in stuff to make it work. Need to find root cause.

* Adding Platform checks to ensure that mobile changes don't affect web. Fixing some lint warnings.

Co-authored-by: Wendy Chen <wendy.chen@automattic.com>
Co-authored-by: Paul Von Schrottky <paul.von.schrottky@automattic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Tiled Gallery [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ Touches WP.com Files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants