-
Notifications
You must be signed in to change notification settings - Fork 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
Themes: Sheet action bar #3333
Themes: Sheet action bar #3333
Conversation
@folletto when you get a chance, I could use some ideas with regard to the screenshot styling. My latest approach is to |
Just noting what we chatted about: ideally we should write the markup as it was mobile, with the screenshot after the action bar, and then pad the action bar as needed to allow the screenshot to slide up. :) |
2cabffe
to
a75bba0
Compare
@@ -73,7 +73,10 @@ module.exports = { | |||
}, | |||
plugins: [ | |||
// Require source-map-support at the top, so we get source maps for the bundle | |||
new webpack.BannerPlugin( 'require( "source-map-support" ).install();', { raw: true, entryOnly: false } ) | |||
new webpack.BannerPlugin( 'require( "source-map-support" ).install();', { raw: true, entryOnly: false } ), | |||
new webpack.NormalModuleReplacementPlugin( /^analytics$/, 'lodash/utility/noop' ), // noop analytics module until we make it ssr-ready |
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.
lodash 4 compat warning on this path
c9bd8ee
to
f059c5e
Compare
354353d
to
e4d1fc3
Compare
The scroll position is preserved, cutting off the top of the details sheet. |
<div className="themes__sheet-content"> | ||
<SectionNav className="themes__sheet-section-nav" selectedText={ filterStrings[section] }> | ||
<NavTabs label="Details" > | ||
<NavItem path={ `/themes/${ this.props.tSemeSlug }/details` } selected={ section === 'details' } >{ i18n.translate( 'Details' ) }</NavItem> |
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.
tSemeSlug
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.
Hah :) Fixed.
Ah, I'm not sure there's an easy way of solving this. With |
render() { | ||
let actionTitle; | ||
if ( this.props.isLoggedIn && this.props.theme.active ) { |
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.
Can/should all this logic be shared with onPrimaryClick()
somehow?
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.
Yeah, I think so. I held off on refactoring this, because it reminded me of the getButtonOptions
stuff. Perhaps we could reuse some of that code?
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.
it reminded me of the getButtonOptions stuff
Good point. Fine to tackle it later, anyway.
Looks good and we can iterate once merged 👍 |
First iteration of some basic structural elements/CSS. We're not using actual theme data yet. Here we: - Ensure dependencies are ssr-ready - Use HeaderCake & Button for the action bar - Add some semi-working styling/markup - Add activate/customize/choose functionality to the action bar primary button - Add dummy content section + working SectionNav logic, so we can iterate on the CSS - Initialise i18n on the server routes
6d39e88
to
6ac7e8d
Compare
Implements part of #3160 and part of #3161
Looks like we'll need to sort out i18n now.Styling needs to be more responsive(!)Current state:
To test:
make run
Popover
menu