-
Notifications
You must be signed in to change notification settings - Fork 23
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
Handling deprecation in Kaizen #701
Comments
Here's my 2c: How do we deprecate props?Deprecating a property of the type/interfaceThe interface for tabs previously contained the property
Deprecating some options of a propertyNot too sure about this one. We could potentially still use the
How do we deprecate components?We can also use the
Depending on how yell-y we want to be, also pop a How do we deprecate Sass mixins and variables?mixinsUse warn or Sass Deprecate
VariablesI haven't tried this, but Sass Deprecate might work for variables? How do we show that a component is deprecated in Storybook?Add (deprecated) to the story title so that it is easily searchable. Here's an example. At what point do we remove the deprecated component/prop/mixin?¯_(ツ)_/¯ |
These are great 👍 I looked for whether there are plans to add JSDoc hints to TS for deprecated union values but can't see anything like that yet :( One question I have is: at what point do we remove a deprecated component from Storybook? It's theoretically possible that a particular repo might be a straggler and still be using Deprecated Component X in 5 years' time – but if we were to keep its story in Storybook for 5 years, it'd be a mess of deprecated components. Maybe there's an argument to be made for removing the story, say, 3 months after the component's been marked as deprecated. That might lead to discoveries like "why isn't that component I want to use in Storybook?" which is an opportunity to spread awareness. |
This could get messy really quickly. I'm happy to remove the stories a little sooner (say, within 2 weeks of it becoming deprecated) to build up a bigger barrier of using deprecated components. I wonder if this will frustrate engineers though. |
I think this is a good idea (as long as it doesn't generated hundreds of warnings per page). To me the most important thing is to know when a component is deprecated so they don't keep using it. I'd say that a common way people use Kaizen components is by copying existing examples of usages. If the existing examples use a deprecated component, they won't know, and it will continue to spread. People will often copy an example, and if it works, they are done - no need to look at storybook or read the Kaizen source code, so I think console warnings might be the only way they can find out. A good example is the legacy Text component. The |
I also think using I'm not sure where the text from If it doesn't, I think we would need to have something that applied regardless of which editor someone used. With some help from TypeScript and generics I think we could create a set of helpers that could be applied to components, props, or specific values of props. Decorators would probably be more pure for the purpose of annotating things but that's a class-only thing. |
Yeah, that's my understanding of Spitballing - we could also write an Eslint rule that checks for deprecated components, and spit out a warning. All the repos using frontend-ops would receive the rule from that, so it could be a straightforward way to manage them. |
Just a thought, maybe it's bikeshedding, we could also use the link/see tags in JSDocs to link to the alternative in a bit of a nicer way. |
Also an idea, maybe we can advise the use of this eslint plugin? |
I looked into it, but Sass Deprecate is just some helpers on top of scss's built in The main thing it does extra is conditionally show the warning depending on whether there has been a breaking/major release or not. I don't know if this is useful to us, because I don't think we treat breaking changes that same way they do (a major release wouldn't necessarily mean that all deprecated features have been removed). |
Going to leave this discussion open (and remove the tag) as it's quite large and don't want to split this content. @ActuallyACat thoughts on this? |
This issue hasn't seen activity in two months! Has it been fixed, decided not to be worked on or needs more information? If you want to keep it open, post a comment or remove the |
This issue was closed due to 2 months of inactivity. Feel free to reopen it if still relevant. |
Problem
The need to deprecate things is a side effect of a healthy design system. As we learn more about how our components are used we may want to make improvements, or move in another direction and remove the component from the system. This issue covers the latter case.
More specifically:
Extra discussion:
The text was updated successfully, but these errors were encountered: