NOTE: These docs need to be updated
Simple steps to adding new icons to the Compass Icons font
- Go to https://pictogrammers.com/library/mdi/ and search for the icon you want to add (stick to outline icon styles as per our iconography guide)
- Download the icon as ".SVG Optimized"
- Open the SVG file in a text editor and copy the whole
<path />
tag - Using the SVG code template below, replace
<path ADD PATH HERE />
with the path you've copied in the previous step - Save the file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24">
<path ADD PATH HERE />
</svg>
- Locate the hexadecimal character code of the icon you just downloaded from https://pictogrammers.com/library/mdi/
- Follow the design guide outlined under Foundations / Iconography
- Once the icon is ready illustrator, be sure the shape is a single compound path, no extra layers or groups
- Choose to "Save As" an "SVG", ensuring to set the "Decimal Places" field is set to a value of "3" (This ensures your shapes are saved out with an accurate level of detail)
- Click the "SVG Code..." button
- Copy the entire tag
- Using the SVG code template below, replace
<path ADD PATH HERE />
with the path you've copied in the previous step
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24">
<path ADD PATH HERE />
</svg>
- Save the file as an .svg file
- Try to match the naming conventions used in the material design icon open source library
- if the icon is the same concept then consider it a replacement and reuse the name (minus the mdi prefix)
- if its something new, do your best to try and match for example "someconcept-outline.svg" as it would likely follow the outline style
- In the same way as the naming, try to reuse the hexadecimal codes in the material design icon library if its a replacement icon
- For anything new we have manually started using the "E800" block of hexadecimal numbers
- You'll have to open the demo.html from the repository root and click on the "show codes" checkbox to determine which is the next available in the sequence
- As you can see in the example above "E814" is the last icon in that "E800" block, so your icons character code should be "E815"
- Follow the design guide outlined under Foundations / Iconography (As of writing this Jumbo Icon design guides do not exist but will be included in future iterations - in the interim please consult with the UX Design Team)
- Prefix your file name with "jumbo-" such as "jumbo-attachment-code"
- Similar to the custom icons, we have designated the "E900" block of hexadecimal character codes for the jumbo icons.
- If you open up the demo.html from the repository root and click on "show codes" you'll be able to look through the "E900" block to determine the next available code in the sequence.
- As you can see in the example above "E90B" is the last icon in that "E900" block, so your icons character code should be "E90C"
- Append the identified hexadecimal character code to the filename after an underscore (_) character e.g. "account-outline_F0013.svg".
- In your browser navigate to the 'svgs' subfolder of the compass-icons repo
- https://github.com/mattermost/compass-icons/tree/master/svgs
- Click Add file > Upload files
- Choose or drag your SVG file to add it to the repository
- Fill out the commit description specifying what icon you are adding to the repository and why
- When everything looks accurate, click on the green "Commit changes" button
- Add any of designers the UX Team at Mattermost as a reviewer (e.g. @andrewbrown00, @mathewbirtch, @abhijit-singh, @anneliseklein, @michaelgamble)
- When all the information looks accurate, click the green "Create pull request" button.
- At this point you are waiting for the approval of the pull request
- When the commit is approved by a member of the design team the font package will automatically be created and is ready to download for use (you will get a github notificaiton when approved)
- Navigate to the root of the compass-icon repository
- https://github.com/mattermost/compass-icons/
- Click on the "Actions" tab
- Click on the latest "workflow run" that should match your commit title from the previous step.
- Under the "Artifacts" section, you will see the "CompassIconFont" package, click it to download locally.
- In your local download folder, double click the file "CompassIconFont.zip" to extract the files
- Cut, paste, and overwrite the contents of the archive into the google drive folder.
- Once the repository is updated, make a post in the Mattermost "Compass Design System" channel mentioning the "@uxteam" asking for the font to be updated in Figma