Skip to content

Conversation

@gumaerc
Copy link
Contributor

@gumaerc gumaerc commented Sep 16, 2024

What are the relevant tickets?

Closes https://github.com/mitodl/hq/issues/5360

Description (What does it do?)

This PR adjusts the font and layout of the homepage testimonials section to match the current designs in Figma

Screenshots (if appropriate):

image
image

How can this be tested?

  • Spin up mit-learn on this branch
  • Visit the home page at http://localhost:8062/
  • Scroll down to the testimonials section and ensure that the fonts and spacing match Figma as indicated in the issue

@gumaerc gumaerc added the Needs Review An open Pull Request that is ready for review label Sep 16, 2024
@sovsey
Copy link

sovsey commented Sep 16, 2024

@mbilalmughal Here is a screenshot with the updated font size for the title. How do you recommend we address this issue for a long title that wraps?
Screenshot 2024-09-16 at 4 55 01 PM

@ChristopherChudzicki ChristopherChudzicki self-assigned this Sep 17, 2024
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 left a few small comments about the title / subtitle for homepage testimonials section.

A more annoying issue is... I believe the changes to the "AttestantBlock" component are currently affecting testimonials on the unit pages, too.

Unit pages:
Screenshot 2024-09-17 at 10 52 08 AM

Homepage
Screenshot 2024-09-17 at 10 52 20 AM

The two cases are currently using the same AttestantBlock component, differentiated by variant=start | end named, I presume, because the image placement is different).

Suggestion: I think we should just have separate Attestant components for the two usages. The styles are generally different between them (font, spacing, color, arrangement of elements).

return (
<Section>
<Container id="hamster-noises">
<HeaderContainer id="hamster-noises">
Copy link
Contributor

Choose a reason for hiding this comment

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

Hamsters make weird noises, so we probably don't want those noises on the website. Suggest removing this.

No offense to hamsters.

<Section>
<Container id="hamster-noises">
<HeaderContainer id="hamster-noises">
<Typography component="h2" variant="h2">
Copy link
Contributor

Choose a reason for hiding this comment

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

Looking at Figma, this should be

Suggested change
<Typography component="h2" variant="h2">
<Typography component="h2" typography={{xs: "h3", sm: "h2"}}>

Comment on lines +314 to 317
<Typography variant="body1">
Millions of learners are reaching their goals with MIT's non-degree
learning resources. Here's what they're saying.
</Typography>
Copy link
Contributor

Choose a reason for hiding this comment

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

Looking at figma, I guess this should have textAlign: center.

Could be styled(...), or Typography has a prop for that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The HeaderContainer styled component handles this with alignItems: "center", do we really need a duplicate centering rule?

Copy link
Contributor

@ChristopherChudzicki ChristopherChudzicki Sep 17, 2024

Choose a reason for hiding this comment

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

It's not duplicate, they do different things.

  • align-items: center aligns the purple box within the blue box
  • text-align: center justifies the text at center instead of left

Note: I set the width of the purple box to illustrate the effect. Currently the effect is really only visible on mobile

Screenshot 2024-09-17 at 4 18 56 PM

@gumaerc gumaerc force-pushed the cg/fix-testimonials-font branch from 2acbb19 to 610180e Compare September 17, 2024 15:37
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.

Looks good, but probably still want to text align.

@ChristopherChudzicki
Copy link
Contributor

Merging for carey, he's on vacation

@ChristopherChudzicki ChristopherChudzicki merged commit ad1ef03 into main Sep 18, 2024
This was referenced Sep 18, 2024
@odlbot odlbot mentioned this pull request Sep 18, 2024
15 tasks
@rhysyngsun rhysyngsun deleted the cg/fix-testimonials-font branch February 7, 2025 20:36
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.

4 participants