-
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
[RNMobile] - Starter Page Templates - Picker and Preview design updates #20959
Changes from 1 commit
abdeae5
bbed05c
85f1404
fab02d3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,5 +56,5 @@ | |
} | ||
|
||
.separatorDark { | ||
background-color: $gray-70; | ||
background-color: #2d2d2d; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -94,8 +94,9 @@ class Layout extends Component { | |
|
||
render() { | ||
const { | ||
mode, | ||
getStylesFromColorScheme, | ||
isPage, | ||
mode, | ||
showPageTemplatePicker, | ||
} = this.props; | ||
|
||
|
@@ -143,8 +144,10 @@ class Layout extends Component { | |
parentHeight={ this.state.rootViewHeight } | ||
style={ toolbarKeyboardAvoidingViewStyle } | ||
> | ||
{ showPageTemplatePicker && ( | ||
<__experimentalPageTemplatePicker /> | ||
{ isPage && ( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Before, the component was being unmounted after the user has at least one block. To be able to have a fade-out animation, the component can't be unmounted. So now the picker will be rendered if its a page only (since we don't want to import everything for a standard post) Within the component, it will handle if it should be rendered or not by passing |
||
<__experimentalPageTemplatePicker | ||
visible={ showPageTemplatePicker } | ||
/> | ||
) } | ||
<Header /> | ||
<BottomSheetSettings /> | ||
|
@@ -157,12 +160,14 @@ class Layout extends Component { | |
|
||
export default compose( [ | ||
withSelect( ( select ) => { | ||
const { __unstableIsEditorReady: isEditorReady } = select( | ||
'core/editor' | ||
); | ||
const { | ||
__unstableIsEditorReady: isEditorReady, | ||
getCurrentPostType, | ||
} = select( 'core/editor' ); | ||
const { getEditorMode } = select( 'core/edit-post' ); | ||
|
||
return { | ||
isPage: getCurrentPostType(), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this should be I think I'd still encapsulate that logic in the HOC, maybe splitting the |
||
isReady: isEditorReady(), | ||
mode: getEditorMode(), | ||
}; | ||
|
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 wrapper will solve the issue with the transparency of the buttons