Skip to content

Investigate problem with MUI icons #377

Closed

Description

@fengelniederhammer

See comments in #375 - MUI icons have a problem with server-side rendering. Investigate and find a solution:

  • Does the noSsr solution work properly or does it come with any disadvantages?
  • Is there another library that offers icons that work with SSR?
  • Should we simply include the icons in our code?

Activity

  1. added
    website
    on Oct 18, 2023
  2. moved this to Prioritized in Planningon Oct 18, 2023
  3. theosanderson commented on Oct 18, 2023

    @theosanderson
    Member

    I think react-icons would be fine for SSR.

  4. theosanderson commented on Oct 18, 2023

    @theosanderson
    Member

    I think we should try to use SSR where possible - I don't love the CLS as the submit form loads, which I think would be avoided with SSR (but may not be possible in that case, not sure).

  5. moved this from Prioritized to In Progress in Planningon Oct 19, 2023
  6. JonasKellerer commented on Oct 19, 2023

    @JonasKellerer
    Contributor

    react-icons can not be used out of the box since they are CommonJS modules, which is not compatible with astro. However, there is a "workaround" for that, to change the astro.config.mjs:
    vite: { ssr: { noExternal: ["react-icons"], }, },
    It works on my local branch.

    Currently also react-icons has an open ticket and PR to fix that. So I think we could use them. But we could discuss this tomorrow in the standup.

  7. JonasKellerer commented on Oct 20, 2023

    @JonasKellerer
    Contributor

    As discussed in the standup:
    For now, we put freely available SVGs of the icons directly into our project and do not use extra libraries. If in the future, we need more features for the icons (adaptation to dark/light mode) we will revisit this. At that point, maybe react-icons has fixed their problem.

  8. theosanderson commented on Oct 20, 2023

    @theosanderson
    Member

    (sorry for sending us down a wrong path, thanks for investigating!)

  9. JonasKellerer commented on Oct 20, 2023

    @JonasKellerer
    Contributor

    Closed and derived ticket #399

  10. moved this from In Progress to Done in Planningon Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

website

Type

No type

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions