-
Notifications
You must be signed in to change notification settings - Fork 198
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 notification when layouts are not available #7530
Conversation
Test the previous changes of this PR with WordPress Playground. |
WordPress Dependencies ReportThe
This comment was automatically generated by the |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## trunk #7530 +/- ##
============================================
+ Coverage 51.57% 51.94% +0.37%
- Complexity 11235 11267 +32
============================================
Files 622 630 +8
Lines 47518 47670 +152
Branches 414 421 +7
============================================
+ Hits 24506 24762 +256
+ Misses 22679 22571 -108
- Partials 333 337 +4
... and 14 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Test the previous changes of this PR with WordPress Playground. |
Test the previous changes of this PR with WordPress Playground. |
|
||
/** | ||
* Filters the warning message when no layouts are available. | ||
* |
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.
@donnapep Couldn't add @hook
here. Is it expected?
Test the previous changes of this PR with WordPress Playground. |
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.
Hi @merkushin 👋
I just wanted to discuss an alternative approach in case we haven't already considered it, or in case we have already considered it but decided not to go with it for any reason, maybe we can document that too.
When there's no template available in the Template picker step, does it make better sense to skip that step altogether instead of showing a button to the user to go to that step, and then in the next step, showing a message that there is no pattern?
So when we are loading the steps array, we'll just check if patterns are available. And if patterns are not available, we'll just not load/filter out the patterns step. Because, in this case making the users go to the second step seems counterintuitive because they can't do anything there. Also if I was a new user creating my first Course, if I see a warning like that this early in my usage, I may not like it. Also, it shows a button "Start with default layout", but clicking on it doesn't use the default layout. Rather it just closes and goes to the empty editor.
LMKWYT?
cc: @donnapep for opinion on this
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.
Oh, upon testing, I think checking for just available templates is not enough in our case here. Because for many other themes, it can hold true.
Astra:
Twenty Twenty Four:
Meraki:
In case of these theme-specific changes, I prefer testing it myself and also putting it in the testing instructions to test on other themes, both block and non-block ones, to make sure anything hasn't broken in other themes. Because they often end up doing that 😄
LMKWYT!
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.
Also, I think if we're adding a hook, we should add a Hooks
label. Thanks!
This would be preferred, but given this is an edge case (i.e. will only show for Divi users AFAIK), a simple solution seems better. |
Thanks @Imran92! You're right. I have to check patterns instead.
Yes, we had those discussions here in GitHub and in Slack (p1709666714086119-slack-C02NWDZBL0H and p1709731277086819-slack-C02NWDZBL0H). |
Test the previous changes of this PR with WordPress Playground. |
@merkushin Yup! It would be nice if the font size was a bit larger (maybe to match the Start with default layout link?), but not a big deal. |
Test the previous changes of this PR with WordPress Playground. |
Resolves #7391
Proposed Changes
Testing Instructions
New/Updated Hooks
sensei.editorWizard.noLayoutsWarning
- Filter no layouts message.Pre-Merge Checklist