-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Code Editor: unselect blocks and disable inserter #9815
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
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.
I dig it. Tested locally and it was nice.
Seems a good contender for an e2e test or two. If you want to add them now I'm happy to review again, otherwise could you file an issue? 😄
return ( | ||
<NavigableToolbar | ||
className="edit-post-header-toolbar" | ||
aria-label={ __( 'Editor Toolbar' ) } | ||
> | ||
<FullscreenModeClose /> | ||
<div> | ||
<Inserter position="bottom right" /> | ||
<Inserter disabled={ mode !== 'visual' } position="bottom right" /> |
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.
These sorts of magic constants always irk me, even when they're strings. This is pretty obvious in its intent, but it's still possible to make typos, etc. 🤷♂️
Not really isolated to this PR though.
Yep! Ship it. This works well. |
@tofumatt Test added if you want to take another look. |
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.
Thanks for the test! ❤️
🚢
test/e2e/specs/code-editor.test.js
Outdated
switchToEditor, | ||
} from '../support/utils'; | ||
|
||
describe( 'code editor', () => { |
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.
We have an editor-modes.test.js
that this might fit into better, up to you though. Our test names are odd 🤷♂️
test/e2e/specs/code-editor.test.js
Outdated
|
||
describe( 'code editor', () => { | ||
beforeEach( async () => { | ||
await await newPost(); |
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.
Is there an echo in here? 😉
… inserter disabled
75bdcf9
to
306ba2e
Compare
Yay, less is more! I'm glad we took this route to fix the parent issue. |
closes #9807
This PR does two things: