-
Notifications
You must be signed in to change notification settings - Fork 0
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
GIVCAMP-282 | React Player preview (light) #216
Changes from all commits
b788dac
09518a8
34c7bd3
fd617ac
f936c8c
0fce6a1
9b208e8
237cc85
c14b812
f23df9b
51fb949
5bb2ed7
dd20af7
99be874
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
export const mediaWrapper = '*:!w-full *:!h-full'; | ||
export const caption = '*:*:leading-display caption mt-1em max-w-prose-wide'; | ||
export const iconWrapper = 'size-50 sm:size-70 bg-black-true/70 border-3 rounded-full border-white group-hocus-within:scale-110 transition group-hocus-within:bg-digital-red'; | ||
export const previewIcon = 'text-white size-24 sm:size-30'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ type FeatureMasonryProps = React.HTMLAttributes<HTMLDivElement> & { | |
imageFocus1?: string; | ||
imageAlt1?: string; | ||
videoUrl?: string; | ||
previewAriaLabel?: string; | ||
caption?: string; | ||
} | ||
|
||
|
@@ -34,6 +35,7 @@ export const FeatureMasonry = ({ | |
imageFocus1, | ||
imageAlt1, | ||
videoUrl, | ||
previewAriaLabel, | ||
caption, | ||
className, | ||
...props | ||
|
@@ -92,8 +94,10 @@ export const FeatureMasonry = ({ | |
</div> | ||
<EmbedMedia | ||
mediaUrl={videoUrl} | ||
isPreview | ||
className="lg:col-span-6 bg-black-70" | ||
aspectRatio="16x9" | ||
previewAriaLabel={previewAriaLabel} | ||
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. Yay reading through the code... When things are not in the doxn it scares me a bit for if the maintainers are going to continue to maintain the prop. Most of the time it is just because they haven't gotten to the documentation yet and I don't see this as a critical thing but I thought I would share my $0.02 anyhow. 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. Yeah, it looks like they recently switched maintainer. I looked at the merged pull request, and looks like this prop was added fairly recently: I'll give them benefit of the doubt this time 😆 |
||
/> | ||
</Grid> | ||
<Text variant="caption" leading="display" className="text-black-70 max-w-prose-wide mt-1em whitespace-pre-line"> | ||
|
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 |
---|---|---|
|
@@ -40,7 +40,7 @@ | |
"framer-motion": "^10.16.4", | ||
"next": "13.4.9", | ||
"react-loading-skeleton": "^3.3.1", | ||
"react-player": "^2.14.1", | ||
"react-player": "^2.15.1", | ||
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. Update react player to latest which included this new previewAriaLabel prop |
||
"storyblok-rich-text-react-renderer-ts": "^3.2.0", | ||
"usehooks-ts": "^2.9.1" | ||
}, | ||
|
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.
SODA said this makes it ok accessible (it renders a clickable/focusable div). When I have time I'll open a PR to React Player to add a role="button" (SODA suggestion to make it fully accessible).
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.
You can always just log a request or file a bug. It is nice of you to submit the PR but sometimes you can just let others know if you don't have the time.