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

feat(Icon): Process Teams icons for use in Stardust #478

Merged
merged 22 commits into from
Nov 28, 2018

Conversation

codepretty
Copy link
Collaborator

@codepretty codepretty commented Nov 15, 2018

Converted the majoirty of svg icons we have in Teams today to be consumed in Stardust. I created a separate folder for these icons ProcessedIcons. As new icons are needed in Stardust, we can move them from ProcessedIcons to icons. This way we will only add the icons we need to the Teams theme.

In order to find the icon you want to use, I created a new page for viewing all the processed icons.
image

There are 2 scripts I used for converting Icons:

  1. stardust-icons.sh - this runs through a directory of Angular Teams SVGs and converts to .tsx files ready to be consumed by Stardust.
  2. create-index.sh - creates a new index.ts file for the icons based on the files in its directory.

Question:

  1. In the processed icon viewer, teams theme icons are included in that view. How would I only show the processed icons? Thanks @mnajdova! I fixed this using your suggestion below.

@codecov
Copy link

codecov bot commented Nov 15, 2018

Codecov Report

Merging #478 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #478   +/-   ##
=======================================
  Coverage   87.53%   87.53%           
=======================================
  Files          46       46           
  Lines        1532     1532           
  Branches      192      192           
=======================================
  Hits         1341     1341           
  Misses        186      186           
  Partials        5        5

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 837c7d1...da13b01. Read the comment docs.

@levithomason levithomason added this to codepretty in Core Team Nov 16, 2018
@codepretty codepretty changed the title [WIP] Convert Teams SVGs for use in Stardust feat(Icon): Process Teams icons for use in Stardust Nov 16, 2018
@codepretty codepretty added question Further information is requested, concerns that require additional thought are raised 🚀 ready for review and removed 🚧 WIP labels Nov 16, 2018
@mnajdova
Copy link
Contributor

@codepretty regarding your question. As in the prototypes we are merging the providers, you will always end up with all icons there (stardust + processed). My suggestion would be, when you are exporting the processed, add some prefix in the icons' names (processed or something like that), and then we you are looping over all icons, you can display just the processed ones. Let me know if this makes sense to you, or if you need help with implementing it.

@mnajdova mnajdova added the needs author feedback Author's opinion is asked label Nov 19, 2018
@codepretty codepretty removed needs author feedback Author's opinion is asked question Further information is requested, concerns that require additional thought are raised labels Nov 20, 2018
ExportTest=$(echo "$exportTemplate" | sed "s/ICONNAME/$Name/")

# CREATE IMPORT
sed -i "/IMPORT/a $ImportTest" $FileName
Copy link
Contributor

Choose a reason for hiding this comment

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

note that with the following prepend processing semantics the order of icons will be reversed alphabetical. So, would suggest either

@kuzhelov kuzhelov added needs author feedback Author's opinion is asked and removed 🚀 ready for review labels Nov 28, 2018
@codepretty codepretty added 🚀 ready for review and removed needs author feedback Author's opinion is asked labels Nov 28, 2018
@@ -6,6 +6,8 @@ const cellStyles = {
margin: '10px 0',
}

const processedIconsNamePrefix = 'processedIcons_'
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

@kuzhelov kuzhelov left a comment

Choose a reason for hiding this comment

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

awesome work 👍 💯

@kuzhelov kuzhelov merged commit 878b456 into master Nov 28, 2018
@kuzhelov kuzhelov deleted the feat/processed-teams-icons branch November 28, 2018 14:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Core Team
  
codepretty
Development

Successfully merging this pull request may close these issues.

None yet

6 participants