Skip to content
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

Points icons #204

Merged
merged 3 commits into from
Apr 5, 2021
Merged

Conversation

nucleogenesis
Copy link
Member

@nucleogenesis nucleogenesis commented Mar 23, 2021

Description

Adds the leaf icon and re-pre-compiles the icons and updates the rst definitions. This was required to fully remove the dependency on SVG Icon Inline Loader which included the huge Material Design icon package in its dependencies. KDS has it in the devDependencies and we specifically only bundle used icons.

The primary motivator for this was to ensure people don't run into timeout issues while running yarn install.

Issue addressed

Fixes Kolibri learningequality/kolibri#7890

Steps to test

Check the icons in the testing server blow. Note that I've included them in the colored icons set even though we don't actually give it the color that is used for the fill.

Reviewer guidance

  • Is the code clean and well-commented?
  • Are there tests for this change?
  • Are all UI components LTR and RTL compliant (if applicable)?
  • Add other things to check for here

Comments

@@ -78,6 +78,8 @@
.. |permission| replace:: :raw-html:`<span class="design-system-icon"><svg viewBox="0 0 24 24" role="presentation" focusable="false" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M12.65 10A5.99 5.99 0 007 6c-3.31 0-6 2.69-6 6s2.69 6 6 6a5.99 5.99 0 005.65-4H17v4h4v-4h2v-4H12.65zM7 14c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"/></svg></span>`
.. |person| replace:: :raw-html:`<span class="design-system-icon"><svg viewBox="0 0 24 24" role="presentation" focusable="false" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg></span>`
.. |plus| replace:: :raw-html:`<span class="design-system-icon"><svg viewBox="0 0 24 24" role="presentation" focusable="false" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></svg></span>`
.. |pointsActive| replace:: :raw-html:`<span class="design-system-icon design-system-icon-color-text"><svg role="presentation" focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="270.8 117.7 84.7 84.8"><path fill="#83759E" d="M292.3 178.4l-21.5 13 11.2 11.1 13.2-21.2z"/><path fill="#9FD29D" d="M334.5 138.9l20.5-20.5c-.9-.9-7.2-.9-15.9.2l-4.6 20.3z"/><path fill="#BADBC4" d="M332.7 119.5c2.2-.3 4.4-.6 6.3-.9l-2.8 12.5-3.5-11.6z"/><path fill="#7CB6A2" d="M316.3 157l6.5-6.5-8.7-26.8c-6.9 2-13.9 4.7-19.5 7.9l21.7 25.4z"/><path fill="#717799" d="M277.9 152.6c.5-2.2 1.4-4.4 2.4-6.3l27.1 19.5-1.9 2.2-27.6-15.4z"/><path fill="#74658E" d="M305.3 167.9l-17.6 17.6c-9.1-9.1-12.3-21.9-9.8-32.9l27.4 15.3z"/><path fill="#749BB5" d="M307.5 165.9l8.9-8.9-6.3-7.4-26-9.4c-1.6 1.9-2.8 4.1-3.7 6.1l27.1 19.6z"/><path fill="#8FD4DC" d="M295.2 144.3l-11.2-4.1c.6-.8 1.2-1.6 1.9-2.2.8-.8 1.7-1.7 2.8-2.5l6.5 8.8z"/><path fill="#6F93A2" d="M288.8 135.5c1.7-1.4 3.6-2.5 5.8-3.8l15.4 18-14.8-5.4-6.4-8.8z"/><path fill="#5CB28F" d="M322.8 150.6l1.9-1.9-6.8-26c-1.3.3-2.5.6-3.8 1.1l8.7 26.8z"/><path fill="#8CBF94" d="M317.9 122.7c5-1.4 10.1-2.4 14.8-3.2l3.5 11.6-1.7 7.8-9.9 9.9-6.7-26.1z"/><path fill="#70B798" d="M351.6 151.2c1.6-6.8 2.7-13.4 3.3-18.7l-18.1 4.1-9.6 9.6 10.4 6.6 14-1.6z"/><path fill="#78CABC" d="M351.6 151.2c-.6 2.8-1.4 5.8-2.4 8.8l-11.7-7.2 14.1-1.6z"/><path fill="#5D7783" d="M313.5 196.2c5.7 0 11.2-1.6 16.1-4.6L317.3 156l-6.8 6.6-6.6 14.5 9.6 19.1z"/><path fill="#736586" d="M313.5 196.2c-5.5 0-11.3-1.3-16.5-3.9l6.9-15.1 9.6 19z"/><path fill="#9794B7" d="M310.5 162.7l-22.8 22.8c2.8 2.8 6 5 9.3 6.8l13.5-29.6z"/><path fill="#457584" d="M334.1 164.9l9.5 10.2c-2.4 4.9-5 9.1-8.2 12.3-.9.9-1.9 1.7-2.8 2.5l1.5-25z"/><path fill="#527D8E" d="M332.6 189.8c-.9.8-1.9 1.4-3 2L317.3 156l4.4-4.4 12.4 13.2-1.5 25z"/><path fill="#619986" d="M343.6 175.1c2.2-4.6 4.1-9.8 5.7-15.1l-22-13.9-5.5 5.5 21.8 23.5"/><path fill="#80C1A8" d="M338.4 135l16.5-16.5c.6.6.8 4.7.3 10.9l-16.8 5.6z"/><path fill="#83CCC0" d="M336.8 136.6l18.1-4.1c.2-1.1.2-2.2.3-3.2l-16.9 5.7-1.5 1.6"/></svg></span>`
.. |pointsInctive| replace:: :raw-html:`<span class="design-system-icon design-system-icon-color-text"><svg role="presentation" focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="363.6 113 93.6 93.5"><path fill="#AAA" d="M455 115c-6.5-6.5-60.6 3.9-76.1 19.4-12.6 12.6-13.5 33.7-2.4 49.3l-12.9 9.6 13.2 13.2 9.9-12.8c16.1 11.7 36.5 10.1 49-2.5 15.9-16.1 26.2-69.3 19.3-76.2z"/></svg></span>`
Copy link
Member

Choose a reason for hiding this comment

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

Typo here, should be |pointsInactive|

Copy link
Member Author

Choose a reason for hiding this comment

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

That one is on line 82 no?

Copy link
Member

Choose a reason for hiding this comment

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

Yep, line 82!

Copy link
Member Author

Choose a reason for hiding this comment

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

I honestly didn't see the misspelling until the third time I looked at it... 😅

Copy link
Member

Choose a reason for hiding this comment

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

🧠 filling in the 🕳️ even when we might not want it to... 😛

@radinamatic
Copy link
Member

All icons display correctly, tested on FF, Chrome & Edge on Windows, and FF & Chrome on Ubuntu.

A part from the |pointsInctive| typo, the only thing I don't understand why is that the copy/duplicate icon still full in the netlify.app, but when I use the replacements in the docs, the icon is just outlined 😕

Icons - Kolibri Design System — Mozilla Firefox_047

LEDev21 (start)  Running  - Oracle VM VirtualBox_046

@nucleogenesis
Copy link
Member Author

@radinamatic is there another issue for the copy icons still open? I want to get this merged so learningequality/kolibri#7904 can be merged, but don't want to miss addressing that issue more thoroughly.

@radinamatic
Copy link
Member

@nucleogenesis I was hoping this PR would also address the icons listed in #141

@nucleogenesis
Copy link
Member Author

@radinamatic will merge this and address the copy icons in #141 as it is assigned to me this sprint

@nucleogenesis nucleogenesis merged commit 0621d5d into learningequality:v0.2.x Apr 5, 2021
@radinamatic
Copy link
Member

Gotcha, will wait for it then!

Do you have an idea why I get different aspect of the icon in the docs, compared to what is in the KDS app? 😕 (see above)

@nucleogenesis
Copy link
Member Author

@radinamatic I do not - but I'll be investigating that in #141 for sure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: library Shared code library product: Kolibri Relevant to a specific issue in Kolibri
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants