fix: change the banner design#3032
fix: change the banner design#3032ahtesham-quraish wants to merge 5 commits intocc/program-bundle-upsell-2from
Conversation
frontends/main/src/app-pages/ProductPages/ProgramEnrollmentButton.tsx
Outdated
Show resolved
Hide resolved
e140c50 to
bb44ec4
Compare
ChristopherChudzicki
left a comment
There was a problem hiding this comment.
@ahtesham-quraish This looks nice! A couple requests.
| const course = makeCourse({ next_run_id: run.id, courseruns: [run] }) | ||
|
|
||
| setMockResponse.get(urls.userMe.get(), makeUser({ is_authenticated: true })) | ||
| const { promise } = Promise.withResolvers() |
There was a problem hiding this comment.
Request: Leave this as-is / restore to original. Here and in the other places changed in this PR.
Promise.withResolvers was added in Node 22 and is standard in our environments (Node 24).
Did you have trouble running the tests locally? If so:
- run inside watch container e.g., after
docker compose exec watch bash - Or make sure host node is up-to-date with our docker.
| readableId: string | ||
| } | ||
|
|
||
| const StyledCourseEnrollmentButton = styled(CourseEnrollmentButton)({ |
There was a problem hiding this comment.
Request: Would you mind changing the enrollment button styles? They've been updated to use a white background + black text. https://www.figma.com/design/Eux3guSenAFVvNHGi1Y9Wm/MIT-Design-System?node-id=34479-199611&m=dev
Sorry for the change!
There was a problem hiding this comment.
Can you please now?
There was a problem hiding this comment.
Here and on ProgramPage: Figma was updated to use the "bordered" type button instead of secondary:
Type: Bordered becomes variant="bordered" in the code. (We couldn't use type because that conflicts for buttons...type="submit"|"button"|....)
Could you please:
- Use bordered variant
- And remove almost all of the style overrides. Only the color override should be necessary, I believe.
Currently the hover effect is odd... the changes above should fix it.
| }, | ||
| })) | ||
|
|
||
| const ShortDescription = styled(Typography)(({ theme }) => ({ |
There was a problem hiding this comment.
Hmmm. I do see the ellipsis in some of the Figma pages.
@steven-hatch @mbilalmughal I'm not sure we should clamp this.... If we need to limit the text length:
- Option 1: clamp it, but we need some expand/collapse situation
- Option 2: Do not clamp it, and limit the text length on CMS side.
For now: I'd like to suggest we just not clamp this. And perhaps middle-align the image below.
- 👇 Looks bad, but real authors would not enter text that long.
There was a problem hiding this comment.
Looks good. (Or...as good as it can with hat long text 😆 )
5879aea to
028cbee
Compare
028cbee to
c2defe3
Compare
|
@ChristopherChudzicki cc: @ahtesham-quraish |
c2defe3 to
8881444
Compare
ChristopherChudzicki
left a comment
There was a problem hiding this comment.
Two small fixes:
- button variant to fix hover issue
- "Learning Path" instead of program
| readableId: string | ||
| } | ||
|
|
||
| const StyledCourseEnrollmentButton = styled(CourseEnrollmentButton)({ |
There was a problem hiding this comment.
Here and on ProgramPage: Figma was updated to use the "bordered" type button instead of secondary:
Type: Bordered becomes variant="bordered" in the code. (We couldn't use type because that conflicts for buttons...type="submit"|"button"|....)
Could you please:
- Use bordered variant
- And remove almost all of the style overrides. Only the color override should be necessary, I believe.
Currently the hover effect is odd... the changes above should fix it.
|
|
||
| type CourseEnrollmentButtonProps = { | ||
| course: CourseWithCourseRunsSerializerV2 | ||
| variant?: "primary" | "secondary" |
There was a problem hiding this comment.
You can use variant?: ButtonProps["variant"] for this to get all the variants.
Same comment on ProgramEnrollmentButton
There was a problem hiding this comment.
I have used the proper props. thanks
| return ( | ||
| <ProductPageTemplate | ||
| tags={tags} | ||
| currentBreadcrumbLabel="Program" |
There was a problem hiding this comment.
currentBreadcrumbLabel should be "Learning Path" now, I believe.
There was a problem hiding this comment.
Yes it is fixed
| }, | ||
| })) | ||
|
|
||
| const ShortDescription = styled(Typography)(({ theme }) => ({ |
There was a problem hiding this comment.
Looks good. (Or...as good as it can with hat long text 😆 )
|
@ChristopherChudzicki I have used the bordered variant but Height and some other properties has to be there to align with design. |
76586b1 to
a907c91
Compare
ChristopherChudzicki
left a comment
There was a problem hiding this comment.
👍
I know this is merging into my branch at the moment. Let's wait till that is merged into main (fairly soon, i think) then merge this into main.

What are the relevant tickets?
https://github.com/mitodl/hq/issues/10435#top
Description (What does it do?)
We need to update the product page banner / nav
Acceptance Criteria
Screenshots (if appropriate):
How can this be tested?
For testing you should visits the following urls and compare the design with Figma design
http://open.odl.local:8062/courses/course-v1:MITxT+14.100x
https://rc.learn.mit.edu/programs/program-v1:MITx+DEDP
Additional Context