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

Editing: Replace snackbar with compact notice when switching editor mode #15583

Merged
merged 5 commits into from Nov 18, 2021
Merged

Editing: Replace snackbar with compact notice when switching editor mode #15583

merged 5 commits into from Nov 18, 2021

Conversation

ovitrif
Copy link
Contributor

@ovitrif ovitrif commented Nov 17, 2021

Fixes #11819

It was brought to our attention that some users find the snackbar appearing at the bottom of the screen when the editor mode is switched to HTML annoying because they cannot edit the last lines before it disappears.

This PR replaces the snackbar at the bottom with a compact notice shown at the top of the screen, below the main top bar of the app (see screenshots).
This solution was suggested after a discussion in the issue where we also explored the option of not showing any notice.

The snackbar is now replaced with the notice in both cases:

  • When we switch the editor to HTML mode
  • When we switch the editor to Visual Mode

To test

  1. From My Site press the Posts button or scroll down and select Blog Posts from the list
  2. In post cards mode press the More button / In post list mode press the dots at the right of the post
  3. Press Edit (first button)
  4. In the editor, Tap the 3 dots in the upper right corner
  5. Tap HTML Mode (3rd button)
  6. Verify that a compact notice appears at the top of the editor, and no snackbar is shown
  7. Tap again the 3 dots in the upper right corner
  8. Tap Visual Mode (3rd button)
  9. Verify that a compact notice appears at the top of the editor, and no snackbar is shown

Screenshots

Switching to HTML mode
Before After
android_switch_to_html_before 5_android_switch_to_html_after
Switching to Visual mode
Before After
android_switch_to_visual_before 6_android_switch_to_visual_after
GIF Preview
Notice when switching editor mode
gif_preview_notice

Regression Notes

  1. Potential unintended areas of impact
    None, because the snackbar that is replaced was only shown when switching editor mode, and now we show a notice instead.

  2. What I did to test those areas of impact (or what existing automated tests I relied on)
    Manual testing.

  3. What automated tests I added (or what prevented me from doing so)
    None, since this change does not warrant such tests.

PR submission checklist:

  • I have completed the Regression Notes.
  • 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.

@antonis antonis self-requested a review November 17, 2021 13:21
@antonis antonis self-assigned this Nov 17, 2021
@antonis antonis added this to the 18.8 milestone Nov 17, 2021
@antonis antonis marked this pull request as ready for review November 17, 2021 13:35
@antonis antonis changed the title [DO NOT MERGE] Editing: Replace snackbar with compact notice when switching editor mode Editing: Replace snackbar with compact notice when switching editor mode Nov 17, 2021
Copy link
Member

@antonis antonis left a comment

Choose a reason for hiding this comment

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

Great work @ovitrif 👍
I tested this on an Pixel 5 (Android 12) and everything works as expected 🎉
The code changes are consistent and LGTM ✅

@ovitrif
Copy link
Contributor Author

ovitrif commented Nov 17, 2021

Thank you @antonis for the review!
Feels great to be able to contribute 😇

@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Nov 18, 2021

You can trigger optional UI/connected tests for these changes by visiting CircleCI here.

@peril-wordpress-mobile
Copy link

You can test the changes on this Pull Request by downloading the APKs:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Snackbar notice when switching to HTML editor prevents editing last line of text
2 participants