-
Notifications
You must be signed in to change notification settings - Fork 197
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 Lesson Properties block #4196
Conversation
cf035c1
to
e8c7b8e
Compare
Should we keep the name Lesson Information for this block? I think that's more accessible & still fits well. Some additional features for the future that could be nice:
|
Yes, perhaps. I originally had Lesson Details but changed it. I'm not sure the average person will know what "metadata" is. I'll solicit other ideas in next week's design call and make a decision then.
Next virtual meetup perhaps. 😃 |
I'm having a problem testing this. The controls in the sidebar don't seem to work for me. When I try to change the Length or Complexity, the value doesn't change at all. I tried disabling other plugins, tried with and without the Gutenberg plugin, etc. and couldn't find the culprit. Also tried on Firefox and Brave, same thing. Any ideas? I see these errors in the console, but they also seem to happen on the Course page, so I'm not sure they are specific to this block. Controls on other blocks are working.
Unrelatedly, I wonder if we should do something special when the block is added to an existing Lesson and the Length and Complexity are already set to 0 and None? The user experience is a bit weird since the block doesn't display anything, and it's not immediately obvious why that is. I wonder, actually, if it would make sense to have the controls in the toolbar? 🤔 |
I introduced a bug when fixing linter issues. All good now.
Yeah, we covered this in the design review so I'll be applying those changes.
I think Pablo said the minutes and complexity should be editable right inside the block. I won't be tackling that in this first iteration though. |
b143a02
to
b7602c5
Compare
Some other options for the block name:
Not sure which to choose! 😅 |
cc @sruj09 @pablohoneyhoney re: naming ^ My vote would be for "Lesson Properties". Seems pretty clear and flexible, and we can always change it in a later version if desired. |
I like Lesson Information but Lesson Properties works too! |
@Automattic/evergreen This one still needs a block icon but is ready for review 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.
Looks good! A few suggestions, plus I pushed a small fix for the number control component, it should pick up the proper editor styles now and have full width.
@yscik Re: icons. I think I like the info icon one the best. |
Can't pass `null` for `_quiz_has_questions`
Set to minimum value or 0 instead
Co-authored-by: Peter Kiss <[email protected]>
c433590
to
5fa339e
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 great! There is an issue in firefox where the number input buttons are barely clickable caused by padding but this seems like a firefox bug.
@yscik Do you have an SVG for the block icon? I'm partial to the info one but the meta document one is also good. |
Here is the icon SVG cleaned up, file/code: icon-sensei-lesson-properties.svg.zip <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path d="M16.181 17.381a7.61 7.61 0 01-2.13.133L15.778 20H18l-1.819-2.619zm-5.479-.953a7.712 7.712 0 01-2.12-1.928H5.5v-9h2.759A7.793 7.793 0 019.523 4H4v12h4.778L6 20h2.222l2.48-3.572z"/>
<path d="M15.541 8.944h-1.5v3.997h1.5V8.944zM15.541 7.944h-1.5V6.55h1.5v1.395z"/>
<path d="M20.79 9.768c0 3.425-2.714 6.269-6.145 6.269-3.43 0-6.145-2.844-6.145-6.269 0-3.424 2.714-6.268 6.145-6.268 3.43 0 6.145 2.844 6.145 6.268zm-6.145 4.769c2.565 0 4.645-2.135 4.645-4.769C19.29 7.135 17.21 5 14.645 5 12.08 5 10 7.135 10 9.768c0 2.634 2.08 4.769 4.645 4.769z"/>
</svg>
|
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.
🚢
Changes proposed in this Pull Request
Adds a Lesson Properties block for lessons that displays lesson length and difficulty.
0
instead ofnull
for_quiz_has_questions
. I think this was more of a nice-to-have to keep the database cleaner, but let me know if I got that wrong:_lesson_course
post meta:Testing instructions
Screenshots
To Do