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

Skip loading the Learning Mode styles when Sensei is not available #7031

Merged
merged 7 commits into from
May 3, 2023

Conversation

gabrielcaires
Copy link
Contributor

Partially solve Review spacings and alignment on the course theme#6834

Changes proposed in this Pull Request:

  • Skip the learning mode style when sensei is not available
  • Add a temporary hook to skip the loading when Sensei is available and able to provide a new learning mode style.

Testing instructions

  • Go to this branch
  • Disable the sensei-lms plugin
  • Go to the home page
  • Check if the learning-mode.css is not loaded
  • Enable the sensei-lms plugin
  • Check if the learning-mode.css is loaded.

Context

The sensei team is delegating the responsibility to load the learning mode style to the plugin, instead of the handle it on the theme. It will help us to avoid coupling between the theme version and the plugin version.

course/functions.php Outdated Show resolved Hide resolved
course/functions.php Outdated Show resolved Hide resolved
course/functions.php Outdated Show resolved Hide resolved
course/functions.php Outdated Show resolved Hide resolved
@gabrielcaires gabrielcaires requested review from m1r0, donnapep and a team May 2, 2023 16:44
Copy link
Contributor

@donnapep donnapep left a comment

Choose a reason for hiding this comment

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

Looks good! When do you think we should consider removing the learning-mode.css file altogether? Perhaps with the next major release after the next one? If so, perhaps we could add a note in the file about it so we don't forget.

@gabrielcaires gabrielcaires merged commit e342cf0 into trunk May 3, 2023
@gabrielcaires
Copy link
Contributor Author

@donnapep I created this issue #7429 . I also added as part of our release after the current one.

@m1r0 m1r0 deleted the update/course-skip-learning-mode-style branch May 4, 2023 22:15
donnapep pushed a commit that referenced this pull request May 9, 2023
)

* Skip the learning mode style when sensei is not available
@donnapep donnapep modified the milestone: Course - 1.3.0 May 12, 2023
@donnapep donnapep changed the title Course: Skip the learning mode style when sensei is not available Skip the learning mode style when sensei is not available Jun 1, 2023
@donnapep donnapep changed the title Skip the learning mode style when sensei is not available Skip the learning mode style when Sensei is not available Jun 1, 2023
@donnapep donnapep changed the title Skip the learning mode style when Sensei is not available Skip loading the Learning Mode styles when Sensei is not available Jun 1, 2023
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.

Review the learning mode spacings and alignment on course theme
3 participants