Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Homepage: Display bhm link instead of video for en-US #39027

Merged
merged 3 commits into from Feb 15, 2021

Conversation

maureensturgeon
Copy link
Contributor

@maureensturgeon maureensturgeon commented Feb 12, 2021

For en-US locale, display Celebrate Black History Month with us! link which links to /blackhistorymonth on the homepage.

This was tested locally (couldn't find homepage tests to add to).

Screen Shot 2021-02-15 at 9 35 52 AM

Screen Shot 2021-02-15 at 9 35 45 AM

Screen Shot 2021-02-15 at 9 35 13 AM

Links

Testing story

Reviewer Checklist:

  • Tests provide adequate coverage
  • Privacy and Security impacts have been assessed
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

@maureensturgeon maureensturgeon marked this pull request as ready for review February 12, 2021 19:52
@maureensturgeon maureensturgeon requested review from a team and breville February 12, 2021 19:54
pegasus/sites.v3/code.org/views/homepage_hero.haml Outdated Show resolved Hide resolved
pegasus/sites.v3/code.org/views/homepage_hero.haml Outdated Show resolved Hide resolved
type: "celebrate_bhm",
}

actions.push(I18n.locale == :"en-US" ? bhm_action : code_video_action)
Copy link
Contributor

Choose a reason for hiding this comment

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

(very minor) Is locale a symbol or a string? (In most places, I see us just compare to en-US but don't know which is more correct. Either way, not too important.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Symbol, I tried as a string, it didn't work

Copy link
Contributor

Choose a reason for hiding this comment

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

Also curious whether there's a standard of how we determine locale? I see elsewhere in that same file we look at request.locale, do you happen to know the difference?

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 do not - I'm assuming that the i18n locale is somehow set by the request locale?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds plausible :)

pegasus/src/homepage.rb Outdated Show resolved Hide resolved
@bencodeorg
Copy link
Contributor

One general question...did you get a chance to see how this looks on smaller screens?

@maureensturgeon
Copy link
Contributor Author

One general question...did you get a chance to see how this looks on smaller screens?

I've added screenshots of other sizes to the description

Copy link
Contributor

@bencodeorg bencodeorg left a comment

Choose a reason for hiding this comment

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

LGTM! Can't tell if the vertical spacing issue is totally fixed from screenshots or if they're just old, but don't think that should block it anyway.

Copy link
Contributor

@jamescodeorg jamescodeorg left a comment

Choose a reason for hiding this comment

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

LGTM

#homepage #actions .herolink-white i {
vertical-align: middle;
margin-right: 5px;
font-size: 26px;
Copy link
Contributor

Choose a reason for hiding this comment

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

Just curious, was 26px just the size that made things look right or was there a reason for picking this value?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is specifically for the icon style i, I just looked at the mocks in the ticket and it was the size that looked most like the icon in the mocks.

@maureensturgeon maureensturgeon merged commit e9be1f5 into staging Feb 15, 2021
@maureensturgeon maureensturgeon deleted the maureen/LP-1747-bhm-homepage-link branch February 15, 2021 19:40
@maureensturgeon maureensturgeon mentioned this pull request Mar 2, 2021
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants