Skip to content

Focus mode#3105

Merged
brianhogg merged 49 commits intodevfrom
focus-mode
Apr 9, 2026
Merged

Focus mode#3105
brianhogg merged 49 commits intodevfrom
focus-mode

Conversation

@brianhogg
Copy link
Copy Markdown
Contributor

@brianhogg brianhogg commented Mar 10, 2026

Description

Adds a "focus mode" option for courses where, when enabled, lessons have a focused view of the course and the lessons.

How has this been tested?

Manually

Screenshots

Checklist:

  • This PR requires and contains at least one changelog file.
  • My code has been tested.
  • My code passes all existing automated tests.
  • My code follows the LifterLMS Coding & Documentation Standards.

Note

Medium Risk
Changes template selection and frontend rendering for lessons/quizzes based on new settings, so theme compatibility and edge cases (block themes/page builders, missing parent course) could cause unexpected layout or routing behavior.

Overview
Introduces a new Focus Mode experience for lessons/quizzes, switching eligible singular views to a dedicated PHP template (single-lesson-focus.php) with a fixed header (back link + progress) and a syllabus sidebar.

Adds global course settings (lifterlms_enable_focus_mode, content width, sidebar position) plus per-course overrides (enable/disable/inherit + width/position), and wires in helper functions (llms_is_focus_mode_enabled, llms_get_focus_mode_*) to decide when/How focus mode applies (including filters for add-ons).

Ships new focus-mode frontend assets: SCSS/CSS for layout variants and a small JS toggle that collapses the sidebar with localStorage persistence; also adds a new editor block (llms/parent-course) and updates template loading to avoid block-template overrides for focus mode.

Written by Cursor Bugbot for commit acf765a. This will update automatically on new commits. Configure here.

brianhogg added 15 commits March 8, 2026 20:40
…lesson focus mode template for the FSE. Uses CSS to clear out the styling on the main container elements while still loading the theme + plugin js/css needed for various addons.
…croll to the bottom. Remove shortcode and have a block only for the "parent course" link.
…show/hide sidebar. Left/right sidebar position and content width.
…etween header and sidebar without affecting all other block spacing (ie. between paragraphs).
@brianhogg brianhogg added this to the 10.0 milestone Mar 10, 2026
@ideadude ideadude moved this to Awaiting Review in Development Mar 10, 2026
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Free Tier Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

@cursor
Copy link
Copy Markdown

cursor bot commented Mar 12, 2026

You have run out of free Bugbot PR reviews for this billing cycle. This will reset on April 4.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@cursor
Copy link
Copy Markdown

cursor bot commented Mar 12, 2026

You have run out of free Bugbot PR reviews for this billing cycle. This will reset on April 4.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

…ttom. Show the sidebar along the bottom on mobile.
…h to account for mobile safari and other mobile browsers with nav bar that overlaps the content area.
…adence class support to add in the background color. Content render action which can be overridden.
break;
}

case 'kadence':
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Decide if we want to add this or just have them do it.

@@ -0,0 +1,27 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Delete

@brianhogg brianhogg merged commit 8b77341 into dev Apr 9, 2026
9 of 16 checks passed
@brianhogg brianhogg deleted the focus-mode branch April 9, 2026 09:07
@github-project-automation github-project-automation bot moved this from Awaiting Review to Done in Development Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants