-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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] - List V2 - Prevent error when list is empty #43861
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 tasks
Size Change: +4 B (0%) Total Size: 1.27 MB
ℹ️ View Unchanged
|
dcalhoun
approved these changes
Sep 5, 2022
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.
🚀 LGTM. I verified the fix works on a iPhone 13 simulator and Android emulator. Thanks for putting this together so quickly.
geriux
pushed a commit
that referenced
this pull request
Sep 6, 2022
* Release script: Update react-native-editor version to 1.81.0 * Release script: Update with changes from 'npm run core preios' * Release script: Update react-native-editor version to 1.81.1 * Release script: Update with changes from 'npm run core preios' * [Mobile] - Add BlockListCompact (#43431) * Mobile - Introduce BlockListCompact - Lighter version of the default BlockList with simpler functionality for use cases like the List V2 block * Mobile - Update List V2 tests since it's not needed to fire the layout event change with the BlockListCompact component * Mobile - BlockListCompact - Add note of the component props and which block is currently using it * [RNMobile] List block v2: Fix text color inconsistencies with list items (#43244) * List block v2: use default color for preferred color scheme * Use usePreferredColorSchemeStyle hook for List Item style * Remove unneeded font-size value from list item styles * Mobile - Disable FastImage on Android (#43322) * [Mobile] - Fix dynamic React Native version (#43058) * Mobile - Fix dynamic React Native version * Mobile - Adds jvmargs setting * [RNMobile] Use default placeholder text color for native List Item (#43353) * Use default placeholder text color for native List Item * Move list item placeholder hex value to stylesheet * Resolve test failure * Add opacity to list block placeholder color styles * Update List block v2 placholder currentTextColor * Mobile - List Item - Check if currentTextColor is not undefined and moves opacity value into a const * Mobile - List Item - Add optional chaining for style.color Co-authored-by: Gerardo <gerardo.pacheco@automattic.com> * Mobile - Update CHANGELOG * Release script: Update react-native-editor version to 1.81.2 * Release script: Update with changes from 'npm run core preios' * Mobile - List V2 - Prevent error when list is empty (#43861) * Mobile - Update Changelog Co-authored-by: Derek Blank <derekpblank@gmail.com> Co-authored-by: David Calhoun <438664+dcalhoun@users.noreply.github.com>
SiobhyB
pushed a commit
that referenced
this pull request
Sep 6, 2022
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Mobile App - i.e. Android or iOS
Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change)
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes wordpress-mobile/gutenberg-mobile#5135
What?
Brings changes from #43761 since this branch doesn't have the full merge from
trunk
we can't cherry-pick it.Why?
Currently, there's a crash in the production app where pasting or opening a post with an empty list would crash the editor.
How?
Brings the changes from #43761 which adds a safe check before accessing the
tagName
prop.Testing Instructions
Precondition: A site with Gutenberg >= 13.8 plugin. (Already available on simple sites).
Another option is to use a self-hosted site and install the latest Gutenberg plugin version >= 13.8.0. You can install the latest version here. List V2 is now enabled by default for mobile.
NOTE: Sometimes the new List block won't be shown the first time the editor is opened due to fetching the flag value when opening the editor, so if you still see the old version without inner blocks, close the editor and open it again.
Screenshots or screencast