-
Notifications
You must be signed in to change notification settings - Fork 23
Update BrandMomentCaptureIntro animation toggle #5853
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
Draft
mcwinter07
wants to merge
14
commits into
main
Choose a base branch
from
winter/KZN-3307-update-brandMomentCaptureIntro-animation-button
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
7c69604
update VideoPlayer to allow for always visible button
mcwinter07 b4c2630
update scene documentation to showcase animatable scenes
mcwinter07 3a9e2ba
rename prop to hasVisibleAnimationToggle
mcwinter07 cab9326
add changeset and run i18n extract
mcwinter07 812ddd5
update Story bg color to correct background
mcwinter07 1601956
update button to large like previous implementation
mcwinter07 d1412e8
update styles to latest designs
mcwinter07 ad8e2db
fix play pause button hook to update toggle properly
mcwinter07 f37dc52
update VideoPlayer to secondary variant
mcwinter07 7f6b0d9
update scene illustration stories and types
mcwinter07 97bee31
update BrandMomentCaptureIntro animation button visibility and stories
mcwinter07 4179090
update VideoPlayer Base interaction styles
mcwinter07 6513287
update Scene illustration docs
mcwinter07 5190a7c
re-add specifier
mcwinter07 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| --- | ||
| '@kaizen/components': patch | ||
| --- | ||
|
|
||
| Add optional prop to `VideoPlayer` and update `BrandMomentCaptureIntro` to always display the animation toggle. | ||
|
|
||
| - Add `hasVisibleAnimationToggle` prop to `VideoPlayer` | ||
| - Update VideoPlayer to next `Button` component | ||
| - Remove redundant styles from button migration | ||
| - Add i18n strings for play/pause labels |
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
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
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
97 changes: 97 additions & 0 deletions
97
packages/components/src/Illustration/subcomponents/Base/Base.module.css
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,97 @@ | ||
| @layer kz-components { | ||
| .wrapper { | ||
| width: 100%; | ||
| margin: 0; | ||
| } | ||
|
|
||
| .figure { | ||
| margin: 0; | ||
| position: relative; | ||
| } | ||
|
|
||
| .figure .pausePlayButton { | ||
| opacity: 0; | ||
| position: absolute; | ||
| left: 0; | ||
| bottom: 0; | ||
| border-width: 1px; | ||
| transition: all var(--animation-duration-immediate) ease; | ||
|
|
||
| @media (hover: none) and (pointer: coarse) { | ||
| background: var(--color-gray-200); | ||
| opacity: 1; | ||
| } | ||
| } | ||
|
|
||
| .figure .pausePlayButton:hover, | ||
| .figure .pausePlayButton:focus, | ||
| .figure:hover .pausePlayButton { | ||
| opacity: 1; | ||
| background: var(--color-gray-200); | ||
| border-color: var(--color-gray-600); | ||
| } | ||
|
|
||
| .hasVisibleAnimationToggle { | ||
| opacity: 1 !important; | ||
| } | ||
|
|
||
| .aspectRatioWrapper { | ||
| margin: 0; | ||
| display: flex; | ||
| align-items: center; | ||
| } | ||
|
|
||
| .landscape { | ||
| aspect-ratio: 4/3; | ||
|
|
||
| @supports not (aspect-ratio: auto) { | ||
| &::before { | ||
| float: left; | ||
| padding-top: 75%; | ||
| content: ''; | ||
| } | ||
|
|
||
| &::after { | ||
| display: block; | ||
| content: ''; | ||
| clear: both; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| .portrait { | ||
| aspect-ratio: 3/4; | ||
|
|
||
| @supports not (aspect-ratio: auto) { | ||
| &::before { | ||
| float: left; | ||
| padding-top: 133.33%; | ||
| content: ''; | ||
| } | ||
|
|
||
| &::after { | ||
| display: block; | ||
| content: ''; | ||
| clear: both; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| .square { | ||
| aspect-ratio: auto 1/1; | ||
|
|
||
| @supports not (aspect-ratio: auto) { | ||
| &::before { | ||
| float: left; | ||
| padding-top: 100%; | ||
| content: ''; | ||
| } | ||
|
|
||
| &::after { | ||
| display: block; | ||
| content: ''; | ||
| clear: both; | ||
| } | ||
| } | ||
| } | ||
| } | ||
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.
I think we can safely use this without a fallback as it's a baseline widely avaiable feature and it landed 4+ years ago in most browsers