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
Isolate course blocks #3885
Isolate course blocks #3885
Conversation
assets/blocks/blocks-setup.js
Outdated
|
||
import { SenseiIcon } from '../icons'; | ||
|
||
const blocksSetup = ( blocks ) => { |
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.
How about something like registerSenseiBlocks
?
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 used a more generic name because we were also setting the category icon, and we can to other stuff there, but I think this name works well too.
Updated in b09d1ef
@@ -86,7 +83,7 @@ public function enqueue_block_editor_assets() { | |||
return; | |||
} | |||
|
|||
Sensei()->assets->enqueue( 'sensei-blocks', 'blocks/index.js', [], true ); | |||
Sensei()->assets->enqueue( 'sensei-course-blocks', 'blocks/course-blocks.js', [], true ); |
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 could go with single-course
for the name, if it makes sense that these are grouped based on where they need to be loaded. The CSS files are named like that right now.
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.
Thank you for your review, @yscik!
I got your point, and I think it makes sense. But I think we could make this change in a future PR (maybe when we need that), just to avoid conflicts with this now: #3885 (comment)
It's because we'd need also to move this file out of the blocks
folder to make sense.
19ed087
to
b579fbb
Compare
This adds the toggle metaboxes feature to the course buttons only.
b579fbb
to
eae2c2c
Compare
91a2e45
to
cea5369
Compare
Hey @gkaragia! Thank you for looking! As we talked, I took a look, and I did some things to make it easier:
Anything else, let me know. |
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, works well!
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 like good changes.
Part of #3821
Changes proposed in this Pull Request
Testing instructions