Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

feat(docs): remove Font Awesome icons from examples #1764

Merged
merged 19 commits into from
Aug 13, 2019

Conversation

lucivpav
Copy link
Contributor

@lucivpav lucivpav commented Aug 6, 2019

Overview
There are examples in docs that use Font Awesome icons. If such an example snippet is run on e.g. Codesandbox, the icons are not rendered at all, due to missing Font Awesome. The Font Awesome should not be used in docs at all. Relevant issue #1762

Changes

  1. Font Awesome theme is no longer merged with Teams theme in app.tsx of docs
  2. All icon usages in code examples are from Teams theme
  3. GitHub icon has been added to Teams theme
  4. arrow-left, arrow-right were added to Teams theme (they are taken from ProcessedIcons folder)

TODO
We need the following icons, that are currently missing from the Teams theme (they are also not in processedIcons):

  • Copy, Copy outline
  • Spinner
  • Align right
  • Minus
  • Clock
  • Thumbs down (aka Dislike)
  • Folder
  • Folder open
  • User

@codecov
Copy link

codecov bot commented Aug 6, 2019

Codecov Report

Merging #1764 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1764      +/-   ##
==========================================
+ Coverage   69.76%   69.77%   +<.01%     
==========================================
  Files         868      870       +2     
  Lines        7484     7486       +2     
  Branches     2176     2200      +24     
==========================================
+ Hits         5221     5223       +2     
  Misses       2255     2255              
  Partials        8        8
Impacted Files Coverage Δ
...emes/teams/components/Icon/svg/icons/arrowLeft.tsx 100% <100%> (ø)
...mes/teams/components/Icon/svg/icons/arrowRight.tsx 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f3485b5...92edeb2. Read the comment docs.

@vercel vercel bot temporarily deployed to staging August 6, 2019 16:07 Inactive
@levithomason
Copy link
Member

Quick clarification, the Teams theme shouldn't use FontAwesome icons. However, other themes may use FontAwesome icons. It is also OK for the doc site itself to use FontAwesome icons.

I think only the actual examples files in docs/src/examples should avoid FontAwesome icons, and only for now while we work out icon name inconsistency issues. However, this is also a temporary solution since switching the theme to anything other than Teams will also break once all the icons are switched to Teams.

Suggestions and reasoning:

  • Move forward with removing FontAwesome icon names from examples only
    Just a temporary solution since the main theme being worked on is Teams right now. This will have to updated again in the near future as soon as we start adding other themes. Theme switching from Teams to something else should still work.

  • Leave FontAwesome support in Stardust
    Other themes likely will use it since it is the most popular and has a free license. Most likely, will provide a base theme which also uses FontAwesome.

  • Leave the doc site on FontAwesome icons
    Stardust is not a Microsoft product but a general open source library. We don't want to associate our docs with Microsoft's product glyphs.

Copy link
Member

@levithomason levithomason left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above

@lucivpav lucivpav changed the title feat(docs): remove Font Awesome icons feat(docs): remove Font Awesome icons from examples Aug 7, 2019
@vercel vercel bot temporarily deployed to staging August 7, 2019 09:23 Inactive
@vercel vercel bot temporarily deployed to staging August 7, 2019 09:43 Inactive
@lucivpav
Copy link
Contributor Author

lucivpav commented Aug 8, 2019

@levithomason I have updated this PR. Only the example code snippets are using Teams icons instead of Font Awesome icons. The usages of missing icons from Teams theme were replaced by other meaningful icons from Teams, so that we don't need to ask for new icons from the design team.

@@ -153,6 +155,8 @@ export default {
add,
'arrow-up': arrowUp,
'arrow-down': arrowDown,
'arrow-left': arrowLeft,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let only design add icons. Use arrow-up and rotate it as needed.

Copy link
Contributor Author

@lucivpav lucivpav Aug 13, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The two icons arrow-left, arrow-right are simply copied from ProcessedIcons folder. I did not design them.

@@ -152,8 +152,8 @@ export default () => (
<CodeSnippet
value={`
<>
<Button icon='envelope' />
<Button icon='envelope' aria-label='Send message' />
<Button icon='email' />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As @levithomason mentioned - this is general doc, I would stick with FA here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure? If user copies these code examples into the codesandbox template, the icons won't render.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure, but let's go with what you have now.

Copy link
Member

@miroslavstastny miroslavstastny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure you accept screen changes before merging.

@vercel
Copy link

vercel bot commented Aug 13, 2019

This pull request is automatically deployed with Now.
To access deployments, click Details below or on the icon next to each push.

Latest deployment for this branch: https://stardust-react-git-feat-no-font-awesome-in-docs.stardust-ui.now.sh

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants