-
Notifications
You must be signed in to change notification settings - Fork 32
Card Pill #15285
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
Merged
Merged
Card Pill #15285
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
f15d20c
Add a CardPill component
abeddow91 78f6d82
Use CardPill on highlights card
abeddow91 e041c95
Use CardPill in Card and only display age when its a storylines card
abeddow91 9967b9a
Show a pill if it is a youtube atom feature card thats also a video page
abeddow91 2392c75
Use CardPill in CardFooter
abeddow91 e88105c
Move card pill decision into card footer
abeddow91 dd6ba80
Move card pill decision into card footer
abeddow91 39821a3
Do not show pill if the card is in a second onwards container in a ga…
abeddow91 edef446
Only pad top if its meta data
abeddow91 3cf9a99
Update stories
abeddow91 786c993
Use isLive property from main media to determine if the live video pi…
abeddow91 071727c
Remove default null from card pill so that the switch case is exhaust…
abeddow91 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
ifcondition has moved down, so ifshouldShowPillandshouldShowBrandingare true, we'll now show the pill instead of the branding. Is this expected?Uh oh!
There was an error while loading. Please reload this page.
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 a good question. Based on the current logic, I believe the behaviour is correct.
Previously, the only place where orchestration between the pill and branding existed was within Card. The logic that determined which footer variant to render lived here
dotcom-rendering/dotcom-rendering/src/components/Card/Card.tsx
Lines 1305 to 1329 in 693f504
The logic being:
If a pill should be shown, it took precedence and was rendered, with an optional branding logo.
Otherwise, the standard was rendered, with optional branding provided.
Although CardFooter is used in three other places (once more in Card, once in FeatureCard, and once in YoutubeAtomFeatureCardOverlay), none of those instances provide both branding and a pill at the same time.