Automattic / sensei

Sensei LMS - Online Courses, Quizzes, & Learning
https://senseilms.com
GNU General Public License v2.0
540 stars 197 forks source link

Add a link in the blocks notice to open the patterns modal #5150

Open renatho opened 2 years ago

renatho commented 2 years ago

When we remove all the Sensei blocks from a course or lesson, we see the following notice (assets/js/admin/blocks-toggling-control.js).

Screen Shot 2022-05-17 at 19 59 17

This issue is to add another button to open the wizard modal in the last step.

NOTE: we may want to consider opening the default Gutenberg inserter sidebar instead, rather than opening our modal. OR we could open the modal from step 1.

More context: p1652825096507929/1652822680.825379-slack-C07418EJ0

aaronfc commented 2 years ago

--

aaronfc commented 2 years ago

The last proposal was to update the notice message to include a link to choose a pattern:

It looks like this course page doesn't have any Sensei blocks. This means that content will be handled by custom templates. Or, [click here to add Sensei blocks back].

This has some problems that I am describing below and adding some alternatives for discussion.

The thing is that adding a link to the content of the notice message is not supported. We can add an extra action (there is already a "Learn More" link) but the combination of buttons and links looks a little bit off:

Note that notices do not support a link with an onClick event only allowing us to use a button to open the Inserter.

Problems:

Alternatives

Any other ideas are welcome :D

  1. Remove the "Learn more" link so that the only action is the button opening the inserter.
  2. Add a new notice apart from the one that already exists talking specifically about the patterns. Something like this (copies will need review): image
  3. Consider descoping this task?

@burtrw, wdyt?

renatho commented 2 years ago

Any other ideas are welcome :D

IMO, if it's hard to implement, I'd skip this since it's just a "helper" for an edge case.


Taking the opportunity of this conversation to talk about this related message. I agree that our message is not very clear when talking about "Sensei blocks", since it's only for some specific blocks. The blocks are mentioned in the Learn more link: https://senseilms.com/documentation/course-page-blocks/

Maybe it would be better with something like this (changes in bold and italic)?

It looks like this course page doesn't have any Sensei structure blocks (Click on "Learn more" to know more about these blocks). This means that content will be handled by custom templates.

aaronfc commented 2 years ago

Maybe it would be better with something like this (changes in bold and italic)?

To me this is a much more clear message now! 👏

alexsanford commented 2 years ago

I also like that suggestion for messaging.

My vote would be for de-scoping. Seems more difficult than it's worth.

Another option might be to simply explain in the messaging how the user might select a pattern. Or can we have multiple links? "Learn more about Sensei blocks" and "Learn more about Sensei patterns"? Would that work?

aaronfc commented 2 years ago

Another option might be to simply explain in the messaging how the user might select a pattern. Or can we have multiple links? "Learn more about Sensei blocks" and "Learn more about Sensei patterns"? Would that work?

Yes, we can have multiple links too.