ISSUE-045 - Chyron Body - Added Team Name flicker.
Added DarkBG option to Workspace PreviewWindow. Fixed issue with blindsColorFadeDelay not being correct. Calibrating the timing of animations and transitions better. Added the subtle TeamColorBar squeeze look with outline and a wide clip-path adjustment.
This commit is contained in:
1 parent
b545750f70
commit
9ff77cc88a
11 files changed
+68
-42
No files matched your search
@@ -68,7 +68,7 @@ export function ChyronDriver({ chyronData, subMode, openState }: ChyronDriverPro
|
||||
open={openState !== 0}
|
||||
transitionProps={[{
|
||||
property: "outline",
|
||||
duration: 1000,
|
||||
duration: 1167,
|
||||
}]}
|
||||
/>
|
||||
<BaseBlack
|
||||
@@ -79,25 +79,26 @@ export function ChyronDriver({ chyronData, subMode, openState }: ChyronDriverPro
|
||||
timing: "ease-in",
|
||||
}, {
|
||||
property: "width",
|
||||
duration: 400,
|
||||
duration: 667,
|
||||
timing: "ease-out",
|
||||
delay: 100,
|
||||
delay: 0,
|
||||
}]}
|
||||
/>
|
||||
<BaseLayout
|
||||
open={openState !== 0}
|
||||
transitionProps={[{
|
||||
property: "clip-path",
|
||||
duration: 800,
|
||||
duration: 400,
|
||||
timing: "ease-in",
|
||||
delay: 333,
|
||||
}]}
|
||||
>
|
||||
<BaseBackgroundColor
|
||||
open={openState !== 0}
|
||||
transitionProps={[{
|
||||
property: "opacity",
|
||||
duration: 600,
|
||||
delay: 900,
|
||||
duration: 566,
|
||||
delay: 600,
|
||||
}]}
|
||||
teamColor={teamColor}
|
||||
/>
|
||||
@@ -129,9 +130,9 @@ export function ChyronDriver({ chyronData, subMode, openState }: ChyronDriverPro
|
||||
open={openState !== 0}
|
||||
transitionProps={[{
|
||||
property: "clip-path",
|
||||
duration: 750,
|
||||
duration: 667,
|
||||
timing: "ease-in-out",
|
||||
delay: 750,
|
||||
delay: 733,
|
||||
}]}
|
||||
color={teamColor}
|
||||
/>
|
||||
@@ -150,7 +151,9 @@ export function ChyronDriver({ chyronData, subMode, openState }: ChyronDriverPro
|
||||
</NumberContainer>
|
||||
)}
|
||||
</NameContainer>
|
||||
<TeamName>{car.driver.team.shortName}</TeamName>
|
||||
<TeamName open={openState !== 0}>
|
||||
{car.driver.team.shortName}
|
||||
</TeamName>
|
||||
</TextContainer>
|
||||
<FlagContainer
|
||||
open={openState !== 0}
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
import { animated } from "@react-spring/web";
|
||||
import styled from "styled-components";
|
||||
import styled, { css, keyframes } from "styled-components";
|
||||
|
||||
import { Placement, Px, TransitionArgs } from "../../../../types/style";
|
||||
import { commonTransition, placementStyleRules } from "../../../../utils/styling";
|
||||
|
||||
type TransitionProps = {
|
||||
type OpenProps = {
|
||||
open: boolean,
|
||||
};
|
||||
type TransitionProps = OpenProps & {
|
||||
transitionProps: TransitionArgs[],
|
||||
};
|
||||
|
||||
@@ -91,7 +93,9 @@ export const TeamColorBar = styled.div<TeamColorBarProps & TransitionProps>`
|
||||
|
||||
clip-path: ${({ open }) => open
|
||||
? "polygon(0 0, 100% 0, 100% 100%, 0 100%)"
|
||||
: "polygon(0 0, 100% 0, 100% 0, 0 0)"};
|
||||
: "polygon(-100% 0, 200% 0, 200% 0, -100% 0)"};
|
||||
|
||||
outline: ${({ color }) => color} solid 1px;
|
||||
|
||||
${({ transitionProps }) => commonTransition(transitionProps)};
|
||||
`;
|
||||
@@ -137,11 +141,23 @@ export const NumberContainer = styled.div`
|
||||
`;
|
||||
NumberContainer.displayName = "NumberContainer";
|
||||
|
||||
export const TeamName = styled.div`
|
||||
const blinkingAnimation = keyframes`
|
||||
0% { opacity: 0.4 }
|
||||
14% { opacity: 0 }
|
||||
42% { opacity: 0.4 }
|
||||
56% { opacity: 0 }
|
||||
86% { opacity: 1 }
|
||||
`;
|
||||
|
||||
export const TeamName = styled.div<OpenProps>`
|
||||
position: relative;
|
||||
font-family: ${p => p.theme.fonts.f1Regular};
|
||||
color: #d1d1d1;
|
||||
font-size: 20px;
|
||||
|
||||
${({ open }) => open && css`
|
||||
animation: ${blinkingAnimation} 233ms step-end 500ms;
|
||||
`}
|
||||
`;
|
||||
TeamName.displayName = "TeamName";
|
||||
|
||||
|
||||
+2
-2
@@ -92,7 +92,7 @@ export const VenetianBlindsTransition = (
|
||||
opaqueWidth={blindsSize.opaque}
|
||||
blindsColor={blindsColor}
|
||||
blindsColorFadeDuration={blindsColorFadeDuration}
|
||||
blindsColorFadeDelay={blindsColorFadeDelay}
|
||||
blindsColorFadeDelay={blindsColorFadeDelay + delay}
|
||||
blindsClosing={visible}
|
||||
spanBlinkDuration={spanBlinkDuration}
|
||||
spanBlinkDelay={delay}
|
||||
@@ -106,7 +106,7 @@ export const VenetianBlindsTransition = (
|
||||
opaqueWidth={blindsSize.opaque}
|
||||
blindsColor={blindsColor}
|
||||
blindsColorFadeDuration={blindsColorFadeDuration}
|
||||
blindsColorFadeDelay={blindsColorFadeDelay}
|
||||
blindsColorFadeDelay={blindsColorFadeDelay + delay}
|
||||
blindsClosing={visible}
|
||||
spanBlinkDuration={spanBlinkDuration}
|
||||
spanBlinkDelay={delay}
|
||||
|
||||
Reference in new issue
Block a user