-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[Badge] Remove unused code #24334
[Badge] Remove unused code #24334
Conversation
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.
If we do understand it, we should do everything we can to explain it.
The source on HEAD for the Badge component is following the latest template for writing components with the styled
API. All the components are meant to follow the same template. I think that as long as the why is documented for one component following the template, it covers all the others. We have documented the why with the Button #24262 and #24253.
All style related functions (the styles, overrides resolver and the creation of the utility classes should use the |
If you are not able to explain what code does, you do not understand it.
I did not make this claim. I'm actually saying that we don't understand either one.
Where is this documented? We should create an API that either catches mistakes or makes them impossible. Not create an API that is only understood by its creator.
Where is this documented?
Where did you document it? That PR is too big to scan quickly and inssufficient as developer documentation. |
Also could you explain to me when we're allowed to use templates and when we need to create abstractions? So far it seems to me that this just depends on the person making the change not what we're actually doing. |
My first thought was that we can pass only @eps1lon we still haven't created a universal RFC documentation to follow, as we are still dog fooding the implementation. This week I plan to create the RFC and track all converted components to emotion. Would that RFC be a good place for documentation things like this, or did you have something else in mind? |
Can we close this one now that we have #24405 and the migration guide https://gist.github.com/mnajdova/b0562785b7cf1b9d9aeae382d578594b or should we extend the guide somehow? |
Reverts the parts of #24253 that affected the Badge. We cannot allow code in the codebase which we don't understand. If we do understand it, we should do everything we can to explain it. Code that is not understood or its purpose is kept a secret has no place in open source.