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 module spacing when Learning Mode is not enabled #7272

Merged
merged 3 commits into from Nov 7, 2023
Merged

Conversation

renatho
Copy link
Contributor

@renatho renatho commented Nov 7, 2023

Proposed Changes

  • It fixes module spacing when Learning Mode is not enabled.

It didn't happen with Learning Mode enabled because of this style:

I noticed it happening only with Course theme, but I decided to fix it directly in Sensei core because if it happened for other themes, it would also be fixed. Does it make sense?

Testing Instructions

  1. Create a course with at least a module.
  2. Deactivate the Learning Mode for this course.
  3. Check that the styles look good in the frontend.

Screenshots

Before:
Screenshot 2023-11-07 at 15 25 12

After:
Screenshot 2023-11-07 at 15 24 46

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

@renatho renatho self-assigned this Nov 7, 2023
@renatho renatho requested a review from a team November 7, 2023 18:32
margin: 0;
color: inherit;
padding-top: 0;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This PR only adds this padding. The rest of the changes are just sorting the properties to follow the Sensei standard.

@renatho renatho changed the title Fix module style when Learning Mode is not enabled Fix module spacing when Learning Mode is not enabled Nov 7, 2023
@renatho renatho marked this pull request as ready for review November 7, 2023 18:34
Copy link

codecov bot commented Nov 7, 2023

Codecov Report

Merging #7272 (8e68ffa) into trunk (61fefe5) will not change coverage.
Report is 15 commits behind head on trunk.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##              trunk    #7272   +/-   ##
=========================================
  Coverage     50.59%   50.59%           
  Complexity    10975    10975           
=========================================
  Files           608      608           
  Lines         46286    46286           
  Branches        402      402           
=========================================
  Hits          23417    23417           
  Misses        22542    22542           
  Partials        327      327           
Files Coverage Δ
...des/cli/class-sensei-validate-progress-command.php 0.00% <ø> (ø)
...igration/validations/class-progress-validation.php 85.34% <ø> (ø)
...l/migration/validations/class-validation-error.php 100.00% <ø> (ø)

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 96012db...8e68ffa. Read the comment docs.

@renatho renatho added this to the 4.19.2 milestone Nov 7, 2023
@m1r0
Copy link
Member

m1r0 commented Nov 7, 2023

I decided to fix it directly in Sensei core because if it happened for other themes, it would also be fixed.

Makes sense to me. 👍 Following the idea of fixing it for other themes, what do you think of using padding: 0 to cover all cases? This would also fix themes that have a padding-bottom for example.

@renatho
Copy link
Contributor Author

renatho commented Nov 7, 2023

Makes sense to me. 👍 Following the idea of fixing it for other themes, what do you think of using padding: 0 to cover all cases? This would also fix themes that have a padding-bottom for example.

Good idea! Updated here: 8e68ffa

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.

Looks good. 👍

@renatho renatho merged commit 3e40b40 into trunk Nov 7, 2023
24 checks passed
@renatho renatho deleted the fix/module-style branch November 7, 2023 23:06
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.

None yet

2 participants