sensei
sensei copied to clipboard
Lesson Actions: The block is not visible in the editor
Steps to Reproduce
- Go to the edit lesson screen.
What I Expected
I expected to see the lesson actions.
What Happened Instead
The lesson actions block was there but not visible.
Screenshot / Video
For more context, initially, it had a warning explaining that it's not displayed when Learning Mode is enabled for that course. Not sure about the context why it's not there anymore. We probably need to research the reason, and recap the context of this to see the best approach to fix this.
There is also a similar fix for the Lesson Properties that we implemented in the past: https://github.com/Automattic/sensei/pull/6078
I don't think this one's a bug. For context - https://github.com/Automattic/sensei/pull/5356#issuecomment-1184616918
Good to know this is expected. Thanks, Donna!
I think I just found out what caused this confusion. When creating a new lesson from Lessons -> New Lesson, the actions are visible because the lesson is not associated with a course. Once the lesson gets associated with a course, they disappear.
https://github.com/user-attachments/assets/f9af66e9-daf0-449c-8f04-b0b450300c71
Do we have a reason to show the actions in that case? It looks like a bug to me. 🐛
Do we have a reason to show the actions in that case? It looks like a bug to me. 🐛
The reason is that when it's not part of a course, it's not in Learning Mode. When it's added to a course with Learning Mode activated, this logic applies.
I see how bad could be if we add the warning now. Our default experience now is with Learning Mode, so all new lessons would have the warning unless they manually remove the block, and it would also be displayed in all the existing lessons. 🤔
This seems very tricky to solve, but I wonder if we could use this issue to try to improve this a bit. A suggestion here for brainstorming:
If the Learning Mode is enabled globally, we could have a conditional in the patterns to not add the Lesson Actions block anymore in new lessons. WDYT?
And maybe as a less-invasive approach, could we add a warning in the block sidebar for when the user select the "empty" block in a Learning Mode lesson?
If the Learning Mode is enabled globally, we could have a conditional in the patterns to not add the Lesson Actions block anymore in new lessons. WDYT? And maybe as a less-invasive approach, could we add a warning in the block sidebar for when the user select the "empty" block in a Learning Mode lesson?
Both suggestions sound good to me! This should cover most cases.
More food for thought as the following issue was reported by Team 51:
Block visibility: The visibility settings don’t apply to the “Lesson Actions” buttons when using Group restrictions — students outside of a group can still see these action buttons even if visibility is set.
What they've done is set the Block Visibility on the (invisible) Lesson Actions block for an individual lesson. If we take the Lesson Actions block out of the pattern, how will they set visibility for it conditionally for just 1 lesson?
It seems to me that we need to keep this block in the lesson, but figure out some of the challenges / confusion with doing that.
@m1r0 Let me know if you have any thoughts on this.