feat: add pathway cards and badges - #148
Conversation
|
Thanks for the pull request, @navinkarkera! 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✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #148 +/- ##
==========================================
+ Coverage 98.89% 98.95% +0.06%
==========================================
Files 106 109 +3
Lines 1083 1149 +66
Branches 185 217 +32
==========================================
+ Hits 1071 1137 +66
Misses 12 12 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ChrisChV
left a comment
There was a problem hiding this comment.
@navinkarkera Looks good 👍
- I tested this: I followed the testing instructions
- I read through the code and considered the security, stability and performance implications of the changes.
- I tested that the UI can be used with a keyboard only (tab order, keyboard controls).
- Includes tests for bugfixes and/or features added.
- Includes documentation
| import type { PathwayCardProps } from './types'; | ||
| import { getFullImageUrl, getStartDateDisplay } from '../course-card/utils'; | ||
|
|
||
| const isValidCssColor = (value: string) => { |
There was a problem hiding this comment.
I think this function should be in a utils file
| pathwayId?: string; | ||
| pathwayName?: string; | ||
| pathwayOrg?: string; | ||
| pathwayCourseCount?: number; | ||
| pathwayImageUrl?: string; | ||
| pathwayStartDate?: string; | ||
| pathwayAdvertisedStart?: string; | ||
| pathwayType?: string; | ||
| pathwayTypeBackgroundColor?: string; | ||
| pathwayTypeTextColor?: string; |
There was a problem hiding this comment.
Is it necessary for all these props to have the 'pathway' prefix? Given the interface name 'PathwayCardProps', I think it's already implied that those props belong to the pathway.
There was a problem hiding this comment.
It was to match with CourseCardProps but not really useful. Updated here: 97b622a
97b622a to
c1c65f4
Compare
|
@feanil Can you review and merge this pr. |
|
@navinkarkera I'm not super familiar with this project so I'm not the right person to review this but I've pinged the project team to find an appropriate reviewer. |
|
Heads up: the frontend-base conversion of Catalog will in all likelihood land before this PR. (See the announcement.) I apologize for the inconvenience, but once that happens (probably this week), the feature will have to be refactored accordingly. I suggest not closing this PR, though: once the |
Related to: #152
Description:
PathwayCardand course/pathway badges.HomePathwayCardSlotwith frontend plugin support.ENABLE_PATHWAY_PILOT_UIconfiguration gate. The gate keeps the UI disabled by default as the backend is not ready yet.Related links:
Private-ref: https://tasks.opencraft.com/browse/FAL-4373Test instructions
From the repository root, apply pathway-badges-ui-demo.patch to add dummy pathway cards:
Set
ENABLE_PATHWAY_PILOT_UI=true, start the app, and verify pathway cards and badges render. Unset it or set it to any value other thantrue, restart the app, and verify pathway UI and badges do not render.Screenshot: