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(icons): add deprecationReason and alias deprecation feature #1960

Merged
merged 21 commits into from
May 22, 2024

Conversation

karsa-mistmere
Copy link
Member

closes #1957

What is the purpose of this pull request?

  • New Feature

Description

When deprecating icons (looking at you, brand icons) or aliases, it is important to clearly mark the reason of deprecation as well as any steps the users should take, this PR adds the possibility to add the reason for deprecation to icons as well as the possibility to mark aliases as deprecated as per #1957

Before Submitting

@github-actions github-actions bot added the 🫧 metadata Improved metadata label Mar 8, 2024
icon.schema.json Outdated Show resolved Hide resolved
icon.schema.json Outdated Show resolved Hide resolved
@github-actions github-actions bot added the ⚛️ react package Lucide React Package label Mar 8, 2024
@jguddas
Copy link
Member

jguddas commented Mar 8, 2024

My vote is to deprecationReason an enum instead of free text, so we can ensure that there are no typos and control what depracation types there are.

@karsa-mistmere
Copy link
Member Author

My vote is to deprecationReason an enum instead of free text, so we can ensure that there are no typos and control what depracation types there are.

Any ideas as to what these options should be?

@jguddas
Copy link
Member

jguddas commented Mar 9, 2024

My vote is to deprecationReason an enum instead of free text, so we can ensure that there are no typos and control what depracation types there are.

Any ideas as to what these options should be?

// depracation-reasons.en.json
{
  "alias.typo": "Renamed because of typo, use {name} instead.",
  "icon.brand": "Brand icons have been deprecated and are due to be removed, we recommend using simpleicons.org instead, refer to https://github.com/lucide-icons/lucide/issues/670"
}

https://formatjs.io/docs/intl-messageformat

@karsa-mistmere
Copy link
Member Author

I think i18n is a bit of an overkill, since all of our packages are in English, but I've implemented a rudimentary template function and converted the deprecation reason to an enumeration.

(I meant options apart from these two, so that we are somewhat futureproof, but we can think about that later)

icon.schema.json Outdated Show resolved Hide resolved
icon.schema.json Outdated Show resolved Hide resolved
Copy link

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Apr 19, 2024
Copy link
Member

@ericfennis ericfennis left a comment

Choose a reason for hiding this comment

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

Nice lovely work!

Copy link
Member

@jguddas jguddas left a comment

Choose a reason for hiding this comment

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

What about my unanswered pr comments?

@github-actions github-actions bot removed the Stale label Apr 20, 2024
@karsa-mistmere
Copy link
Member Author

What about my unanswered pr comments?

They've now been addressed.

@github-actions github-actions bot added the 🌍 site Has to do something with the Lucide website label May 22, 2024
@karsa-mistmere karsa-mistmere merged commit e2b46ea into main May 22, 2024
21 checks passed
@karsa-mistmere karsa-mistmere deleted the feat/icon-alias-deprecation-reasons branch May 22, 2024 11:08
@karsa-mistmere karsa-mistmere mentioned this pull request May 23, 2024
30 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🫧 metadata Improved metadata ⚛️ react package Lucide React Package 🌍 site Has to do something with the Lucide website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

idea: @deprecated for certain aliases
3 participants