Merged
Conversation
Contributor
There was a problem hiding this comment.
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
unorderedflag onlearning_pathswith a form checkbox and applies an.unorderedclass 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.
8fdf6e9 to
768c5de
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of changes
Motivation and context
#1169
#1247
Screenshots
LP with only 1 topic:
Unordered LP:
Form:
Display:
Checklist