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
Export alias/tags for each icons similarly to how the search work in the documentation #31
Comments
This is an interesting idea, I haven't seen static component fields used for other metadata before... These tags are really more of an implementation detail of our website and plugin search, and are handwritten and not a true substitute for something like ElasticSearch or some other intelligent search mechanism, but the cost seems pretty low to add a few extra bytes to each component. An alternative approach could be to publish a separate, framework-agnostic package with the tag and category data for every icon. This might be a bit more scalable. I'll look into it. |
It would also be great to have those tags as a description for each icon in Figma, makes the search much better. As right now to get the "fine" icon I often end up searching "document" ... |
@Simon-Renault we have opted to expose a separate package, @phosphor-icons/core which will include both catalog data (tags, category, name, version released, etc.) and the raw SVG files, to be both framework/platform agnostic, and to keep bundle sizes down for the vast majority of users who do not need this. You can use it now via NPM, though it is lacking some documentation at the moment. The catalog is pegged to 1.4 release (current version). As for adding tags to documentation description in Figma library, that's definitely something we can do! |
@rektdeckard Amazing thank you so much for this! Can't wait for the Figma lib to use those as well :) |
BTW, tags are now part of component descriptions in the Figma library. |
I assume that since the search in the Phosphor icon documentation match or more than the name of the icon itself, the information to buidd those tags should already exist somewhere.
Similarly to how we do :
Airplane.displayName = "Airplane";
we could do :
Airplane.tags = ["Airplane","Plane","Fight", ... ];
Use case :
Allowing users in an app to pick an icon for a given primitive. Enabling a search by tag in the front end would be great.
Same in the Figma library, adding those tags to the icon description would make it so much easier to search
The text was updated successfully, but these errors were encountered: