Repository navigation
Conversation
|
Thanks for the pull request, @ChrisChV! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. DetailsWhere can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #875 +/- ##
==========================================
+ Coverage 92.46% 93.22% +0.75%
==========================================
Files 151 169 +18
Lines 1288 1447 +159
Branches 269 315 +46
==========================================
+ Hits 1191 1349 +158
- Misses 92 93 +1
Partials 5 5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
This is looking great @ChrisChV!
Thank you for your work!
- I tested this using the instructions from the PR
- I read through the code
- I checked for accessibility issues
- Includes documentation
One suggestion so we can get rid of the patch while developing:
- Put your dummy data as a mock file in the tests
- Then, we can already implement all tests for the feature right away (we don't need the backend for that)
- Create the api layer and, for now, return the mock data
- Update the hook to call the api, and probably the hook code will also be final
That way, when the backend ships, we just need to update the api layer and the already tests that we wrote will help us to check if everything is fine. Also, we likely will have the coverage already sorted out.
Does that make sense? If it does, I will apply the same pattern for the other features.
| categoryLabel={<FormattedMessage {...messages.courseBadge} />} | ||
| className="text-dark-900 bg-light-500" | ||
| /> | ||
| <CourseCardMenu cardId={cardId} /> |
There was a problem hiding this comment.
Not directly in your change, but the Dropdown.Toggle is not centered with the badge.
We can fix it with the following adding className="d-flex align-items-center" to it.
<Dropdown onToggle={handleToggleDropdown}>
<Dropdown.Toggle
id={`course-actions-dropdown-${cardId}`}
className="d-flex align-items-center"
as={IconButton}| .course-card-pathways { | ||
| .course-card-pathways-container { |
There was a problem hiding this comment.
To make the height strip be the same with or without the dropdown to show
more items
| .course-card-pathways { | |
| .course-card-pathways-container { | |
| .course-card-pathways { | |
| min-height: 3.5rem; | |
| .course-card-pathways-container { |
| </Stack> | ||
| ) | ||
| : ( | ||
| <h2 className="dashboard-title"> |
There was a problem hiding this comment.
They seem to have the same styles
| <h2 className="dashboard-title"> | |
| <h2 className="course-list-title"> |
If we want to use the dashboard-title, we can remove the course-list-title from the scss
| description: 'Course list heading', | ||
| }, | ||
| coursesTitle: { | ||
| id: 'dahsboard.coursesTitle', |
There was a problem hiding this comment.
nit: typo
| id: 'dahsboard.coursesTitle', | |
| id: 'dashboard.coursesTitle', |
| if (!useIsPathwayPilotUIEnabled()) { | ||
| return null; | ||
| } |
There was a problem hiding this comment.
What do you think about moving this check outside? (i.e CourseHeaderActions)
| if (!useIsPathwayPilotUIEnabled()) { | |
| return null; | |
| } |
The component doesn't have anything tied to Pathways and we can test it without adding the flag.
There was a problem hiding this comment.
It is related; this same badge is used on the Pathways cards, and using that card for courses only makes sense if another item exists—in this case, the pathways.
|
@rpenido Thanks for your review!
Edit: I've tried what you suggested in openedx/frontend-app-learning#2159, and it seems like a good approach to me. I updated that in 0cf1bf4 |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…th the mock pathways as test fixtures
|
Thanks @ChrisChV! LGTM 👍 In the Figma file we have two alternatives for the unenrollment dialog. We didn't change that, right? @cassiezamparini Could you check if we want to use another design? |
|
@ChrisChV Hmmm, got you. I want to keep the category names in the modal somehow, because “bootcamps and tutorials” means something to learners and “learning experiences” doesn’t. If we leave out the count and reuse the existing plural label, would that avoid the extra plural forms for admins?
Would the above be workable for the pilot? Or what other ideas do you have? |
@ChrisChV There is a discussion here: TLDR: no translations for the pilot, but we will have the |
@rpenido Thanks!
Yes, I think it is possible. I will implement it this way. |
c47660d to
da9d579
Compare
There was a problem hiding this comment.
LGTM 👍
Thank you for your work, @ChrisChV!
- I tested this using the instructions from the PR
- I read through the code
- I checked for accessibility issues
- Includes documentation
Can you update the Testing instructions? We don't need the patch anymore, right?
|
@kdmccormick and @ormsbee, this is ready for review! |
kdmccormick
left a comment
There was a problem hiding this comment.
thanks @ChrisChV . once you address these, please update the PR description to match.
this PR is doing quite a lot. I will see what Brian thinks, but I might need you to break it up into smaller chunks. I'll let you know.
going forward, could you try to avoid PRs much larger than 1000 lines?
| * - ``ENABLE_PATHWAY_PILOT_UI`` | ||
| - Enables the pathways pilot: serves the bundled demo pathways, since the | ||
| pathways backend does not exist yet, and shows the ``Course`` badge on | ||
| course cards. The pathways UI is shown whenever there are pathways, so | ||
| it is hidden when this is unset. | ||
| - ``true`` | ||
|
|
There was a problem hiding this comment.
just like we did over on openedx/frontend-app-learning#2159, could you drop this flag? we should not create flags that are not necessary. if an operator does not want pathways to show up on users' dashboard, then they will not create enrollable pathways.
| import { Badge } from '@openedx/paragon'; | ||
| import { isValidCssColor } from '@src/utils'; | ||
|
|
||
| export interface ItemBadgeProps { |
There was a problem hiding this comment.
Is there anything else you could name this? As soon as we start adding Pathway Items to the dashboard, the name ItemBadge will get confusing. Maybe CategoryBadge?
| } from '@src/data/hooks'; | ||
| import useCourseData from '@src/hooks/useCourseData'; | ||
|
|
||
| export interface PathwayData { |
There was a problem hiding this comment.
to keep pathways agnostic to their kind of content, the data shape should have itemCount and competedItemCount rather than courseCount and completedCourseCount.
|
|
||
| Using the following configuration will replace the slot's default content with a summary of how many pathways the learner has in each category. | ||
|
|
||
|  |
There was a problem hiding this comment.
in this screenshot, the red box includes the "My Learning" heading, which is not part of the slot.
| import { getPathwayTextColor } from './utils'; | ||
| import messages from './messages'; | ||
|
|
||
| export const MorePathwaysPopover = ({ pathways }: { pathways: PathwayData[] }) => { |
There was a problem hiding this comment.
it looks like the Figma design wants to show as much as possible of the last pathway name ("Lorem ipsum dolor...") and end it in an ..., whereas on the Sandbox, pathway names are only shown if the whole thing fits. I think what's on the Figma makes it clearer that the drop down | 2 is a continuation of the list of pathways rather than an unrelated thing.
It's minor, so if you'd rather open a ticket to follow up rather than block this PR, that's OK with me.
figma
sandbox
There was a problem hiding this comment.
I asked about this in Figma, and the response was that it shouldn't be truncated.
@cassiezamparini, could you confirm that?
|
I just talked to Brian -- @ChrisChV , it would be really helpful if you could break this PR up into one-PR-per-feature. I think a natural breakdown could be:
As a rule of thumb, try to keep each PR to one concrete user-facing thing. You're welcome to use stacked PRs if that'd be helpful. |
|
@kdmccormick I have split this PR into 4:
I added your suggestions to these PRs. Closing this PR |
|
Can we consider these approved from a product perspective? |
|
Leaving this to @ChrisChV to answer :) |


Description
ENABLE_PATHWAY_PILOT_UIconfig flag and theuseIsPathwayPilotUIEnabledhook.pathwaysPanelslot.Included instrip to course cards with their pathways. Labels that don't fit go to a "+N" popover.Supporting Information
Testing Instructions
ENABLE_PATHWAY_PILOT_UIusing this plugin:Refineare attached to the top.Included inin some courses. Verify that you can see the hidden pathways by clicking the count button.Included inby resizing the screen.Notes