-
Notifications
You must be signed in to change notification settings - Fork 4.7k
[RNMobile] Search Block: Styling #30052
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
Conversation
Only adds a shell of a block.
This alert will be removed once styling is added in a later PR.
This will keep the code cleaner and easier to follow.
This toolbar action is now visible in the UI so the temporary alert message is no longer needed.
Was causing issues with layout in iOS. Styling will be addressed fully in a different PR.
…-search-block-button-position
…-search-block-button-position
Moved the CSS_UNIT code to a shared Utils file in preparation for using the same code inside the native implementation of the search block.
Also moved the default values from the web version to the shared utils file.
# Conflicts: # packages/block-library/src/search/edit.native.js # packages/block-library/src/search/rich-text.android.scss # packages/block-library/src/search/rich-text.ios.scss # packages/block-library/src/search/style.native.scss
…le/3073-search-block-settings
# Conflicts: # packages/block-library/src/search/edit.native.js
- Set the onFocus() method to ensure if the placeholder text is clicked on when the block is NOT selected then the block will be selected. - Set isSelected in RichText elements to false for initial draw to prevent odd behavior on iOS where the Search block will attempt to steal focus from other text blocks. - Set the placeholder text to focused when the block is first added.
|
cc: @iamthomasbishop (and Kylea Parker but she's not in this repo for direct pinging). |
|
Size Change: +10.8 kB (+1%) Total Size: 1.41 MB
ℹ️ View Unchanged
|
|
Hi @AmandaRiu 👋 This is looking really good! I have a couple of questions:
|
|
@kyleaparker Thanks for the review!
Currently it just wraps in place. The changes required for moving the button below the text input are not included in this PR. I plan on handling that separately.
Yup, selection color has not been changed for this project and is just using the same colors as the rest of the blocks. |
👍
Ok sounds good, thanks for confirming! |
cameronvoell
left a comment
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.
Tested the various states in light mode and dark mode on Android and iOS and was unable to find any issues. Code updates seem consistent with other native blocks as well. Search block is looking great, nice work!
geriux
left a comment
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.
Hey @AmandaRiu 👋
So exciting to see how far this block is getting at 👏
I just left a couple of comments suggesting a different approach to merge styles, to simplify it a bit. Let me know what you think about it! 😃
|
I did a bunch of testing of this PR on iOS and Android and it worked really well. Nice work! |
|
@geriux Thank you for the review and all the suggestions. Implemented and ready for another round! |
geriux
left a comment
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.
Nice work!!! 🎉 LGTM. Tested it on both iOS and Android.
Gutenberg Mobile PR
wordpress-mobile/gutenberg-mobile#3210
Note: The PR to move toolbar options to the settings panel must be merged before this PR can be taken out of draft.Description
This PR is one in a series of PRs to port the search block to mobile. This PR implements styling from the latest i2 designs plus dark mode support:
Designs
How has this been tested?
Tested on an Android emulator and iOS simulator. Test the following states in light and dark mode:
Screenshots
Types of changes
New feature currently only available in devOnly mode. No changes were made that would effect the web-version of the search block, nor any other block.
Checklist: