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

feat(Icon): deprecate weight property #1183

Merged
merged 6 commits into from
Aug 1, 2024
Merged

Conversation

dgonzalezr
Copy link
Collaborator

@dgonzalezr dgonzalezr commented Aug 1, 2024

Description

This PR deprecates the weight property on the Icon component. This property was added when we had the SVG assets split in a different folder by weight: thin, light, regular, fill, bold, and duotone, but the SVG assets have been merged into a single folder and the weight can now be set within the icon name itself, if before we could have:

<bq-icon name="bell" size="24" weight="bold"></bq-icon>

now we can archive the same by doing the following:

<bq-icon name="bell-bold" size="24"></bq-icon>

Also, we have improved the setBasePath() and now users can specify even remote URLs in order to use a different icon library

image

Related Issue

N/A

Documentation

Screenshots (if applicable)

Checklist

  • I have read the CONTRIBUTING document.
  • I have read the CODE OF CONDUCT document.
  • I have reviewed my own code.
  • I have tested the changes locally.
  • I have updated the documentation (if applicable).
  • I have added unit tests and e2e tests (if applicable).
  • I have requested reviews from relevant team members.

Additional Notes

We have also added VSCode Anchors to highlight what needs to be removed in the future.

CleanShot 2024-08-01 at 20 19 07@2x

@dgonzalezr dgonzalezr added the feature 🛠 New feature or request label Aug 1, 2024
This means that, if the user did not used the setAssetPath() method, is using the internal SVG icons and the `/svg/` subpath will be added internally
We no longer need this property since the icon weight can be specify via name, e.g. `bell-fill`
This is not needed since the fill is set via attribute in the SVG tag
@dgonzalezr dgonzalezr force-pushed the fix/icon-assets-path branch from 1bb6310 to 804fbcc Compare August 1, 2024 16:46
Copy link

sonarqubecloud bot commented Aug 1, 2024

@dgonzalezr dgonzalezr merged commit 1f23b19 into main Aug 1, 2024
6 checks passed
@dgonzalezr dgonzalezr deleted the fix/icon-assets-path branch August 1, 2024 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 🛠 New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants