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

Removed build step to add new icon classes (#10906) #10908

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

3coins
Copy link
Contributor

@3coins 3coins commented Aug 24, 2021

References

This PR fixes #10906

Code changes

  • Remove code that writes css class to deprecated.css file

User-facing changes

None

Backwards-incompatible changes

None

@jupyterlab-dev-mode
Copy link

Thanks for making a pull request to JupyterLab!

To try out this branch on binder, follow this link: Binder

@fcollonval
Copy link
Member

Thanks for making it a separate PR. This definitely needs to be discuss at a developer meeting as it will impact extensions.

@3coins
Copy link
Contributor Author

3coins commented Aug 25, 2021

Thanks for making it a separate PR. This definitely needs to be discuss at a developer meeting as it will impact extensions.

I believe this should not remove any classes already added to deprecated.css file, so any extensions using the legacy css classes for existing icons should not be impacted.

@fcollonval
Copy link
Member

I believe this should not remove any classes already added to deprecated.css file, so any extensions using the legacy css classes for existing icons should not be impacted.

I acknowledge that. But for homogeneity reasons, I would remove the deprecated.css file in the same time. Because removing this test may break icon consistency, and if a user hits that inconsistency, I would prefer to tell him You have to migrate to LabIcon than You should migrate to LabIcon but some icons are still available through icon classes. And version v4 is a good candidate to do that cleaning.

@telamonian
Copy link
Member

telamonian commented Aug 28, 2021

This is definitely a breaking change w.r.t. 3rd party extensions. The last time I checked (admittedly a year ago), more extensions were using our css icons than were using LabIcon. So the removal of said css icons can go in for v4.0, but if we're going to yet again break a bunch of extensions I'd prefer it to be for something more significant.

In any case, there's some argument to be made that, rather than remove them, we should simply un-deprecate the css icons. Since I originally added the deprecation mark I've come to see that there are things that css icons can do that LabIcon cannot. The issue is discussed in detail in #8237, which is about some possible ways to improve icon handling. In short, css icons have two advantages:

  • performance
  • late binding, in the sense that icon class and icon art can be assigned or changed independently at any time

At the moment, there are a few possible use cases for LabIcon will either have unacceptable performance or require ugly hacks (see everything under packages/ui-components/src/icon/widgets). As discussed in #8237, there are some alternative icon rendering techniques that could confer similar advantages on LabIcon. Ideally we'd tackle this first before deeply considering removing css icons

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

Successfully merging this pull request may close these issues.

Remove build step to add new icon class
6 participants