-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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] Page Template Picker UI Improvements #19307
Conversation
const butonTextStyles = getStylesFromColorScheme( styles.buttonText, styles.buttonTextDark ); | ||
const accessibilityLabel = sprintf( | ||
/* translators: accessibility text. Inform about list of predefined layout options. %1$s: Layout name, e.g About. */ | ||
__( 'Predefined layout picker. %1$s' ), |
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.
After reading this https://make.wordpress.org/design/2019/11/14/blocks-patterns-and-layouts/ I used Layout
instead of Page template
.
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, I wonder if we should start renaming things more broadly (file and component names)
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.
This seems like too much text before the actual button label. I'm not sure I would specify an accessibilityLabel
here. Instead, we can add an accessibilityHint="Double tap to select layout"
.
Ideally we should find a way to convey that this is a list of possible layouts rather than individual buttons, but I don't see any support for accessibility containers in React Native yet. Since we only have a couple buttons now, it's not a big deal, but something to keep in mind for the future.
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.
Good idea! I'll use accessibilityHint
instead. I hope they add support for that, it'd be super great.
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.
Updated 4c1c326
@iamthomasbishop are we going with Twemoji for the icons or should we use the native emoji on each platform? If we are, we should probably add |
@@ -129,10 +129,10 @@ class Layout extends Component { | |||
parentHeight={ this.state.rootViewHeight } | |||
style={ toolbarKeyboardAvoidingViewStyle } | |||
> | |||
{ showPageTemplatePicker && <__experimentalPageTemplatePicker /> } |
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.
In #19106 I was also moving the picker to the bottom, although I guess it makes more sense to do it as part of this PR.
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.
This is looking pretty nice 👌 From my side, it's good to go after the accessibility changes. I can't request a review from @iamthomasbishop directly, but I'd wait for him to check that the changes look right
Thanks!! Yup, I'll wait to check with @iamthomasbishop about your comment above about the icons and that the changes look ok. 👍 |
Hey @geriux – looking good! I just have a few notes:
|
Thanks for reviewing it @iamthomasbishop!
Haha :D no problem, I've just updated the code and the screenshots above, let me know if they look ok now.
Changed for the native emoji
Right now they move down, let me know if this is ok or if they should stay fixed: |
@geriux awesome! Colors, emoji, and positioning are all looking great! |
Gutenberg-mobile
PR -> wordpress-mobile/gutenberg-mobile#1720Description
This PR updates the current styles for the Page Template picker. It also includes some code changes to support more items in the list and accessibility.
To test
Screenshots
iOS
Android
Types of changes
Checklist: