-
Notifications
You must be signed in to change notification settings - Fork 481
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -184,21 +184,28 @@ def self.get_actions(request) | |
} | ||
] | ||
elsif ["post-hoc", "pre-hoc"].include? hoc_mode | ||
[ | ||
actions = [ | ||
{ | ||
text: "homepage_action_text_learn", | ||
type: "cta_button", | ||
url: CDO.studio_url("/courses"), | ||
}, | ||
{ | ||
text: "homepage_action_text_codevideo", | ||
type: "video", | ||
youtube_id: youtube_id, | ||
download_path: download_path, | ||
facebook: facebook, | ||
twitter: twitter | ||
} | ||
] | ||
|
||
code_video_action = { | ||
text: "homepage_action_text_codevideo", | ||
type: "video", | ||
youtube_id: youtube_id, | ||
download_path: download_path, | ||
facebook: facebook, | ||
twitter: twitter | ||
} | ||
|
||
bhm_action = { | ||
type: "celebrate_bhm", | ||
maureensturgeon marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
|
||
actions.push(I18n.locale == :"en-US" ? bhm_action : code_video_action) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Symbol, I tried as a string, it didn't work There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds plausible :) |
||
else | ||
[ | ||
{ | ||
|
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.