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

RNMobile: Remove workaround to a now-resolved dictation bug #59779

Merged
merged 1 commit into from Mar 12, 2024

Conversation

SiobhyB
Copy link
Contributor

@SiobhyB SiobhyB commented Mar 12, 2024

Related PRs

What?

Reverts a hack that was introduced in #49452. The hack involved manually checking for and removing an obj symbol that was added during dictation due to a React Native bug.

Why?

The React Native bug behind the issue was fixed in facebook/react-native#37188. As Gutenberg Mobile is now on React Native 0.73, we benefit from that fix. The workaround for the bug is therefore no longer necessary.

How?

The workaround was removed in ecbb195.

Testing Instructions

An installable build is available at wordpress-mobile/WordPress-iOS#22820 for testing on a physical device.

We need to verify that dictation works as expected on iOS, and that no obj symbol is added. The following example tests cover that, plus some other issues that came up previously:

Test 1: Verify dictation works as expected, with no content loss ⤵️
  1. Navigate to My Site → Posts and create a new post.
  2. Activate the iOS dictation feature and dictate some text.
  3. Notice the text added to the editor.
  4. If the keyboard remains visible while dictating, tap another block on the editor or begin typing onto the keyboard. Alternatively, if the keyboard is not visible while dictating, tap the language pop up.
  5. Verify that taking an action while dictation is still running doesn't lead to content loss
Test 2: Verify no obj symbol is added after dictation ⤵️
  1. Navigate to My Site → Posts and create a new post.
  2. Tap on the Post Title.
  3. Start dictating with voice.
  4. When finished, press Enter.
  5. Confirm that there is no visible obj symbol appended to the post title.
  6. Exit the post editor and verify that no obj symbol is visible from the post list.
Test 3: Verify block expands with content ⤵️
  1. Navigate to My Site → Posts and create a new post.
  2. Tap on "Start writing..." to focus the default paragraph block.
  3. Say "I am writing a new block with my voice"
  4. Switch to keyboard input and type some text
  5. Confirm that the paragraph box expands to a second line
Test 4: Verify text position is retained after dictating in middle of paragraph ⤵️
  1. Navigate to My Site → Posts and create a new post.
  2. Tap on "Start writing..." to focus the default paragraph block.
  3. Activate the iOS dictation feature and dictate "Mary had a little lamb its fleece was white as snow"
  4. Place the cursor after "little" then deactivate iOS dictation
  5. Activate the iOS dictation feature and dictate "Old MacDonald had a Farm"
  6. Tap below the block to start a new paragraph
  7. Confirm that the ordering of the words is "Mary had a little old MacDonald had a Farm lamb it's fleece was white as snow" not "Mary had a little lamb it's fleece was white as snow old MacDonald had a Farm"

In addition, verify that there are no failed tests across the Gutenberg, Gutenberg Mobile, and WordPress iOS PRs signalling unwanted side effects.

@SiobhyB SiobhyB added [Type] Code Quality Issues or PRs that relate to code quality Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) Mobile App - Automation Label used to initiate Mobile App PR Automation labels Mar 12, 2024
@SiobhyB SiobhyB changed the title refactor: Remove outdated dictation hack RNMobile: Remove workaround to a now-resolved dictation bug Mar 12, 2024
@SiobhyB SiobhyB marked this pull request as ready for review March 12, 2024 14:38
Copy link

github-actions bot commented Mar 12, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: SiobhyB <siobhyb@git.wordpress.org>
Co-authored-by: twstokes <twstokes@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@SiobhyB SiobhyB requested a review from twstokes March 12, 2024 14:39
Copy link
Contributor

@twstokes twstokes left a comment

Choose a reason for hiding this comment

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

LGTM @SiobhyB! I tested with iOS 17.4.

@SiobhyB SiobhyB merged commit 3561d77 into trunk Mar 12, 2024
65 checks passed
@SiobhyB SiobhyB deleted the rnmobile/remove-dictation-hack branch March 12, 2024 15:29
@github-actions github-actions bot added this to the Gutenberg 18.0 milestone Mar 12, 2024
carstingaxion pushed a commit to carstingaxion/gutenberg that referenced this pull request Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mobile App - Automation Label used to initiate Mobile App PR Automation Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants