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

Add border styling ability for sensei buttons #7283

Merged
merged 8 commits into from Nov 16, 2023

Conversation

Imran92
Copy link
Contributor

@Imran92 Imran92 commented Nov 10, 2023

Resolves #7088
Part of the above issue - Handles the border color and width portion only. Stacked on #7224

Proposed Changes

  • Many users have requested for this feature. We are adding the ability to change border color from editor for sensei buttons, especially lesson action buttons in learning mode. We are also allowing to change border width.

It'd be easier if the block was using API version 2, but changing to that could potentially break the buttons in different places for current users. So we did it as we used to do for our buttons.

Testing Instructions

  1. Go to Site editor
  2. Open Lesson (Learning Mode - Default) template, clear any previous saved version of this template if there's any
  3. Update the border color and border width of the lesson action buttons
  4. The styles are getting updated as expected
  5. Save the template
  6. Go to frontend, open a lesson in a course with learning mode enabled
  7. Make sure the style is getting applied there as expected
  8. Check in different themes

Editor

Screenshot 2023-11-10 at 6 05 03 PM

Frontend

Screenshot 2023-11-10 at 6 04 37 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.19.2 milestone Nov 10, 2023
@Imran92 Imran92 requested a review from a team November 10, 2023 11:50
@Imran92 Imran92 self-assigned this Nov 10, 2023
Copy link

github-actions bot commented Nov 10, 2023

WordPress Dependencies Report

The github-action-wordpress-dependencies-report action has detected some script changes between the commit a8021fd and trunk. Please review and confirm the following are correct before merging.

Script Handle Added Dependencies Removed Dependencies Total Size Size Diff
blocks/single-page.js 15.6 kB +109 B ( +0.71% 🔼 )
blocks/lesson-action-blocks.js 13.5 kB +102 B ( +0.77% 🔼 )
blocks/global-blocks.js 20.5 kB +100 B ( +0.5% 🔼 )
blocks/shared.js 13.9 kB +102 B ( +0.74% 🔼 )
course-theme/blocks/index.js 13.8 kB +12 B ( +0.09% 🔼 )

This comment was automatically generated by the github-action-wordpress-dependencies-report action.

Copy link

codecov bot commented Nov 10, 2023

Codecov Report

Merging #7283 (a8021fd) into trunk (261f533) will increase coverage by 0.01%.
Report is 41 commits behind head on trunk.
The diff coverage is 66.66%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##              trunk    #7283      +/-   ##
============================================
+ Coverage     50.74%   50.76%   +0.01%     
+ Complexity    11051    11048       -3     
============================================
  Files           610      611       +1     
  Lines         46649    46669      +20     
  Branches        402      404       +2     
============================================
+ Hits          23671    23690      +19     
- Misses        22651    22652       +1     
  Partials        327      327              
Files Coverage Δ
...ludes/blocks/course-theme/class-lesson-actions.php 98.00% <ø> (ø)
assets/blocks/button/color-props.js 51.85% <66.66%> (+1.85%) ⬆️

... and 6 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 97f952a...a8021fd. Read the comment docs.

@Imran92 Imran92 marked this pull request as ready for review November 10, 2023 12:07
renatho
renatho previously approved these changes Nov 10, 2023
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.

Looks good and works well! 🚀

Base automatically changed from add/learning-mode-lesson-actions-update to trunk November 13, 2023 00:46
@Imran92 Imran92 dismissed renatho’s stale review November 13, 2023 00:46

The base branch was changed.

@Imran92 Imran92 added the Deprecation This change introduces a deprecation. label Nov 15, 2023
@Imran92 Imran92 merged commit 3cd45cf into trunk Nov 16, 2023
24 of 25 checks passed
@Imran92 Imran92 deleted the add/border-styling-ability-for-action-buttons branch November 16, 2023 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecation This change introduces a deprecation. [Project] Frontend Improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to customize Lesson Actions buttons in Learning Mode
3 participants