Skip to content
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

chore: update frame names to fetch icon groups from Figma #4357

Merged
merged 1 commit into from
May 22, 2024
Merged
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
10 changes: 8 additions & 2 deletions packages/orbit-components/config/fetchIcons.mts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,13 @@ interface Images {
images: Record<string, string>;
}

const FILTERED_FRAMES = ["All icons", "Social Colored", "Social", "Navigation icons"];
const VALID_FRAMES = [
"[Main] Bold icons",
"[Main] Light icons",
"Social Colored",
"Social",
"Navigation icons",
];
const ICONS_ID = "wjYAT0sNBXtirEoyKgXUwr";
const FIGMA_FILE_URI = `https://api.figma.com/v1/files/${ICONS_ID}`;
const FIGMA_IMAGE_URI = `https://api.figma.com/v1/images/${ICONS_ID}`;
Expand Down Expand Up @@ -190,7 +196,7 @@ async function saveOrbitIcons(data: { name: string; svg: string; id: string }[])
const { components } = meta;

const nodes = components
.filter(c => FILTERED_FRAMES.includes(c.containing_frame.name))
.filter(c => VALID_FRAMES.includes(c.containing_frame.name))
.reduce((acc, c) => {
if (c.name.includes("size=") && !isCorrectSize(c.name)) return acc;

Expand Down
Loading