Skip to content

Add unplugin-icons#410

Merged
theosanderson merged 1 commit into
mainfrom
add-icon
Oct 30, 2023
Merged

Add unplugin-icons#410
theosanderson merged 1 commit into
mainfrom
add-icon

Conversation

@theosanderson

@theosanderson theosanderson commented Oct 23, 2023

Copy link
Copy Markdown
Member

This library works in both React (including SSR) and Astro. I've included an example icon on the API documentation page. You can search for icons here: https://icon-sets.iconify.design/

resolves #399

@netlify

netlify Bot commented Oct 23, 2023

Copy link
Copy Markdown

Deploy Preview for pathoplexus ready!

Name Link
🔨 Latest commit 00be9af
🔍 Latest deploy log https://app.netlify.com/sites/pathoplexus/deploys/653f8af6a18a7800081d0cbc
😎 Deploy Preview https://deploy-preview-410--pathoplexus.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@theosanderson theosanderson requested review from a user and chaoran-chen October 23, 2023 13:22
@theosanderson

Copy link
Copy Markdown
Member Author

I can't see if the Netlify failures are a real issue or due to my account or something?

@fengelniederhammer

Copy link
Copy Markdown
Contributor

Netlify build output:

3:25:24 PM: 01:25:24 PM [build] Building server entrypoints...
3:25:25 PM: [vite]: Rollup failed to resolve import "~icons/mdi/tick-outline" from "/opt/build/repo/website/src/pages/api_documentation/index.astro".
3:25:25 PM: This is most likely unintended because it can break your application at runtime.
3:25:25 PM: If you do want to externalize this module explicitly add it to
3:25:25 PM: `build.rollupOptions.external`
3:25:25 PM:  error   [vite]: Rollup failed to resolve import "~icons/mdi/tick-outline" from "/opt/build/repo/website/src/pages/api_documentation/index.astro".
3:25:25 PM:   This is most likely unintended because it can break your application at runtime.
3:25:25 PM:   If you do want to externalize this module explicitly add it to
3:25:25 PM:   `build.rollupOptions.external`
3:25:25 PM:   Hint:
3:25:25 PM:     Browser APIs are not available on the server.
3:25:25 PM:     If the code is in a framework component, try to access these objects after rendering using lifecycle methods or use a `client:only` directive to make the component exclusively run on the client.
3:25:25 PM:     See https://docs.astro.build/en/guides/troubleshooting/#document-or-window-is-not-defined for more information.
3:25:25 PM:     		
3:25:25 PM:   Stacktrace:
3:25:25 PM: Error: [vite]: Rollup failed to resolve import "~icons/mdi/tick-outline" from "/opt/build/repo/website/src/pages/api_documentation/index.astro".
3:25:25 PM: This is most likely unintended because it can break your application at runtime.
3:25:25 PM: If you do want to externalize this module explicitly add it to
3:25:25 PM: `build.rollupOptions.external`
3:25:25 PM:     at viteWarn (file:///opt/build/repo/website/node_modules/vite/dist/node/chunks/dep-df561101.js:48142:27)
3:25:25 PM:     at onwarn (file:///opt/build/repo/website/node_modules/@vitejs/plugin-react/dist/index.mjs:247:9)
3:25:25 PM:     at onRollupWarning (file:///opt/build/repo/website/node_modules/vite/dist/node/chunks/dep-df561101.js:48171:9)
3:25:25 PM:     at onwarn (file:///opt/build/repo/website/node_modules/vite/dist/node/chunks/dep-df561101.js:47902:13)
3:25:25 PM:     at file:///opt/build/repo/website/node_modules/rollup/dist/es/shared/node-entry.js:24276:13
3:25:25 PM:     at Object.logger [as onLog] (file:///opt/build/repo/website/node_modules/rollup/dist/es/shared/node-entry.js:25950:9)
3:25:25 PM:     at ModuleLoader.handleInvalidResolvedId (file:///opt/build/repo/website/node_modules/rollup/dist/es/shared/node-entry.js:24862:26)
3:25:25 PM:     at file:///opt/build/repo/website/node_modules/rollup/dist/es/shared/node-entry.js:24822:26
3:25:25 PM:     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
3:25:26 PM: Failed during stage "building site": Build script returned non-zero exit code: 2

Is the ~ in ~icons/mdi/tick-outline intentional?

@theosanderson

Copy link
Copy Markdown
Member Author

Ah it's because netlify has its own vite/astro config - will fix thanks. (Yes, it is intentional)

@JonasKellerer

Copy link
Copy Markdown
Contributor

I like it. :) Thanks. The preview works for me.
Do you want to swap the existing icons (in DataRow and InputField) too and we merge this PR?

@theosanderson theosanderson added the preview Triggers a deployment to argocd label Oct 23, 2023
@theosanderson

Copy link
Copy Markdown
Member Author

This now has those icons swapped out and is passing tests etc. I haven't personally checked the icons as I haven't been able to get backends etc. running locally, and the e2e preview thing is failing due to something with the backend atm.

Comment thread website/src/components/Review/DataRow.tsx Outdated
Comment thread website/src/pages/api_documentation/index.astro Outdated
@ghost

ghost commented Oct 25, 2023

Copy link
Copy Markdown

resolves #399

@ghost ghost mentioned this pull request Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview Triggers a deployment to argocd

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace MUI icons with svg

3 participants