[RNMobile] Block title in unsupported block#18268
Conversation
…ng original name in place of 'Unsupported'.
…ause the small icon was too hard to press. Also rearranging the BottomSheet to work the height paddings out correctly.
…or the help block. Few color changes. Adding some text to the help block.
| text-align: center; | ||
| } | ||
|
|
||
| .infoTitle { |
There was a problem hiding this comment.
I think we must create a infoTitleDark class and update the color.
| color: $gray-dark; | ||
| } | ||
|
|
||
| .infoDescription { |
There was a problem hiding this comment.
Same as for infoTitle, we should create a infoDescriptionDark class and update the color.
| > | ||
| <View style={ styles.infoContainer } > | ||
| <Icon icon="editor-help" style={ styles.infoIcon } size={ styles.infoIcon.size } /> | ||
| <Text style={ [ styles.infoText, styles.infoTitle ] }> |
There was a problem hiding this comment.
We should call getStylesFromColorScheme on there.
| <View style={ styles.infoContainer } > | ||
| <Icon icon="editor-help" style={ styles.infoIcon } size={ styles.infoIcon.size } /> | ||
| <Text style={ [ styles.infoText, styles.infoTitle ] }> | ||
| { __( '\'' + title + '\' isn\'t yet supported on WordPress for ' + platformText ) } |
There was a problem hiding this comment.
You can't compose strings inside __(), you need to use sprintf instead and add a placeholder for the title. For the platform, I think it's safer to have one string for iOS and one for Android, since it's more obvious for translators.
| } | ||
|
|
||
| renderSheet( title ) { | ||
| return <BottomSheet |
There was a problem hiding this comment.
I'm surprised that it's not caught by the lint job, but I noticed a different JSX style in this file than the rest of the code: we normally wrap the returned JSX in parentheses and jump to a new line:
return (
<BottomSheet
isVisible={ this.state.showHelp }
hideHeader
onClose={ this.toggleSheet.bind( this ) }
>
{ /* ... */ }
</BottomSheet>
);I can't find it mentioned in any coding style guide, but that's the style I've seen and written everywhere else.
There was a problem hiding this comment.
Addressed in f7c8582.
|
👋 @maxme and @koke , thanks for the review! I've addressed your comments and this is ready for another pass. I've also removed the "Close" button from the bottom sheet as we don't have such a dismiss button in other bottom sheets anyway. cc @iamthomasbishop, there was a relevant question in the original PR and I went with a "No" here... let me know if you think we should reinstate the Close button. |
|
|
||
| // translators: %s: Name of the block | ||
| const titleFormat = Platform.OS === 'android' ? __( '\'%s\' isn\'t yet supported on WordPress for Android' ) : | ||
| __( '\'%s\' isn\'t yet supported on WordPress for iOS' ); |
There was a problem hiding this comment.
Not an issue for this PR, but noting for the future: I just realized this might be used in other apps, so we should find a way to inject the app name from the apps instead.
|
Addressed the additional feedback @koke , ready for another pass. |
maxme
left a comment
There was a problem hiding this comment.
I can't find color definition on the original issue (wordpress-mobile/gutenberg-mobile#479) or on the other PR (#17943). Anyway, the end results looks good to me. If the color scheme have to be changed, it can be done in a follow up PR.
![]()
Addressed with 92d7e71. I set the light-mode icon color to Screenshots:
|
|
This PR already has a 👍 and checked in with @koke too and he's fine with the PR state. The colors should be OK now @iamthomasbishop, but if they're not we can open a new PR really quickly, no problem. I'll merge this one as soon as the gutenberg-mobile side PR also gets the 👍. |
SergioEstevao
left a comment
There was a problem hiding this comment.
Working great on iOS (dark and light) and Android.
|
@hypest Oops, I meant that |
|
Sorry for the confusion @iamthomasbishop , apparently I should have restarted the app inbetween mode switching for the proper colors to appear. Without changing the code, here are new screenshots taken:
|
|
After chatting with @iamthomasbishop over Slack, revised the light-mode color of the icon on the sheet to be
|
|
👋 @SergioEstevao , I know you've already 👍 'd the PR but, I added 0569a38 to fix the mobile tests (were failing on the gutenberg-mobile PR after e26a61b landed) and 973c2f8 to remove the hardcoded platform set and enable testing both platform so, can you have another pass please? Thanks! |
|
@SergioEstevao I had another look and all still looking good! |














(this is a follow up from #17943 and will copy and amend its description here. Recreated that PR so we merge it while @illusaen is temporarily away)
Description
Unsupportedblock to show original block name.How has this been tested?
UnsupportedBlockEdit)Screenshots
Types of changes
Checklist: