-
-
Notifications
You must be signed in to change notification settings - Fork 974
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
Use the fontawesome
package for the HTML dependency on Font Awesome
#2451
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
55f4506
Add `fontawesome` pkg to Imports
rich-iannone 9d3d494
Use HTML dependency fn from fontawesome pkg
rich-iannone 1a4fe45
Update NEWS.md
rich-iannone 39dabf3
Delete `inst` dir with FA font files
rich-iannone 0bd9219
Update NEWS.md
yihui File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can probably delete the directory
inst/rmd/h/fontawesome
, too, but it depends on whether we want toImport
orSuggest
fontawesome. If we want to make fontawesome a soft dependency, we can keep our (outdated) version of fontawesome. I don't have a strong opinion on this. The scope of the problems that we are trying to resolve seems to be narrow in my eyes (i.e., the icons are not actually widely used in this package), so I'm not sure if it's worth a new hard dependency.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is why at first as was thinking about deprecated to remove this function in the long term as user should use fontawesome 📦 directly and not through rmarkdown.
This would mean that:
Is that right ?
That could be a in-between solution to not Import the package indeed. In that case, I would probably add a message or a warning (probably using
xfun::do_once()
) to state that an outdated fontawesome would be used and the fontawesome would be used. But one could argue that this is like doing a soft deprecation probably 😅We could check if an icon is available or not in our version, but probably too much complicated to do and maintain for the benefit.
It is just that silently doing the fallback will not prevent user to not understand why an icon is not showing, and also not teach people about the fontawesome package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought a bit more about this and came away with the conclusion that having to install
fontawesome
separately might be confusing to a lot of users and it could cause problems when publishing across different environments. Usually for me when there's an 'optional' package there's always a clear error and message to install that optional package (for extra functionality) when using a specific function or argument. But in the case of a soft dependency it could happen that users would have icons appearing or not, or, older versions of icons being shown (not to mention the difficulty of explaining the different versions of the dependency in the documentation).I agree that an extra dependency is not to be taken lightly but especially given that other packages like
flexdashboard
use the dependency function fromrmarkdown
directly (and they are more likely to use icons) this makes the case even stronger forfontawesome
to be included inImports
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
Given all the potential trouble, we should probably just make fontawesome a hard dependency.