Skip to content

Commit

Permalink
chore: update icons unicode
Browse files Browse the repository at this point in the history
This should not have any impact on users

This change was requested by mobile team, because unicode chars need to be unique
  • Loading branch information
DSil authored and mvidalgarcia committed Sep 4, 2024
1 parent d550d8f commit 9049cab
Show file tree
Hide file tree
Showing 154 changed files with 167 additions and 166 deletions.
7 changes: 4 additions & 3 deletions packages/orbit-components/config/fetchIcons.mts
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,12 @@ async function saveOrbitIcons(data: { name: string; svg: string; id: string }[])
const savedIds: string[] = [];

for (const { name, svg, id } of data) {
// id is of format XXXX:XXXX, we want the second part only.
const formattedId = id.split(":")[1];
const parsedName = parseName(name);
const content = setSvgContent(parsedName, svg, id);
const content = setSvgContent(parsedName, svg, formattedId);
const filePath = path.join(SVG_FOLDER, `${parsedName}.svg`);
let currentId = id;
let currentId = formattedId;

if (!fs.existsSync(filePath)) {
await fs.writeFile(filePath, content, "utf-8").then(() => {
Expand All @@ -168,7 +170,6 @@ async function saveOrbitIcons(data: { name: string; svg: string; id: string }[])
height,
{ threshold: 0.1 },
);

// update the content only if the diff is bigger than 0
if (numDiffPixels > 0) {
currentId = match;
Expand Down
2 changes: 1 addition & 1 deletion packages/orbit-components/src/icons/svg/accommodation.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/orbit-components/src/icons/svg/admin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions packages/orbit-components/src/icons/svg/airplane-down.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/orbit-components/src/icons/svg/alert-circle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/orbit-components/src/icons/svg/alert-octagon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/orbit-components/src/icons/svg/alert.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 9049cab

Please sign in to comment.