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 editor wizard modal for courses and lessons #5149
Add editor wizard modal for courses and lessons #5149
Conversation
5d18c0c
to
5713ce0
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 good, works well!
The only thing I noticed is that closing the modal will not make any effect unless you save or publish the post (lesson or course). But it's working like that in all scenarios (new lesson, new course and editing a draft lesson for first time) so probably it is expected behaviour?
I think so! Maybe @burtrw could confirm it? Ronnie, in summary (@aaronfc, please correct me if I'm missing something), when we close the modal, or select a pattern in the future implementations, and refresh the page without saving it, it will display the modal again because it continues being a new post. Is it the expected behavior? A workaround we could implement, is force saving the post after closing the modal or selecting a pattern. But not sure it would be an expected behavior from the user. 🤔 See how it works for pages that is being implemented for WP 6.0. Closing the modal before selecting a pattern, and then refresh the page (in the second 10 I'm refreshing the page) Closing the modal after selecting a pattern, and then refresh the page. I can see that it's a different behavior though, since we have some more steps. Update: Sorry! Not sure what happened that GH is not embedding the video, and just adding the link. 🤷♂️ |
One reason we may want to force save the post is that the first step in the wizard is to add the Course name. If you do that, I think the user would expect to see that Course Name updated once you close the wizard. And then we wouldn't want to lose that or have to start back over. But maybe just by adding text to the title then it will be saved in the browser? Otherwise, I'd go with whatever implementation will be fastest and lean towards the same behavior as pages in WP 6.0. |
I think the simplest approach for me (as a user and also as a developer) would be to just do "nothing" in case I close the modal before I "complete" the wizard (complete here means choosing a pattern or the "blank template" in the last step). Any other action (closing the modal) would keep the default template as it is working now. Related to the above, @burtrw, yesterday in the team call we talked briefly about the difference between the "default" pattern and the "blank pattern". |
I'm good with this, though I'd prefer if we could save the Course name if it is easy. But the priority for that would be low.
Actually, I think they should be the same thing - let's forget 'blank' and only go with the default. |
@burtrw I think this would be easy to implement. Just confirming before creating an issue for that: We should save the post in both conditions (closing the modal or choosing a pattern), right?
👍 |
Yep, correct, we should save the post in both conditions (closing the modal or choosing a pattern) :) |
Okay! Added as an implementation detail in the #5140 issue. |
Fixes #5125
Changes proposed in this Pull Request
_needs_template
logic (old logic to add template when created through Course Outline).Testing instructions
wp_persisted_preferences
(more details).Screenshot / Video
Screen.Recording.2022-05-17.at.18.41.12.mp4