Skip to content
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

Make customize template task point to Learning Mode template #7393

Merged
merged 12 commits into from Dec 25, 2023

Conversation

Imran92
Copy link
Contributor

@Imran92 Imran92 commented Dec 16, 2023

Resolves #7376

Proposed Changes

  • After setting up the site in onboarding flow, clicking on the Customize your theme task took the user to the site editor which sometimes can confuse the user, now we are taking them to edit the Lesson template instead.

Testing Instructions

  1. Create a new site with Sensei
  2. Install and activate the Course theme
  3. In Sensei LMS -> Home, make sure you see the task Customize your lesson template instead of Customize your theme
  4. Click on the task
  5. Make sure you are taken the Learning Mode's Lesson Template editor page

Before

Screenshot 2023-12-16 at 3 47 38 PM

After

Screenshot 2023-12-16 at 3 51 26 PM

Pre-Merge Checklist

  • PR title and description contain sufficient detail and accurately describe the changes
  • Acceptance criteria is met
  • Decisions are publicly documented
  • Adheres to coding standards (PHP, JavaScript, CSS, HTML)
  • All strings are translatable (without concatenation, handles plurals)
  • Follows our naming conventions (P6rkRX-4oA-p2)
  • Hooks (p6rkRX-1uS-p2) and functions are documented
  • New UIs are responsive and use a mobile-first approach
  • New UIs match the designs
  • Different user privileges (admin, teacher, subscriber) are tested as appropriate
  • Code is tested on the minimum supported PHP and WordPress versions
  • User interface changes have been tested on the latest versions of Chrome, Firefox and Safari
  • "Needs Documentation" label is added if this change requires updates to documentation
  • Known issues are created as new GitHub issues

@Imran92 Imran92 added this to the 4.20.1 milestone Dec 16, 2023
@Imran92 Imran92 requested a review from a team December 16, 2023 09:55
@Imran92 Imran92 self-assigned this Dec 16, 2023
@Imran92 Imran92 marked this pull request as draft December 16, 2023 10:05
Copy link

codecov bot commented Dec 16, 2023

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (4283401) 50.94% compared to head (b612201) 50.94%.
Report is 1 commits behind head on trunk.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##              trunk    #7393   +/-   ##
=========================================
  Coverage     50.94%   50.94%           
- Complexity    11150    11153    +3     
=========================================
  Files           613      613           
  Lines         47063    47067    +4     
  Branches        404      404           
=========================================
+ Hits          23976    23980    +4     
  Misses        22760    22760           
  Partials        327      327           
Files Coverage Δ
.../class-sensei-home-task-customize-course-theme.php 71.42% <100.00%> (+28.57%) ⬆️
includes/class-sensei-admin.php 19.04% <0.00%> (-0.04%) ⬇️
...ncludes/course-theme/class-sensei-course-theme.php 18.59% <0.00%> (-0.19%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d53e6a4...b612201. Read the comment docs.

@Imran92 Imran92 marked this pull request as ready for review December 18, 2023 18:25
Copy link
Contributor

@renatho renatho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works well, but I think we should also update the completion logic (Sensei_Admin::admin_init) to mark it as completed only when visiting the lesson template.

@Imran92
Copy link
Contributor Author

Imran92 commented Dec 22, 2023

It works well, but I think we should also update the completion logic (Sensei_Admin::admin_init) to mark it as completed only when visiting the lesson template.

Thanks @renatho ! I've updated the code here 5d1bf9f . Now it will be marked as completed only when the user clicks the task.

A side-effect of this will be that it'll no longer be marked as completed if the user visits the template in the site editor manually. But that's an edge case I think we can leave for now as there's not a reliable way ATM to detect if the user has visited the template in site editor or not.

Copy link
Contributor

@renatho renatho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @Imran92!

Looks good and works well for me!

A side-effect of this will be that it'll no longer be marked as completed if the user visits the template in the site editor manually. But that's an edge case I think we can leave for now as there's not a reliable way ATM to detect if the user has visited the template in site editor or not.

And I think we can live with this side-effect!

@Imran92 Imran92 merged commit b16d800 into trunk Dec 25, 2023
23 of 24 checks passed
@Imran92 Imran92 deleted the add/update-customize-template-task branch December 25, 2023 07:34
@donnapep
Copy link
Collaborator

donnapep commented Jan 4, 2024

@Imran92 It seems that we're taking the user to the site editor, but not actually opening the template in the editor. Can we make that change? The user shouldn't have to click the pencil icon to get there. We should make it as easy as possible for them. This should make the completion logic simpler too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update "Customize your theme" task
3 participants