-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add layout styling settings handling #238
Conversation
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.
@adekbadek Tested according to the test instructions, and all works as expected. Just left one question about what seems to be an unnecessary complexity to me. If you disagree, then I'll approve.
import './style.scss'; | ||
|
||
const NewsletterPreview = ( { meta = {}, ...props } ) => { | ||
const ELEMENT_ID = useMemo( () => `preview-${ Math.round( Math.random() * 1000 ) }`, [] ); |
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.
@adekbadek This is a neat solution to create randomized IDs, but would it be simpler to pass the usedLayout.ID
as a prop to <NewsletterPreview />
? We wouldn't need a memoization then, either.
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, but the id will not be unique if there are two previews of the same layout visible at once ;)
This situation happens in layout selection modal – there's the little preview in the left column, and the large preview in the right column.
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.
I get it now, thanks for explaining. Looks good to me, then!
# [1.3.0](v1.2.0...v1.3.0) (2020-06-30) ### Bug Fixes * apply custom styles even if styling tab in sidebar is closed ([#240](#240)) ([20b08bc](20b08bc)) * localize date formats and notice text ([0cb82f1](0cb82f1)) * posts-inserter columns warning ([5db6b97](5db6b97)) * store translated success note as prop ([5638aee](5638aee)) ### Features * add "sent" status to posts list in dashboard ([ed369e4](ed369e4)) * add a "sent" editor notice after a campaign has been sent ([188908e](188908e)) * column middle alignment handling ([5f82db4](5f82db4)), closes [#231](#231) * handle custom styling of layouts ([#238](#238)) ([2ba844d](2ba844d)), closes [#225](#225)
🎉 This PR is included in version 1.3.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
All Submissions:
Changes proposed in this Pull Request:
Adds handling of custom styling (fonts, background color) to layouts.
Closes #225.
How to test the changes in this Pull Request:
Other information: