-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat: another media custom controls type #566
Conversation
Preview is ready. |
01deaf8
to
ca82669
Compare
a7be789
to
6dad315
Compare
@@ -69,12 +93,37 @@ $controlSize: 64px; | |||
outline: none; | |||
} | |||
} | |||
|
|||
&_with-uikit-play-pause-button { | |||
width: 42px; |
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.
create variable pls
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.
done
0 2px 8px 0 var(--g-color-sfx-shadow-light); | ||
|
||
&:focus { | ||
outline: 2px solid var(--g-color-line-misc); |
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.
maybe create mixin for outlines if it would be the same for elements?
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.
yes, I will create this mixin here #576
width: 24px; | ||
&_type { | ||
&_with-play-pause-button { | ||
height: 24px; |
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.
variable
width: 24px; | ||
} | ||
&_with-uikit-play-pause-button { | ||
height: 16px; |
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.
variable
@@ -87,6 +136,11 @@ $controlSize: 64px; | |||
height: 24px; | |||
width: 24px; | |||
} | |||
&_with-uikit-play-pause-button { | |||
height: 16px; |
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.
variable
mute?: MuteConfigProps; | ||
elapsedTimePercent?: number; | ||
type?: CustomControlsType; | ||
isPaused?: boolean; | ||
onPlayClick?: () => void; | ||
shown: boolean; |
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.
make it non required pls
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.
done
|
||
const playPauseButton = useMemo(() => { | ||
if (type !== CustomControlsType.WithPlayPauseButton) { | ||
const icon = isPaused ? playIcon : pauseIcon; |
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.
seems like in the end we need only playPauseButton and muteButton, I propose to join all of this useMemo
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.
left as it is, but removed useMemo from the above variables
wrapper: !currentHeight, | ||
controls, | ||
'background-shadow-rendered': | ||
!backgroundShadowHidden && |
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.
it would be better to use flag showBackgroundShadow
or just backgroundShadow
same for muteButtonHidden
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.
done
{ | ||
wrapper: !currentHeight, | ||
controls, | ||
'background-shadow-rendered': |
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.
what is the meaning of 'background-shadow-rendered' modifier?
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.
removed, as it is not needed anymore
…for the second one
6dad315
to
77cecfb
Compare
@@ -3,18 +3,44 @@ | |||
|
|||
$block: '.#{$ns}CustomBarControls'; | |||
$controlSize: 64px; | |||
// custom controls sizes | |||
$with-uikit-play-pause-control-size: 42px; |
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.
could you please turn it to camelCase?
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.
done
positioning
,ratio
andmuteButtonHidden
props for video