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
Generalize lesson block inserters #3952
Conversation
11d97aa
to
216d701
Compare
216d701
to
e947dce
Compare
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.
Looks good! Just a documentation update.
import { useCallback, useEffect, useState } from '@wordpress/element'; | ||
|
||
/** | ||
* Insert an empty lesson block to the end of the module when it's 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.
This needs updating.
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.
Fixed in 31fca71
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.
LGTM!
Some more preparation work for sharing helpers with the Quiz block
Changes proposed in this Pull Request
useAutoInserter
to automatically insert an empty inner block (as used for the module and lesson blocks)useKeydownInserter
Testing instructions
Backspace
, and new one created withEnter
. (Should behave the same as before)