Skip to content

fix: change the banner design#3032

Open
ahtesham-quraish wants to merge 5 commits intocc/program-bundle-upsell-2from
ahtesham/navbar-changes
Open

fix: change the banner design#3032
ahtesham-quraish wants to merge 5 commits intocc/program-bundle-upsell-2from
ahtesham/navbar-changes

Conversation

@ahtesham-quraish
Copy link
Contributor

@ahtesham-quraish ahtesham-quraish commented Mar 10, 2026

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

Image

Acceptance Criteria

  • Match the designs... Things I notice:
    • New background
    • image/video now larger than sidebar on desktop
    • Program pages say "Learning Paths" in the breadcrumb (all programs)
    • No navigation links

Screenshots (if appropriate):

image image image

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

Copy link
Contributor

@ChristopherChudzicki ChristopherChudzicki left a comment

Choose a reason for hiding this comment

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

@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()
Copy link
Contributor

Choose a reason for hiding this comment

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

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

readableId: string
}

const StyledCourseEnrollmentButton = styled(CourseEnrollmentButton)({
Copy link
Contributor

Choose a reason for hiding this comment

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

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!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can you please now?

Copy link
Contributor

@ChristopherChudzicki ChristopherChudzicki Mar 11, 2026

Choose a reason for hiding this comment

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

Here and on ProgramPage: Figma was updated to use the "bordered" type button instead of secondary:

Image

Type: Bordered becomes variant="bordered" in the code. (We couldn't use type because that conflicts for buttons...type="submit"|"button"|....)

Could you please:

  1. Use bordered variant
  2. 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.

Image

},
}))

const ShortDescription = styled(Typography)(({ theme }) => ({
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmmm. I do see the ellipsis in some of the Figma pages.

Image

@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.
Image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image

I have made this change

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks good. (Or...as good as it can with hat long text 😆 )

@ahtesham-quraish ahtesham-quraish added the Needs Review An open Pull Request that is ready for review label Mar 11, 2026
@ahtesham-quraish ahtesham-quraish force-pushed the ahtesham/navbar-changes branch from 5879aea to 028cbee Compare March 11, 2026 07:28
@ahtesham-quraish ahtesham-quraish force-pushed the ahtesham/navbar-changes branch from 028cbee to c2defe3 Compare March 11, 2026 07:41
@mbilalmughal
Copy link

@ChristopherChudzicki cc: @ahtesham-quraish
I agree with option 2, we need to restrict the text and add chratchter limit.

@ahtesham-quraish ahtesham-quraish force-pushed the ahtesham/navbar-changes branch from c2defe3 to 8881444 Compare March 11, 2026 08:29
Copy link
Contributor

@ChristopherChudzicki ChristopherChudzicki left a comment

Choose a reason for hiding this comment

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

Two small fixes:

  • button variant to fix hover issue
  • "Learning Path" instead of program

readableId: string
}

const StyledCourseEnrollmentButton = styled(CourseEnrollmentButton)({
Copy link
Contributor

@ChristopherChudzicki ChristopherChudzicki Mar 11, 2026

Choose a reason for hiding this comment

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

Here and on ProgramPage: Figma was updated to use the "bordered" type button instead of secondary:

Image

Type: Bordered becomes variant="bordered" in the code. (We couldn't use type because that conflicts for buttons...type="submit"|"button"|....)

Could you please:

  1. Use bordered variant
  2. 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.

Image


type CourseEnrollmentButtonProps = {
course: CourseWithCourseRunsSerializerV2
variant?: "primary" | "secondary"
Copy link
Contributor

Choose a reason for hiding this comment

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

You can use variant?: ButtonProps["variant"] for this to get all the variants.

Same comment on ProgramEnrollmentButton

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have used the proper props. thanks

return (
<ProductPageTemplate
tags={tags}
currentBreadcrumbLabel="Program"
Copy link
Contributor

Choose a reason for hiding this comment

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

currentBreadcrumbLabel should be "Learning Path" now, I believe.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes it is fixed

},
}))

const ShortDescription = styled(Typography)(({ theme }) => ({
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks good. (Or...as good as it can with hat long text 😆 )

@ahtesham-quraish
Copy link
Contributor Author

@ChristopherChudzicki I have used the bordered variant but Height and some other properties has to be there to align with design.

@ahtesham-quraish ahtesham-quraish force-pushed the ahtesham/navbar-changes branch from 76586b1 to a907c91 Compare March 11, 2026 14:17
Copy link
Contributor

@ChristopherChudzicki ChristopherChudzicki left a comment

Choose a reason for hiding this comment

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

👍

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.

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

Labels

Needs Review An open Pull Request that is ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants