Skip to content

Commit a00671c

Browse files
fix(zoomin): fix zoom in animation
1 parent cc22583 commit a00671c

18 files changed

Lines changed: 55 additions & 45 deletions

File tree

src/emotion.d.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@ declare module '@emotion/react' {
77
breakpoints: {
88
desktop: number;
99
};
10-
colorTransition: string;
10+
transitions: {
11+
color: string;
12+
};
13+
animations: {
14+
zoomIn: string;
15+
};
1116
widths: {
1217
eventLoopRadius: number;
1318
eventLoopDiameter: number;

src/pages/home/Home.styled.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ export const BaseLayoutElement = styled.div(
6262
border: 1px solid ${theme.custom.colors.onContainer.dim};
6363
background: ${theme.custom.colors.container};
6464
transition:
65-
background-color ${theme.custom.colorTransition},
66-
border-color ${theme.custom.colorTransition};
65+
background-color ${theme.custom.transitions.color},
66+
border-color ${theme.custom.transitions.color};
6767
margin: 0;
6868
padding: 10px;
6969
`

src/pages/home/sections/Callstack/Callstack.styled.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ export const Callstack = styled.div`
1313
export const CallstackElement = styled.div(
1414
({ theme }) => css`
1515
background: ${theme.custom.colors.onContainer.dim};
16-
transition: background-color ${theme.custom.colorTransition};
16+
transition: background-color ${theme.custom.transitions.color};
17+
animation: ${theme.custom.animations.zoomIn};
1718
border-radius: 5px;
1819
padding: 10px;
1920
word-wrap: break-word;

src/pages/home/sections/Callstack/Callstack.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import * as Styled from './Callstack.styled.ts';
22
import InfoIcon from 'components/InfoIcon/InfoIcon.tsx';
33
import useBoolean from 'utils/hooks/useBoolean.ts';
4-
import { Zoom } from '@mui/material';
54
import { List } from '../../Home.styled.ts';
65
import CallStackModal from './Callstack.modal.tsx';
76
import { useQueueManagerStore } from 'store/store.ts';
@@ -16,9 +15,7 @@ function CallStack({ className }: { className?: string }) {
1615
<Styled.Callstack>
1716
<InfoIcon onClick={toggle} />
1817
{tasks.map((task) => (
19-
<Zoom in key={task}>
20-
<Styled.CallstackElement>{task}</Styled.CallstackElement>
21-
</Zoom>
18+
<Styled.CallstackElement key={task}>{task}</Styled.CallstackElement>
2219
))}
2320
<CallStackModal isOpened={isOpened} toggle={toggle} />
2421
</Styled.Callstack>

src/pages/home/sections/Configurator/Editor/Editor.styled.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,29 @@ export const EditorWrapper = styled.div(
77
88
.ace_layer.ace_gutter-layer {
99
background: ${theme.custom.colors.container};
10-
transition: background-color ${theme.custom.colorTransition};
10+
transition: background-color ${theme.custom.transitions.color};
1111
}
1212
1313
.ace_gutter {
1414
background: ${theme.custom.colors.onContainer.dim};
15-
transition: background-color ${theme.custom.colorTransition};
15+
transition: background-color ${theme.custom.transitions.color};
1616
}
1717
1818
.selected_lines {
1919
position: absolute;
2020
background: ${theme.custom.colors.tertiary.normal};
21-
transition: background-color ${theme.custom.colorTransition};
21+
transition: background-color ${theme.custom.transitions.color};
2222
opacity: 0.3;
2323
}
2424
2525
.ace_gutter-active-line {
2626
background: ${theme.custom.colors.onContainer.dim};
27-
transition: background-color ${theme.custom.colorTransition};
27+
transition: background-color ${theme.custom.transitions.color};
2828
}
2929
3030
.ace_content {
3131
background: ${theme.custom.colors.container};
32-
transition: background-color ${theme.custom.colorTransition};
32+
transition: background-color ${theme.custom.transitions.color};
3333
}
3434
`
3535
);

src/pages/home/sections/Console/Console.styled.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ export const LogQueue = styled.div`
1212
export const Log = styled.div(
1313
({ theme }) => css`
1414
background: ${theme.custom.colors.onContainer.dim};
15-
transition: background-color ${theme.custom.colorTransition};
15+
transition: background-color ${theme.custom.transitions.color};
16+
animation: ${theme.custom.animations.zoomIn};
1617
border-radius: 5px;
1718
padding: 10px;
1819
word-wrap: break-word;

src/pages/home/sections/Console/Console.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { useQueueManagerStore } from 'store/store.ts';
22
import * as Styled from './Console.styled.ts';
3-
import { Zoom } from '@mui/material';
43
import { List } from '../../Home.styled.ts';
54

65
function Console({ className }: { className?: string }) {
@@ -11,9 +10,7 @@ function Console({ className }: { className?: string }) {
1110
<span>Console</span>
1211
<Styled.LogQueue>
1312
{tasks.map((log, i) => (
14-
<Zoom in key={log + i}>
15-
<Styled.Log>{log}</Styled.Log>
16-
</Zoom>
13+
<Styled.Log key={log + i}>{log}</Styled.Log>
1714
))}
1815
</Styled.LogQueue>
1916
</List>

src/pages/home/sections/EventLoop/Wheel/Wheel.styled.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ export const SVGContainer = styled.svg(
1616
text,
1717
circle {
1818
transition:
19-
background-color ${theme.custom.colorTransition},
20-
color ${theme.custom.colorTransition},
21-
stroke ${theme.custom.colorTransition},
22-
fill ${theme.custom.colorTransition};
19+
background-color ${theme.custom.transitions.color},
20+
color ${theme.custom.transitions.color},
21+
stroke ${theme.custom.transitions.color},
22+
fill ${theme.custom.transitions.color};
2323
}
2424
`
2525
);

src/pages/home/sections/MicroTasksQueue/MicroTasksQueue.styled.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ export const MicroTasksQueue = styled.div`
1212
export const MicroTask = styled.div(
1313
({ theme }) => css`
1414
background: ${theme.custom.colors.onContainer.dim};
15-
transition: background-color ${theme.custom.colorTransition};
15+
transition: background-color ${theme.custom.transitions.color};
16+
animation: ${theme.custom.animations.zoomIn};
1617
flex: 1;
1718
display: flex;
1819
justify-content: center;

src/pages/home/sections/MicroTasksQueue/MicroTasksQueue.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { useQueueManagerStore } from 'store/store.ts';
22
import * as Styled from './MicroTasksQueue.styled.ts';
33
import InfoIcon from 'components/InfoIcon/InfoIcon.tsx';
44
import useBoolean from 'utils/hooks/useBoolean.ts';
5-
import { Zoom } from '@mui/material';
65
import { List } from '../../Home.styled.ts';
76
import MicroTasksQueueModal from './MicroTasksQueue.modal.tsx';
87

@@ -16,9 +15,7 @@ function MicroTasksQueue({ className }: { className?: string }) {
1615
<Styled.MicroTasksQueue>
1716
<InfoIcon onClick={toggle} />
1817
{tasks.map((task) => (
19-
<Zoom in key={task}>
20-
<Styled.MicroTask>{task}</Styled.MicroTask>
21-
</Zoom>
18+
<Styled.MicroTask key={task}>{task}</Styled.MicroTask>
2219
))}
2320
<MicroTasksQueueModal isOpened={isOpened} toggle={toggle} />
2421
</Styled.MicroTasksQueue>

0 commit comments

Comments
 (0)