sensei icon indicating copy to clipboard operation
sensei copied to clipboard

Add hook to conditionally show the lesson actions block in the frontend

Open Imran92 opened this issue 1 year ago • 1 comments

Resolves https://github.com/Automattic/sensei-pro/issues/1956 (partial)

Proposed Changes

We've added a hook here which will allow us to conditionally render the lesson actions block in the frontend from elsewhere (i.e. Sensei-pro)

Testing Instructions

  1. Follow the instructions in - https://github.com/Automattic/sensei-pro/pull/2607

New/Updated Hooks

  • sensei_lesson_show_actions - Flag to show or hide the lesson actions block in the frontend.

Pre-Merge Checklist

  • [x] PR title and description contain sufficient detail and accurately describe the changes
  • [ ] Acceptance criteria is met
  • [x] Decisions are publicly documented
  • [x] Adheres to coding standards (PHP, JavaScript, CSS, HTML)
  • [ ] All strings are translatable (without concatenation, handles plurals)
  • [x] Follows our naming conventions (P6rkRX-4oA-p2)
  • [x] Hooks (p6rkRX-1uS-p2) and functions are documented
  • [ ] New UIs are responsive and use a mobile-first approach
  • [ ] New UIs match the designs
  • [x] Different user privileges (admin, teacher, subscriber) are tested as appropriate
  • [ ] Legacy courses (course without blocks) are tested
  • [x] Code is tested on the minimum supported PHP and WordPress versions
  • [x] 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 avatar Sep 04 '24 16:09 Imran92

Test the previous changes of this PR with WordPress Playground.

github-actions[bot] avatar Sep 04 '24 16:09 github-actions[bot]

Test the previous changes of this PR with WordPress Playground.

github-actions[bot] avatar Oct 29 '24 02:10 github-actions[bot]

Test the previous changes of this PR with WordPress Playground.

github-actions[bot] avatar Oct 29 '24 03:10 github-actions[bot]

Test the previous changes of this PR with WordPress Playground.

github-actions[bot] avatar Oct 29 '24 05:10 github-actions[bot]

Test the previous changes of this PR with WordPress Playground.

github-actions[bot] avatar Oct 29 '24 05:10 github-actions[bot]

Test the previous changes of this PR with WordPress Playground.

github-actions[bot] avatar Oct 29 '24 05:10 github-actions[bot]

Test the previous changes of this PR with WordPress Playground.

github-actions[bot] avatar Oct 29 '24 06:10 github-actions[bot]

Looks good. I added a small comment about the tests though.

Thanks @donnapep ! I've updated it here https://github.com/Automattic/sensei/pull/7677/commits/438d8cabf4f5f2db521703dcccc7c4e6a010517b . Can you kindly take a look again? Thanks!

Imran92 avatar Oct 29 '24 10:10 Imran92