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

Create sensei pages on plugin activation without depending on onboarding completion #7426

Merged
merged 10 commits into from Jan 9, 2024

Conversation

Imran92
Copy link
Contributor

@Imran92 Imran92 commented Jan 8, 2024

Resolves #7187

Proposed Changes

Previously we created the sensei pages only when the user completed the onboarding. If for some reason the user didn't complete the onboarding or skipped it, the pages didn't get created, resulting in the users not finding the Courses page, they My Courses page etc. So now we are changing the logic to create the pages on Activation of the plugin. I haven't removed it from the onboarding though because if the pages are already there, it already skips creating them, so if a user somehow deletes those pages or wants to recreate these pages for some reason, we can just tell them to go through the onboarding URL.

Testing Instructions

  1. Create a new site
  2. Install a build of sensei from this branch
  3. Skip the onboarding
  4. Go to Pages
  5. Check that the Sensei pages are created (Courses, My Courses, Course Completed etc)
  6. Now install it on a new site again
  7. This time complete the onboarding
  8. Make sure it completes as expected

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
  • Legacy courses (course without blocks) are tested
  • 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 self-assigned this Jan 8, 2024
Copy link

codecov bot commented Jan 8, 2024

Codecov Report

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

Comparison is base (e1885dd) 51.03% compared to head (06384bd) 51.04%.
Report is 11 commits behind head on trunk.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##              trunk    #7426   +/-   ##
=========================================
  Coverage     51.03%   51.04%           
- Complexity    11165    11167    +2     
=========================================
  Files           613      614    +1     
  Lines         47137    47148   +11     
  Branches        405      405           
=========================================
+ Hits          24058    24066    +8     
- Misses        22752    22755    +3     
  Partials        327      327           
Files Coverage Δ
includes/admin/class-sensei-setup-wizard.php 43.65% <ø> (ø)
.../class-sensei-home-task-customize-course-theme.php 78.94% <100.00%> (+7.51%) ⬆️
includes/class-sensei-utils.php 52.70% <100.00%> (-0.09%) ⬇️
includes/clock/class-clock.php 100.00% <100.00%> (ø)
includes/class-sensei.php 24.39% <0.00%> (-0.11%) ⬇️

... and 5 files with indirect coverage changes


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 b0f41a2...06384bd. Read the comment docs.

@Imran92 Imran92 changed the title Create sensei pages on plugin activation Create sensei pages on plugin activation without depending on onboarding completion Jan 8, 2024
@Imran92 Imran92 requested a review from a team January 8, 2024 13:38
@Imran92 Imran92 added this to the 4.20.1 milestone Jan 8, 2024
@Imran92 Imran92 marked this pull request as ready for review January 8, 2024 13:38
@Imran92 Imran92 closed this Jan 8, 2024
@Imran92 Imran92 reopened this Jan 8, 2024
m1r0
m1r0 previously approved these changes Jan 8, 2024
Copy link
Member

@m1r0 m1r0 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 for implementing this! Works as described.

@Imran92 Imran92 merged commit eff6284 into trunk Jan 9, 2024
24 checks passed
@Imran92 Imran92 deleted the add/create-sensei-pages-on-activation branch January 9, 2024 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Skip Onboarding" should also create pages required for Sensei usage
3 participants