Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 28 additions & 95 deletions src/assets/icons/LoadingIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,103 +3,36 @@ import { iconProperties, IconProps } from "@/assets/icons/IconProperties";
export default function LoadingIcon(props: IconProps) {
return (
<svg
width="135"
height="140"
viewBox="0 0 135 140"
viewBox="0 0 919 669"
fill="none"
xmlns="http://www.w3.org/2000/svg"
fillOpacity="0.8"
{...iconProperties(props)}
>
<rect y="10" width="15" height="120" rx="6">
<animate
attributeName="height"
begin="0.5s"
dur="1s"
values="120;110;100;90;80;70;60;50;40;140;120"
calcMode="linear"
repeatCount="indefinite"
/>
<animate
attributeName="y"
begin="0.5s"
dur="1s"
values="10;15;20;25;30;35;40;45;50;0;10"
calcMode="linear"
repeatCount="indefinite"
/>
</rect>
<rect x="30" y="10" width="15" height="120" rx="6">
<animate
attributeName="height"
begin="0.25s"
dur="1s"
values="120;110;100;90;80;70;60;50;40;140;120"
calcMode="linear"
repeatCount="indefinite"
/>
<animate
attributeName="y"
begin="0.25s"
dur="1s"
values="10;15;20;25;30;35;40;45;50;0;10"
calcMode="linear"
repeatCount="indefinite"
/>
</rect>
<rect x="60" width="15" height="140" rx="6">
<animate
attributeName="height"
begin="0s"
dur="1s"
values="120;110;100;90;80;70;60;50;40;140;120"
calcMode="linear"
repeatCount="indefinite"
/>
<animate
attributeName="y"
begin="0s"
dur="1s"
values="10;15;20;25;30;35;40;45;50;0;10"
calcMode="linear"
repeatCount="indefinite"
/>
</rect>
<rect x="90" y="10" width="15" height="120" rx="6">
<animate
attributeName="height"
begin="0.25s"
dur="1s"
values="120;110;100;90;80;70;60;50;40;140;120"
calcMode="linear"
repeatCount="indefinite"
/>
<animate
attributeName="y"
begin="0.25s"
dur="1s"
values="10;15;20;25;30;35;40;45;50;0;10"
calcMode="linear"
repeatCount="indefinite"
/>
</rect>
<rect x="120" y="10" width="15" height="120" rx="6">
<animate
attributeName="height"
begin="0.5s"
dur="1s"
values="120;110;100;90;80;70;60;50;40;140;120"
calcMode="linear"
repeatCount="indefinite"
/>
<animate
attributeName="y"
begin="0.5s"
dur="1s"
values="10;15;20;25;30;35;40;45;50;0;10"
calcMode="linear"
repeatCount="indefinite"
/>
</rect>
<style>{`
@keyframes nb-loader-pulse {
0%, 100% { transform: scale(0.85); opacity: 0.35; }
50% { transform: scale(1); opacity: 1; }
}
.nb-loader-bird {
animation: nb-loader-pulse 1.75s ease-in-out infinite;
transform-origin: 50% 50%;
transform-box: fill-box;
}
`}</style>
<g className={"nb-loader-bird"}>
<path
d="M653.25 0C542.297 10.255 487.216 74.132 466.346 106.359L456.959 122.609C456.311 123.963 455.886 124.865 455.886 124.865L455.774 124.685L142.056 668.021H533.256L918.947 0H653.25Z"
fill="#F68330"
/>
<path
d="M533.256 668.02L0 102.296C0 102.296 603.149 -59.6172 661.827 445.893L533.256 668.02Z"
fill="#F68330"
/>
<path
d="M454.3 127.229L290.658 410.664L533.256 668.02L661.757 445.475C641.46 271.63 556.721 176.843 454.3 127.229Z"
fill="#F35E32"
/>
</g>
</svg>
);
}
}
2 changes: 1 addition & 1 deletion src/components/ui/FullScreenLoading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default function FullScreenLoading({ fullScreen = true }: Props) {
fullScreen && "h-screen",
)}
>
<LoadingIcon className="fill-netbird" size={44} />
<LoadingIcon className="fill-netbird" size={68} />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

fill-netbird is now dead code — the paths' explicit fill attributes block inheritance

Previously, the <rect> elements in LoadingIcon had no explicit fill, so they inherited the fill-netbird color from the parent SVG. The new <path> elements each carry hardcoded fill presentation attributes (#F68330, #F35E32). Presentation attributes contribute to the author level of the cascade with specificity 0, and SVG presentation attributes are overridden by any other style definitions, but they still apply directly to the element and beat inherited values from a parent. As a result, className="fill-netbird" has no visual effect on the rendered bird shapes.

Two paths forward:

Option A — Accept the hardcoded brand palette and drop the dead class:

-      <LoadingIcon className="fill-netbird" size={68} />
+      <LoadingIcon size={68} />

Option B — Restore CSS-driven theming by using currentColor in the paths:

- fill="#F68330"
+ fill="currentColor"

Then control the color via a text-* Tailwind utility on the parent element (SVG fill inherits from CSS color when currentColor is used).

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<LoadingIcon className="fill-netbird" size={68} />
<LoadingIcon size={68} />
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/ui/FullScreenLoading.tsx` at line 15, The SVG in LoadingIcon
currently hardcodes path fill colors so the parent className="fill-netbird" in
FullScreenLoading is dead; update the LoadingIcon component's <path> elements to
use fill="currentColor" (or remove presentation fill attributes) so the icon
inherits color, then change the parent usage in FullScreenLoading to apply a
text color utility (e.g., replace className="fill-netbird" with
className="text-netbird" or otherwise set CSS color) to control the brand color
via CSS-driven theming.

</div>
);
}
Loading