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

The SVG demo is only showing a small subset of our available icons #268

Open
huayunh opened this issue Feb 3, 2023 · 2 comments
Open

The SVG demo is only showing a small subset of our available icons #268

huayunh opened this issue Feb 3, 2023 · 2 comments
Labels
brightlayer-ui Used to identify Brightlayer UI platform issues for easy filtering enhancement Request for improvement or new feature

Comments

@huayunh
Copy link
Contributor

huayunh commented Feb 3, 2023

Describe the bug / expected behavior

The SVG icon demo currently only takes a small subset of icons, unlike our other two demos

What are the steps to reproduce?

  1. clone repo
  2. Run yarn && yarn start
  3. Navigate to the "SVG" navigation item
  4. See that there's only small subset of all the icons we have to offer

Suggested fix

Use an actual meta data instead of this placeholder object:

@huayunh huayunh added bug Something not working as expected needs-review Issues that we would like to revisit/review brightlayer-ui Used to identify Brightlayer UI platform issues for easy filtering labels Feb 3, 2023
@joebochill
Copy link
Collaborator

joebochill commented Feb 16, 2023

This was done intentionally (picked a representative subset), since you have to import the SVG files individually to use them (didn't want 1) anybody to spend that much time writing the 20+ import statements or 2) have that many imports clogging up the src code). It might be possible to do dynamic imports (like a require() in a loop), but it's also possible that might crash javascript.

@joebochill joebochill added enhancement Request for improvement or new feature and removed bug Something not working as expected needs-review Issues that we would like to revisit/review labels Feb 16, 2023
@joebochill
Copy link
Collaborator

Lets just spend a few minutes to see if we can get dynamic imports to work, otherwise we can close this issue since the MUI demo should indicate to us if there are any problems with the svgs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
brightlayer-ui Used to identify Brightlayer UI platform issues for easy filtering enhancement Request for improvement or new feature
Development

No branches or pull requests

2 participants