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

New: Add option to show course-level progress on PLP nav button (fix #226) #227

Merged
merged 5 commits into from
Jun 7, 2024

Conversation

swashbuck
Copy link
Contributor

@swashbuck swashbuck commented May 30, 2024

Fixes #226

New

  • Adds the _useCourseProgressInNavigationButton option to show course-level progress on the PLP nav button instead of page-level progress.

Testing

  1. In course.json, set _pageLevelProgress._useCourseProgressInNavigationButton to true.
  2. Go to a page and complete it, but leave other pages incomplete.

Expected result

The PLP button in the navigation should show as partially completed since only one page is complete.

@swashbuck swashbuck self-assigned this May 30, 2024
@joe-replin
Copy link

I'm wondering (for the sake of a clean & streamlined AAT UI) if we could combine the following two configuration options:

"_isShownInNavigationBar": true,
"_showAtCourseLevelInNavigationBar": false

Once combined, it would be a dropdown choice of page, course or none. As you mentioned offline, backwards compatability becomes an issue but I'm assuming we would have a plan for this?

@oliverfoster
Copy link
Member

I'm wondering (for the sake of a clean & streamlined AAT UI) if we could combine the following two configuration options:

"_isShownInNavigationBar": true,
"_showAtCourseLevelInNavigationBar": false

Once combined, it would be a dropdown choice of page, course or none. As you mentioned offline, backwards compatability becomes an issue but I'm assuming we would have a plan for this?

Please don't do this yet. Wait for migration scripts.

@oliverfoster
Copy link
Member

oliverfoster commented Jun 4, 2024

_showAtCourseLevelInNavigationBar to _useCourseProgressInNavigationButton, to match the description?

Copy link
Contributor

@joe-allen-89 joe-allen-89 left a comment

Choose a reason for hiding this comment

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

Functionality wise works exactly as expected. Just one minor change, currently the aria label for the nav button still says page progress when it's showing course progress, think it should say course progress?

Also feels a bit odd that it could potentially show course progress in the button but only that page's items in the drawer, not sure if we want to just leave that as config options though.

@swashbuck
Copy link
Contributor Author

swashbuck commented Jun 5, 2024

@joe-allen-89 I believe all of this text should be configurable. For example, you can update the following in course.json to indicate course progress:

"_pageLevelProgress": {
  "pageLevelProgress": "List of page sections and completion status. Select incomplete sections to jump directly to the content.",
  "pageLevelProgressIndicatorBar": "Course progress. {{percentageComplete}}%. Open page sections.",
  "pageLevelProgressMenuBar": "Course completion {{percentageComplete}}%",
  "_navTooltip": {
      "text": "Course progress"
  },
  "navLabel": "Course progress"
},

We could make new string properties for when the course progress is shown on the nav bar, but that seems to overcomplicate things imo.

@joe-allen-89
Copy link
Contributor

@swashbuck Yes, wasn't sure if we wanted to add something similar to MCQ instruction text to avoid config issues, happy to say it's overkill and I'm making it needlessly complicated though.

@swashbuck
Copy link
Contributor Author

swashbuck commented Jun 5, 2024

Also feels a bit odd that it could potentially show course progress in the button but only that page's items in the drawer, not sure if we want to just leave that as config options though.

@joe-allen-89 I could see a use case where the client wants course-level progress on the nav button but a more simplified PLP drawer that only shows the current page items. I do see your point, though, and I believe @joe-replin had also mentioned having a single option to show one or the other.

We already have _showAtCourseLevel to include the content objects in the PLP drawer. Not to complicate things necessarily, but we could add a new option to show just the title of the current page ("Presentation Components" in this screenshot).

@swashbuck
Copy link
Contributor Author

swashbuck commented Jun 5, 2024

@swashbuck Yes, wasn't sure if we wanted to add something similar to MCQ instruction text to avoid config issues, happy to say it's overkill and I'm making it needlessly complicated though.

@joe-allen-89 Do you mean like the ariaQuestion property for question components?

Copy link
Contributor

@joe-allen-89 joe-allen-89 left a comment

Choose a reason for hiding this comment

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

If you can see use cases of showing course in the button but page components in the drawer I think it's best to leave my queries as config options then rather than over complicating.

Copy link
Contributor

Choose a reason for hiding this comment

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

👀

@joe-allen-89 joe-allen-89 merged commit af6fbab into master Jun 7, 2024
@joe-allen-89 joe-allen-89 deleted the issue/226 branch June 7, 2024 08:49
github-actions bot pushed a commit that referenced this pull request Jun 7, 2024
# [7.8.0](v7.7.0...v7.8.0) (2024-06-07)

### New

* Add option to show course-level progress on PLP nav button (fixes #226) (#227) ([af6fbab](af6fbab)), closes [#226](#226) [#227](#227)
Copy link

github-actions bot commented Jun 7, 2024

🎉 This PR is included in version 7.8.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add option to show course progress on PLP nav button
5 participants