-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Helper function show_icons() to get valid icon()s #2399
Comments
@MichaelChirico this is a great point and I agree with you that the documentation could be improved. I think the link we should consider including in the documentation is this one: https://fontawesome.com/v5.3.1/icons?d=gallery&m=free As far as I can tell, that's the best way to see all the icons in 5.3.1 (available up to that version, not just added/updated in 5.3.1) but I might be interpreting it wrong. Re: "the v4 naming convention", I think we can probably remove that note from the docs. It's not really relevant to the user, since the naming convention from the user's perspective has not changed. As far as I know we don't have plans to adopt the new v5 prefixes as part of our API. I like the idea of a So, I think we'd definitely consider a PR with link fixes and that removed the note about v4 prefixes, if you are so inclined. If you have the time/interest in figuring out the best way to obtain icon data that could power a Thanks again for raising these issues, and in advance for any further contributions you have time for 👍 |
agree 100% about not using my hackish function officially, heavens knowns what kind of code sclerosis that could engender down the line -- but I couldn't figure out any better automated way to get it. nice find on the direct link to v5.3.1 icons, I swear I tried that URL and was rebuffed. will ponder a bit on implementation and follow up if I land on anything production-worthy. already the direct link to the list would be a big improvement. |
@alandipert so, there's this file: https://github.com/FortAwesome/Font-Awesome/blob/master/metadata/icons.yml We could work around the following manual-ish implementation:
Once here, we can use the following R script:
Then we can copy/paste that into our function:
Not completely automated but it's pretty straightforward. I'm not 100% sure (1) it captures all the icons and (2) it's possible to distinguish free & pro icons |
@MichaelChirico thank you for digging into this, it's really helpful to know that there is a canonical source of data. I discussed the situation with the team this morning, and we concluded that ultimately it's best to direct people to FontAwesome to select icons instead of building out our own infrastructure for helping people select them. First, we want to help FontAwesome by directing people to their site, which (once you have the right link!) is great. Second, we want to avoid introducing additional (inherently brittle, even when dealing with yaml) tooling in order to stay in sync with them. While we decline the idea of adding If you're interested in making a PR for that, one would be most welcome. You'll just need to make sure you've submitted a contributor agreement. Otherwise, it's something we'll get to. Thanks again for your exploratory efforts, and sorry we have to turn down your idea. |
@alandipert thanks for the heartfelt message, you're too kind. The reasoning makes sense, I don't take it personally. Fully agree; 85% of the value-add here is in fact from providing the direct link. |
So I was on my way to filing the documentation PR when I found this file: https://github.com/rstudio/shiny/blob/master/R/font-awesome.R Not sure what to make of it. Looks like it was added by @wch and is close to what my suggestion above would have led to... The place it's used in the code is here, but I don't quite understand what that section of code is doing:
At a glance it looks like But if that's being maintained, the marginal burden of maintaining a full set seems smaller? |
Request update after Consult team. |
the above link is broken now! |
If I follow the changelog file:
PS: I am a simple developer. |
Font awesome specific logic has been moved to https://github.com/rstudio/fontawesome. Please open issue(s) for Font Awesome there. PS. As commented in #2399 (comment), I don't think we'll implement a |
Related: #2263
Currently, the documentation simply refers to the FontAwesome site:
and
Unfortunately, the website only lists icons in the current version (5.8.1 as of this writing) and there doesn't appear to be any easy way to find out which icons were available for a specific version (e.g.
shiny
's current supported version of 5.3.1).That means the process of looking up icons to use is currently quite onerous -- either guess & check by running your app, or look on the website and check the version nested in a given icon's page (e.g. I learned
pepper-hot
is apparently only available since 5.7.0 here)It would be ideal if FontAwesome would offer an easier UX for this. But
shiny
could include a helper-function likeshow_icons
; a rinky-dink version I cooked up is:I'm sure it doesn't capture everything correctly but I think it's close.
I don't know what the glyphicon version would look like or if it's necessary.
PS this phrase is quite confusing for a new user (me) who has no idea about the whole version shift situation, and is given no further context (e.g. in Details)
PPS the glyphicon link in the documentation isn't correct (redirects to the top of the page and the HTML tag is apparently missing):
http://getbootstrap.com/components/#glyphicons
The text was updated successfully, but these errors were encountered: