-
Notifications
You must be signed in to change notification settings - Fork 214
Replace Material Icons with Kolibri Design System Icon #4913
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
Replace Material Icons with Kolibri Design System Icon #4913
Conversation
@@ -26,19 +26,15 @@ | |||
</div> | |||
<svg |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No update needed yet, just to understand the need to keep svg
- if we removed svg
and kept only KIcon
, would there be a difference in user experience and what it would look like?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Removing the
<svg>
makes the icon appear like in the screenshot, where it loses proper responsiveness and alignment. - Burying the icon within an
<svg>
ensures better adaptability since font-size scaling is harder to manage consistently. - Using
<svg>
provides better control over size, alignment, and responsiveness across different screen sizes and layouts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @SukhvirKooner, that's helpful. The proper alignment should be achievable no matter of the presence of svg
. However KIcon
doesn't have auto-scaling feature as of now so it's fine to keep it withing svg
to not have regressions.
We may want to consider having these behaviors supported by KIcon
itself at some point in the future.
Thanks @SukhvirKooner, and as always, I appreciate that you manually tested thoroughly and provided us with such a helpful pull request description. For now just leaving a few clarification questions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking good in manual testing as well.
If you're able to make two small updates, that would be great.
First we can delete the import of the material css: https://github.com/learningequality/studio/blob/unstable/contentcuration/contentcuration/frontend/shared/styles/main.scss#L1
And then remove the package entirely by doing yarn remove material-icons
and then committing the changes to the package.json and yarn.lock file.
Hi @rtibbles, ![]() ![]() |
Ah - glad you were able to spot this before we pushed on! Thanks for being diligent about this. If you can spot any other ways these icons are being used, that would be very helpful! |
Hi @rtibbles , |
Thanks @SukhvirKooner. Take the time you need. I hope exams went well. |
Thanks @SukhvirKooner - very happy to hear from you, I look forward to supporting you to get this wrapped up! |
Hi @rtibbles ,
In summary, even though the templates only pass simple text (the icon names), the mapping and default configuration cause these to be rendered as Material Icons. I will continue work on this. If you have any suggestions on how to proceed with switching to use KIcons instead of Material Icons, please let me know. |
@SukhvirKooner I don't think that For context, we started that migration in #4502 and then I attempted to finish it in #4633 but the latter revealed many other dependencies that will need to be taken care of - it's very big scope. I plan to separate and spec this work to smaller chunks as I'm planning Studio to KDS refactor - before that I am pretty sure we can't do this. There are some performance concerns around tooltips, and other things to take care of first before a new attempt is possible. |
Hi @MisRob , |
Ah, I hadn't anticipated this intersection. I think with this information @SukhvirKooner we can instead ignore my previous suggestion to completely remove the material icons dependency. As @MisRob plans out the rest of the work you will be welcome to pick up other issues. Let's merge this as is rather than get more into the weeds! |
Sounds good, thanks for the clarification! I'll leave it with you to merge. |
Sounds good to me. I think the diff makes sense, but will let @rtibbles to click the button since he reviewed. Thanks both! |
@@ -553,10 +553,6 @@ | |||
|
|||
.printing /deep/ * { | |||
font-family: 'Noto Sans', helvetica !important; | |||
|
|||
&.material-icons { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, because of the continued use of VIconWrapper in Thumbnail.vue, this is still needed. The alternative would be much closer to the full swap out of Vicon for KIcon we agreed to avoid for now, so let's just revert this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No Problem! I just added it back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code changes look good, no issues in manual testing. Thank you @SukhvirKooner!
Summary
Fixes: #4907
This PR removes all instances of
material-icons
from the codebase and replaces them with corresponding icons from the Kolibri Design System where applicable. In cases where no direct replacement was available, the icons were removed (e.g., inbase.html
).Changes Made
material-icons
with equivalent Kolibri Design System icons.Before
After
Before
After
Before
After
base.html
Testing
Verified that all updated icons render correctly in the UI.
Ensured no broken references remain in the code.
Manually tested affected pages to confirm visual correctness.
Please feel free to share any suggestions or further changes you'd like me to make. I'm happy to update the PR as needed. Looking forward to your feedback!