Skip to content

chore: move cats to base64 datauri#4692

Merged
mimarz merged 10 commits intomainfrom
chore-remove-cats-that-cant-be-found
Apr 8, 2026
Merged

chore: move cats to base64 datauri#4692
mimarz merged 10 commits intomainfrom
chore-remove-cats-that-cant-be-found

Conversation

@mimarz
Copy link
Copy Markdown
Collaborator

@mimarz mimarz commented Apr 1, 2026

Removed cat jpg images and @asset that was causing resolving errors.
Cats have been moved to constants as base64 encoded data-uris.

 ✓  @digdir/designsystemet-react (chromium)  src/components/dropdown/dropdown.test.tsx (2 tests) 33ms
1:43:43 PM [vite] (client) Pre-transform error: Failed to resolve import "@assets/img/cats/Cat 3.jpg" from "packages/react/src/components/avatar/avatar.stories.tsx". Does the file exist?
  Plugin: vite:import-analysis
  File: /Users/michaelmarszalek/Documents/designsystemet/packages/react/src/components/avatar/avatar.stories.tsx:1:17
  1  |  "use strict";
  2  |  import { Fragment, jsxDEV } from "react/jsx-dev-runtime";
  3  |  import cat1 from "@assets/img/cats/Cat 3.jpg";
     |                    ^
  4  |  import { BriefcaseIcon } from "@navikt/aksel-icons";
  5  |  import { themeColors } from "../../../stories/constants";
1:43:43 PM [vite] (client) Pre-transform error: Failed to resolve import "@assets/img/cats/Cat 1.jpg" from "packages/react/src/components/card/card.stories.tsx". Does the file exist?
  Plugin: vite:import-analysis
  File: /Users/michaelmarszalek/Documents/designsystemet/packages/react/src/components/card/card.stories.tsx:1:17
  1  |  "use strict";
  2  |  import { Fragment, jsxDEV } from "react/jsx-dev-runtime";
  3  |  import cat1 from "@assets/img/cats/Cat 1.jpg";
     |                    ^
  4  |  import cat5 from "@assets/img/cats/Cat 5.jpg";
  5  |  import { severityColors, themeColors } from "../../../stories/constants";

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 1, 2026

🦋 Changeset detected

Latest commit: b8a233d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

Preview deployments for this pull request:

storybook - 8. Apr 2026 - 13:25

@mimarz mimarz marked this pull request as ready for review April 1, 2026 12:02
Comment thread packages/react/src/components/avatar/avatar.stories.tsx Outdated
@Barsnes
Copy link
Copy Markdown
Member

Barsnes commented Apr 7, 2026

I think we should base64 encode som actual images for our cards at least
image

@mimarz
Copy link
Copy Markdown
Collaborator Author

mimarz commented Apr 8, 2026

I think we should base64 encode som actual images for our cards at least image

can try :)

@mimarz
Copy link
Copy Markdown
Collaborator Author

mimarz commented Apr 8, 2026

I think we should base64 encode som actual images for our cards at least

@Barsnes tested converting some of the images to base64 data-uri and they get huuge. So suggest we drop that

Tested again with lower resolution and converted ext to webp seem to work ok.

@mimarz mimarz changed the title chore: remove cat images that caused testing errors chore: move cats to base64 datauri Apr 8, 2026
Copy link
Copy Markdown
Collaborator

@oddvernes oddvernes left a comment

Choose a reason for hiding this comment

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

LGTM!

@mimarz mimarz merged commit 553c387 into main Apr 8, 2026
16 of 17 checks passed
@mimarz mimarz deleted the chore-remove-cats-that-cant-be-found branch April 8, 2026 14:10
@oddvernes oddvernes restored the chore-remove-cats-that-cant-be-found branch April 15, 2026 11:36
@oddvernes oddvernes deleted the chore-remove-cats-that-cant-be-found branch April 15, 2026 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants