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

Fix horizontal scroll on Course page when using Course theme #7705

Merged
merged 2 commits into from
Nov 7, 2024

Conversation

renatho
Copy link
Contributor

@renatho renatho commented Nov 6, 2024

Resolves Automattic/themes#8334

Proposed Changes

  • It fixes a horizontal scroll in the course theme when using the Course theme. I was done by not loading the 3rd-party learning-mode.css in the course page. Since the course is a normal page like the others, we don't want the learning mode styles there. Unless I'm missing something here. ⚠️
  • The same logic was replicated to the astra and divi compatibility files.

Testing Instructions

  1. Install and activate the Course theme.
  2. Create a course with Learning Mode.
  3. Navigate to the course page.
  4. Check that it doesn't have a horizontal scroll anymore.
  5. Navigate to the lessons, and make sure it continues working properly, and it loads the learning-mode.css from the 3rd-party folder (you can search for course-learning-mode-css in the source or add some styles to debug if it's applied or not).

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

@renatho renatho self-assigned this Nov 6, 2024
Copy link

github-actions bot commented Nov 6, 2024

Test the previous changes of this PR with WordPress Playground.

@renatho renatho marked this pull request as ready for review November 6, 2024 19:15
@renatho renatho marked this pull request as draft November 6, 2024 19:15
@renatho renatho changed the title Add padding only to the learning mode pages Fix horizontal scroll on Course page when using course theme Nov 6, 2024
@renatho renatho force-pushed the fix/course-horizontal-scroll-with-course-theme branch from b7e758b to 48f03df Compare November 6, 2024 19:44
@renatho renatho force-pushed the fix/course-horizontal-scroll-with-course-theme branch from 48f03df to 502391a Compare November 6, 2024 19:45
Copy link

github-actions bot commented Nov 6, 2024

Test the previous changes of this PR with WordPress Playground.

Copy link

github-actions bot commented Nov 6, 2024

Test the previous changes of this PR with WordPress Playground.

@renatho renatho requested a review from a team November 6, 2024 19:51
@renatho renatho changed the title Fix horizontal scroll on Course page when using course theme Fix horizontal scroll on Course page when using Course theme Nov 6, 2024
@renatho renatho marked this pull request as ready for review November 6, 2024 19:52
@renatho renatho added this to the 4.24.4 milestone Nov 6, 2024
Copy link

github-actions bot commented Nov 6, 2024

Test the previous changes of this PR with WordPress Playground.

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.

Works as described. 👍

@renatho renatho merged commit 6f39f3b into trunk Nov 7, 2024
21 of 22 checks passed
@renatho renatho deleted the fix/course-horizontal-scroll-with-course-theme branch November 7, 2024 18:15
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.

Course theme: Horizontal scroll bar and extra spacing/margin/padding on a course page
2 participants