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

16.8.1 Hot Fix #16059

Merged
merged 14 commits into from
Mar 11, 2021
Merged

16.8.1 Hot Fix #16059

merged 14 commits into from
Mar 11, 2021

Conversation

bjtitus
Copy link
Contributor

@bjtitus bjtitus commented Mar 10, 2021

This is a PR to a hot fix branch to fix an issue with Stories blocks overwriting the contents of a post.

Fixes wordpress-mobile/gutenberg-mobile#3246

Gutenberg-Mobile PR: wordpress-mobile/gutenberg-mobile#3246
Gutenberg PR: WordPress/gutenberg#29734

To test:

  • Add some blocks to a post.
  • Add a Story block.
  • Add a media item.
  • Tap on the right arrow button to continue.
  • Observe that the previous added blocks are not removed.

Changes

  • Uses a new replace(blockID: blockID, content: content) in Gutenberg to replace only the block's content instead of handling the contents of the entire post.
  • Removes some unnecessary Alerts when posts fail to complete uploads. These can be retried later on the Post List screen.

Regression Scenarios

New Story Post

  • Tap the FAB
  • Select "Story post"
  • Select multiple media from the Photo or WordPress libraries
  • Add more media by tapping the + button in the bottom right
  • Take a photo with the camera
  • Publish the post by tapping the arrow in the upper right, filling out the sheet, and hitting Publish
  • Ensure that the story posts and contents are visible in the post

New Post with Story block

  • Create a new Blog Post
  • Add a title
  • Add a paragraph with text
  • Add a Story block
  • Click "Add Media"
  • Add media from your library or camera
  • Save by tapping the arrow icon in the upper right
  • Ensure that the block updates with the new media
  • Tap the Publish button to publish the post

Editing an existing post

  • Edit an existing Story post
  • Tap the "Edit" icon in the top right of the Story block
  • Ensure that the media is loaded
  • Ensure that overlays (text) is editable if the story was posted from the device
  • Make sure that editing and saving the contents of the story causes the block to be updated
  • Make sure that Updating the post saves those edits and updates the preview for the post

Discarding edits to a post

  • Edit an existing Story post
  • Tap the "Edit" icon in the top right of the Story block
  • Ensure that the media is loaded
  • Ensure that overlays (text) is editable if the story was posted from the device
  • Make changes to the post
  • Save the changes by tapping the arrow in the upper right
  • Discard the post changes by tapping the X in the top left in the Gutenberg editor
  • Make sure the post isn't updated

Discarding edits in Kanvas

  • Edit an existing Story post
  • Tap the "Edit" icon in the top right of the Story block
  • Ensure that the media is loaded
  • Ensure that overlays (text) is editable if the story was posted from the device
  • Make changes to the post
  • Tap the X in the top left.
  • Make sure a dialog comes up to confirm you would like to discard the edits
  • Hit "Discard"
  • Ensure the block is not updated and no changes have been made to the post.

PR submission checklist:

  • I have considered adding unit tests where possible.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

bjtitus added 5 commits March 10, 2021 12:39
These errors are not guarantees that the post cannot be retried so we will not show them for now (an error state will be shown in the post list).
There is no block to replace so we will replace the entire post.
@bjtitus bjtitus self-assigned this Mar 10, 2021
@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Mar 10, 2021

You can trigger an installable build for these changes by visiting CircleCI here.

@guarani guarani added the Gutenberg Editing and display of Gutenberg blocks. label Mar 11, 2021
@guarani
Copy link
Contributor

guarani commented Mar 11, 2021

Testing ea42a67

  • New Story Post
  • New Post with Story block
  • Editing an existing post
  • Discarding edits to a post
  • Discarding edits in Kanvas

@bjtitus bjtitus added this to the 16.8 milestone Mar 11, 2021
@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Mar 11, 2021

Warnings
⚠️

This PR contains changes to RELEASE_NOTES.txt.
Note that these changes won't affect the final version of the release notes as this version is in code freeze.
Please, get in touch with a release manager if you want to update the final release notes.

Generated by 🚫 dangerJS

Podfile Show resolved Hide resolved
@guarani guarani self-requested a review March 11, 2021 02:23
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.

Tested (as mentioned in the above comment) and code looks good (although I'm not too familiar with the Story Editor code).

:shipit:

@bjtitus bjtitus merged commit cecc635 into release/16.8.1 Mar 11, 2021
@bjtitus bjtitus deleted the release/16.8.1-fix branch March 11, 2021 03:02
@fluiddot fluiddot restored the release/16.8.1-fix branch March 11, 2021 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Gutenberg Editing and display of Gutenberg blocks.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants