Skip to content

Commit a26ac5a

Browse files
ui(dashboard): update incidents icon animation to draw exclamation from top to bottom (#4653)
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Kapil Gowru <[email protected]>
1 parent 4f9a1e9 commit a26ac5a

File tree

3 files changed

+57
-7
lines changed

3 files changed

+57
-7
lines changed

packages/fern-dashboard/src/app/globals.css

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -721,14 +721,21 @@ why? who knows. thanks monaco:)
721721
}
722722

723723
/* Icon animations: Incidents */
724-
.group:hover .alert,
725-
.hover-animating .alert {
726-
animation: alert-shake-x 0.5s ease-in-out;
724+
.group:hover .alert-line,
725+
.hover-animating .alert-line {
726+
animation: alert-draw-line 0.3s ease-out;
727+
}
728+
729+
.group:hover .alert-dot,
730+
.hover-animating .alert-dot {
731+
animation: alert-show-dot 0.3s ease-out;
727732
}
728733

729734
@media (prefers-reduced-motion: reduce) {
730-
.group:hover .alert,
731-
.hover-animating .alert {
735+
.group:hover .alert-line,
736+
.hover-animating .alert-line,
737+
.group:hover .alert-dot,
738+
.hover-animating .alert-dot {
732739
animation: none;
733740
}
734741
}

packages/fern-dashboard/src/components/navbar/AlertIconAnimated.tsx

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,28 @@ export function AlertIconAnimated({ className, strokeColor = "var(--green-1100)"
2121
aria-hidden="true"
2222
>
2323
<path
24-
d="M10 6.25V10.625M10 13.75H10.0083M8.6025 2.91583L1.79083 14.375C1.34833 15.1417 1.90333 16.125 2.81333 16.125H17.1867C18.0967 16.125 18.6517 15.1417 18.2092 14.375L11.3975 2.91583C10.955 2.14917 9.845 2.14917 9.4025 2.91583H8.6025Z"
24+
d="M2.24711 13.4381C1.52595 14.6881 2.42809 16.2501 3.8712 16.2501H16.1284C17.5715 16.2501 18.4737 14.6881 17.7525 13.4381L11.6239 2.81522C10.9024 1.56452 9.09727 1.56452 8.37571 2.81522L2.24711 13.4381Z"
2525
stroke={strokeColor}
2626
strokeWidth="1.5"
2727
strokeLinecap="round"
2828
strokeLinejoin="round"
29-
className="transition-stroke-color transition"
29+
className="alert-triangle transition-stroke-color transition"
30+
/>
31+
<path
32+
d="M9.99981 7.50011V10.6251"
33+
stroke={strokeColor}
34+
strokeWidth="1.5"
35+
strokeLinecap="round"
36+
strokeLinejoin="round"
37+
className="alert-line transition-stroke-color transition"
38+
/>
39+
<path
40+
d="M9.99981 13.1251H10.0061V13.1314H9.99981V13.1251"
41+
stroke={strokeColor}
42+
strokeWidth="1.5"
43+
strokeLinecap="round"
44+
strokeLinejoin="round"
45+
className="alert-dot transition-stroke-color transition"
3046
/>
3147
</svg>
3248
);

packages/fern-dashboard/src/styles/_keyframe-animations.scss

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,30 @@
101101
transform: translateX(2px);
102102
}
103103
}
104+
105+
@keyframes alert-draw-line {
106+
0% {
107+
stroke-dasharray: 3.125;
108+
stroke-dashoffset: 3.125;
109+
}
110+
60% {
111+
stroke-dasharray: 3.125;
112+
stroke-dashoffset: 0;
113+
}
114+
100% {
115+
stroke-dasharray: 3.125;
116+
stroke-dashoffset: 0;
117+
}
118+
}
119+
120+
@keyframes alert-show-dot {
121+
0% {
122+
opacity: 0;
123+
}
124+
60% {
125+
opacity: 0;
126+
}
127+
100% {
128+
opacity: 1;
129+
}
130+
}

0 commit comments

Comments
 (0)