trac-github icon indicating copy to clipboard operation
trac-github copied to clipboard

Use Font Awesome to provide a cute icon

Open embray opened this issue 7 years ago • 7 comments

Another little patch from my instance of the plugin. Adds the GitHub icon next to the "GitHub Login" link to better distinguish it, and make clearer that it will send users to GH.

embray avatar Feb 27 '18 15:02 embray

You can see an example of how this looks at https://trac.sagemath.org/

embray avatar Feb 27 '18 15:02 embray

Something to consider is whether we want to include the Font Awesome script in the plugin (see ITemplateProvider) so that it can be served directly. If we choose to not do that, it could still be served directly by adding the script to the Environment or shared htdocs directory and using a path starting with /chrome/site/.

rjollos avatar Feb 27 '18 22:02 rjollos

I'd rather not add several hundred kilobytes of Font Awesome to every page for loading a single icon.

Can we load only the icon we need, one way or another?

aaugustin avatar Feb 28 '18 07:02 aaugustin

@rjollos @aaugustin I've thought about both these things. I definitely agree FA is overkill, it was just the quickest and easiest way to do this. What I do like about it is that it's an actual font glyph and scales with the text nicely, but I've heard of ways to extract just the bits you need out of FA. I could look into that.

For my purposes it was fine, but I agree with these points.

embray avatar Feb 28 '18 08:02 embray

Good point by @aaugustin. Assuming we can use a smaller script, I think it would be reasonable to bundle the script in the plugin and remove the option. If someone really dislikes the icon they can customize their interface to remove it.

rjollos avatar Mar 03 '18 01:03 rjollos

http://fontello.com/ make is super easy to build a custom subset of Font Awesome — in that case, a subset with only the icon you need.

aaugustin avatar Mar 03 '18 10:03 aaugustin

It looks like there are merge conflicts; I guess a rebase is needed?

cooljeanius avatar Sep 16 '24 21:09 cooljeanius