Skip to content

Learning path display options#1288

Merged
fbacall merged 5 commits intomasterfrom
learning-path-display-options
Apr 29, 2026
Merged

Learning path display options#1288
fbacall merged 5 commits intomasterfrom
learning-path-display-options

Conversation

@fbacall
Copy link
Copy Markdown
Member

@fbacall fbacall commented Apr 21, 2026

Summary of changes

  • Learning paths with only 1 topic will have that topic expanded by default.
  • Adds the option to display learning paths "unordered", which hides the ordering labels from the topic view.

Motivation and context

#1169
#1247

Screenshots

LP with only 1 topic:

image

Unordered LP:

Form:

image

Display:

image

Checklist

  • I have read and followed the CONTRIBUTING guide.
  • I confirm that I have the authority necessary to make this contribution on behalf of its copyright owner and agree to license it to the TeSS codebase under the BSD license.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates Learning Path presentation to better support (a) single-topic learning paths and (b) “unordered” learning paths where topic ordering labels are hidden.

Changes:

  • Auto-expands the topic contents when a learning path has exactly one topic (CSS/JS + view classes).
  • Adds an unordered flag on learning_paths with a form checkbox and applies an .unordered class in the show view.
  • Adds controller/view tests for single-topic display.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
test/controllers/learning_paths_controller_test.rb Adds assertions for multi-topic vs single-topic rendering.
db/schema.rb Reflects new unordered column on learning_paths.
db/migrate/20260421144919_add_unordered_to_learning_paths.rb Adds unordered boolean column.
config/locales/en.yml Adds hint text for the new form option.
app/views/learning_paths/show.html.erb Adds class logic for single-topic + unordered display modes.
app/views/learning_paths/_form.html.erb Adds checkbox to edit unordered.
app/controllers/learning_paths_controller.rb Permits :unordered via strong params.
app/assets/stylesheets/learning-paths.scss Adds styling for .single-topic and .unordered.
app/assets/javascripts/learning_paths.js Disables expand/collapse click behavior for single-topic view.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app/views/learning_paths/show.html.erb
Comment thread db/migrate/20260421144919_add_unordered_to_learning_paths.rb Outdated
Comment thread test/controllers/learning_paths_controller_test.rb
@fbacall fbacall force-pushed the learning-path-display-options branch from 8fdf6e9 to 768c5de Compare April 29, 2026 16:23
@fbacall fbacall merged commit aa10463 into master Apr 29, 2026
13 checks passed
@fbacall fbacall deleted the learning-path-display-options branch April 29, 2026 16:55
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.

2 participants