-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 list start, reversed settings (in progress) #15113
Conversation
@@ -119,6 +119,18 @@ export default class Editable extends Component { | |||
this.editorNode.className = classnames( nextProps.className, CLASS_NAME ); | |||
} | |||
|
|||
if ( this.props.start !== nextProps.start ) { | |||
this.editorNode.setAttribute( 'start', nextProps.start ); |
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.
Why this node gets updated using setAttribute but in other places the value is set through direct mutation?
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.
Probably because the others need to be removed if needed. Would be good to unify this though.
3aae7fc
to
88dc84c
Compare
label={ __( 'List Type' ) } | ||
value={ type } | ||
options={ [ | ||
{ label: 'Decimal', value: '1' }, |
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.
Would it be possible to unset the attribute if "Decimal" is selected?
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.
Why do we need to unset the attribute?
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.
Thinking about it more, you are right that it shouldn't be unset. But then there should be one extra option that wouldn't set the attribute. Perhaps we can call this option "Theme", as it would have whatever type the theme defined (usually decimal).
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.
@Jackie6 Could you add an extra button then to unset the value?
f6ad4f07e6a1c8d99e55aa7acb01cf8ef1dfddd7 (HEAD -> update/list-block, Jackie6/update/list-block) Add id to BaseControl 212cab106044c4d7300d9441e48241b911db0bcb Fix unit test and e2e test 421a198bf58431c91b4c09d6ee45ba932762cb15 Refine the type definition of start and reversed 4172707059558ba9fc47d9557457e0b8e441f050 Fix typo 21ed1dbeb7881a9a5a6eea85fb3293e9d6ba0d5a Update CSS styles 925f1ab1ed073b31358a129c62abd56021e14c38 Update list type style and remove description ef0aca95cb88203ceff78b81473e37ad8fc22714 Allow the start to be NaN 495166d3fc14591ceb88597915a19e976b2ebbeb Change to check strict equality 216ca51cfacfc174ca00d9669b88b53eaa6d0356 Fix the accidental change of travis yml 8e31259624ece930c385bf9cb7a28046505c7aff Change local state to attributes 09199ff9516aab099e47ed6e61fd4e2fadfdb95b Add list type, start, reversed settings
e78b23f
to
3fbf11f
Compare
Thank you, @Jackie6, for working on this PR! 🎉 |
@Jackie6 Feel free to create a separate PR for the |
This update is in response to changes made on the web side in #15113 that were causing a crash on mobile.
This update is in response to changes made on the web side in #15113 that were causing a crash on mobile.
* [RNMobile] update mobile to not use ListEdit This update is in response to changes made on the web side in #15113 that were causing a crash on mobile. * Extract list block logic not shared with mobile to separate component * Improve name of AdditionalSettings component
* [RNMobile] update mobile to not use ListEdit This update is in response to changes made on the web side in WordPress#15113 that were causing a crash on mobile. * Extract list block logic not shared with mobile to separate component * Improve name of AdditionalSettings component
* Squash for easier merge: f6ad4f07e6a1c8d99e55aa7acb01cf8ef1dfddd7 (HEAD -> update/list-block, Jackie6/update/list-block) Add id to BaseControl 212cab106044c4d7300d9441e48241b911db0bcb Fix unit test and e2e test 421a198bf58431c91b4c09d6ee45ba932762cb15 Refine the type definition of start and reversed 4172707059558ba9fc47d9557457e0b8e441f050 Fix typo 21ed1dbeb7881a9a5a6eea85fb3293e9d6ba0d5a Update CSS styles 925f1ab1ed073b31358a129c62abd56021e14c38 Update list type style and remove description ef0aca95cb88203ceff78b81473e37ad8fc22714 Allow the start to be NaN 495166d3fc14591ceb88597915a19e976b2ebbeb Change to check strict equality 216ca51cfacfc174ca00d9669b88b53eaa6d0356 Fix the accidental change of travis yml 8e31259624ece930c385bf9cb7a28046505c7aff Change local state to attributes 09199ff9516aab099e47ed6e61fd4e2fadfdb95b Add list type, start, reversed settings * Revert adding attribute for now, let's extract to a separate PR * Use proper TextControl * Adjust toggle control to unset attribute * Clearer label
* [RNMobile] update mobile to not use ListEdit This update is in response to changes made on the web side in #15113 that were causing a crash on mobile. * Extract list block logic not shared with mobile to separate component * Improve name of AdditionalSettings component
* Squash for easier merge: f6ad4f07e6a1c8d99e55aa7acb01cf8ef1dfddd7 (HEAD -> update/list-block, Jackie6/update/list-block) Add id to BaseControl 212cab106044c4d7300d9441e48241b911db0bcb Fix unit test and e2e test 421a198bf58431c91b4c09d6ee45ba932762cb15 Refine the type definition of start and reversed 4172707059558ba9fc47d9557457e0b8e441f050 Fix typo 21ed1dbeb7881a9a5a6eea85fb3293e9d6ba0d5a Update CSS styles 925f1ab1ed073b31358a129c62abd56021e14c38 Update list type style and remove description ef0aca95cb88203ceff78b81473e37ad8fc22714 Allow the start to be NaN 495166d3fc14591ceb88597915a19e976b2ebbeb Change to check strict equality 216ca51cfacfc174ca00d9669b88b53eaa6d0356 Fix the accidental change of travis yml 8e31259624ece930c385bf9cb7a28046505c7aff Change local state to attributes 09199ff9516aab099e47ed6e61fd4e2fadfdb95b Add list type, start, reversed settings * Revert adding attribute for now, let's extract to a separate PR * Use proper TextControl * Adjust toggle control to unset attribute * Clearer label
* [RNMobile] update mobile to not use ListEdit This update is in response to changes made on the web side in #15113 that were causing a crash on mobile. * Extract list block logic not shared with mobile to separate component * Improve name of AdditionalSettings component
@Jackie6 I've tried to reach out via other channels, but I have been unsuccessful in getting in touch. I wanted to make sure you saw the request to you for consent to re-license your contributions to Gutenberg under GPLv2 and MPLv2 here: #31893. If you would kindly review that description and comment accordingly it would be greatly appreciated. Thanks! |
Description
Partially fixes #13888
Fix #17040
How has this been tested?
Screenshots
To do list