-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[Mobile] - Move Undo/Redo buttons #51766
Conversation
Size Change: +303 B (0%) Total Size: 1.43 MB
ℹ️ View Unchanged
|
Flaky tests detected in b23d56a. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5519198557
|
…mmatically due to issues with views and appium
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was able to successfully run through the Undo/Redo cases on both iOS and Android Demo apps. Nice work, LGTM! The code looks great as well. 👍
… Android's main host app activity
…eded for Android's main host app activity
fireEvent.press( screen.getByLabelText( 'Undo' ) ); | ||
fireEvent.press( screen.getByLabelText( 'Undo' ) ); | ||
fireEvent.press( screen.getByLabelText( 'Undo' ) ); | ||
toggleUndo(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh thanks for taking care of that!
Related PRs:
What?
This PR updates the current location of the Undo/Redo buttons moving them from the toolbar into the app navigation header.
Why?
It's part of the current project of updating the mobile editor's UX.
How?
First, it removes the current location for the undo/redo buttons within the header toolbar. It now adds subscription callbacks using the React Native Bridge package to communicate with the host apps.
Updates integration undo/redo tests (editor history) by mocking the
subscribeOnUndoPressed
andsubscribeOnRedoPressed
callbacks.React Native Bridge
It adds two new listeners:
onUndoPressed
which will notify when the undo button was pressed from the host app's navigation header.onRedoPressed
which will notify when the redo button was pressed from the host app's navigation header.As well as two new functions:
toggleUndoButton
which will notify the host app if the undo button should be enabled and not dimmed.toggleRedoButton
which will notify the host app if the redo button should be enabled and not dimmed.These are small changes but it involves several files for both platforms.
Device Tests Utils
It updates the
toggleHtmlMode
util to use the "More options button" (three dots) in the new header navigation bar for Android and in the already existing one for iOS.Demo app changes (Android)
Demo app changes (iOS)
Testing Instructions
Testing should be done in both the Android an iOS demo apps.
Screenshots or screencast
iPhone Portrait
iPhone Landscape
iPad Portrait
iPad Landscape
Android Portrait
Android Lanscape
Android Tablet Portrait
Android Tablet Lanscape