-
Notifications
You must be signed in to change notification settings - Fork 106
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
ebay-infotip: rename to ebay-infotip-button #1765
Comments
Consider prioritizing "eliminate/reduce unnecessary changes for the library users" vs "align with our new grouping" or "aesthetic consistency in interfaces matters". Changes in the interface are a particular delicate matter when a library is extensively used in hundreds of repos. During the last 4 years I noticed quite a few of unnecessary changes for the sake of aesthetic consistency. Components' names, parameters and behaviors are the API interface for who is using these components. |
Typically we provide auto migrators. So if this change will be done then we will also add a migrator to use this new component. This makes it so you simply have to do |
You obviously do not work on a typical team that is responsible of many repos. And it explains why these kind of changes happens so often with little thought about the consequences for who need to use the library. Consider just a simple application that is using 5 node modules that are used by multiple apps that depends on You will have to make first the changes in the 5 node modules repos, and for each of them: You need to create a new major version, update the docs to tell that the new version only work after that specific version of Now you have to update the main app or apps, PRs cycle, CI cycle, release cycles... And BTW, now you have 2 major versions of those 5 modules that may have to be kept updated. One working for And this is a simple example. If you add in the mix that some people forget to update one of the version, that there may be a secondary dependency on another variable (ex: Legacy Marko version and update marko version), the things get exponentially worse. I worked on teams where the dependent modules were up to 14 and I had to do that process for 4 applications. There are a few examples of just ONE breaking changes in the history of a library or a language out there. There is a LOT of pain associate with that and a lot of churn. Do not change interfaces unless it is REALLY necessary. |
So this is why its important to keep up to date with the latest versions on all projects. If all the applications are using the latest versions then there shouldn’t be an issue. If an upgrade happens and you need to do it then of course all apps will use the latest version and no need to backport and fixes to previous versions. |
If you do not own some of the modules the cost and the time necessary for the change become even bigger. You can argue that a few hundred thousands dollars for a big company is almost nothing. The question is, is it worth it? Anyway, the bottomline for me is the philosophy should be "introduce breaking changes when it is necessary to make the change. Avoid to make a change if it is not necessary." - Also make these kind of changes very rarely. If you do not believe me, there are quite a few articles about the cost of mutating the contract of an interface and strategies about how/when to do it or not. |
I think a great solution to your problem would to be make all your 20 modules into a monorepos. Once you have a monorepo all you need to do is to document and make sure that teams are aware of the new versions you publish and what versions they are compatible with. Or maybe you can have a peer dependency of the version you support and make sure people are reading those warning instead of overlooking them. For example, have your plugins have a peer depdency of the current ebayui. Once a new version comes up, bump that peer depdency and make sure your code works with the new version. That shouldn't take more than 15 mins if you have everything in a monorepo. Now for us, we find this necessary because it follows this new pattern we introduced last version. Is it necessary for teams? No. Is it necessary for our organization of code? Yes. Do teams have an easy path forward through migrations or simply doing cmd + shift + f? Yes. Well then it seems a no brainer. Lets try to sit down and discuss how we can get your plugins into a monorepo, I believe that will help greatly and then new breaking changes will no longer be an issue. Let's try to find solutions, not try to prevent us from doing work because it is inconvenient for people. |
@cc-ebay Renaming components or their attributes is not simply about aesthetics. It's about consistency. As library authors and maintainers, consistency is a big deal for us. We do get designers and developers giving us direct feedback about problems caused by inconsistencies. So while you may perceive it as purely aesthetic, we do not. Also I'm curious as to why you shared an article on Web APIs (https://nordicapis.com/api-change-strategy/)? We are building a library API, so the majority of that content is not relevant at all. Anyhow, I gave it a read, and here is my feedback on the few parts that were:
I agree! But it doesn't.
I agree! We have semantic versioning. It's great.
Yes, I couldn't have said it better myself. I hope your team is following this practice. Anyhow, at the end of the day, I would prefer to use this ticket to discuss whether we want to make this specific change or not. Is it helpful for the consistency of the system or not? |
About the mono repo strategy
Keeping peer-dependencies updated
People should pay attention to warnings and when there is a discipline of updating peer dependencies, looking at warnings and working to solve them, this could have helped noticing that there is an incompatibility problem. But just checkout any repo to see how many warning are generated when you install the node modules (most of them used to come from platforms modules). The app still works and who created the modules does not spend time to fix the peer-dependency. I cannot make sure "make sure people are reading" across the organization. Especially when key modules are generally not keeping peer-dependencies updated. A proper use of peer-dependencies, though, does not change the amount of work to update the codebase. It may actually increase it. The overheadTo make it clear, the codemods to update the code are useful and I love that you take the time to work them in when the changes are more involved. But the overhead is in the development process, and the added complexity it takes to keep multiple versions of a depending modules working for different versions of the depending modules. A little tangential: Things gets even more complicated and frustrating when CSS overrides are involved. I think the CSS of the library should be consider private data and should not be modified. BUT, there is no mechanism to prevent it and moreover internally it looks like people have a different philosophy choosing the quickest path. Unfortunately components that do not often follow the open-close principle make it necessary to make overrides. What I am askingI am not saying the library API should not be open for improvements. I am saying that among the principles that guide the development of the library, there should be a properly prioritized "striving for maintaining backwards compatibility" principle. And moreover the key question is "is the hassle worth the benefits for the end user of the API?" It is great to use semantic versioning. But it does not mean that "striving for maintaining backwards compatibility" is out when a major version comes out. Updating a name like this becomes then a tradeoff between "keeping consistency in the component naming" and "making a breaking change". |
We make decisions on a case-by-case basis on how long we will keep supporting a deprecated feature. Just like we will do for this change if we decide to move ahead with it. I have witnessed first hand several UI libraries at large companies collapse and fail due to mounting inconsistencies, bloated code and technical debt that becomes unmanageable for everybody. I agree we may sometimes appear to be more on the aggressive side of staying on top of that, but so far it has prevented us from those pitfalls.
You are preaching to the choir here. We consider these kind of tradeoffs on a continuous basis. It is our job. It is not something we take lightly. We have design systems and accessibility systems that also come into play. Keeping consistency across all systems is important.
We are striving to maintain backwards compatibility for a reasonable amount of time, even across major versions (we have many examples of this), but we are not striving for maintaining backwards compatibility till the end of time. There are various reasons for that (which I won't get into here). As mentioned above, sometimes we might be more aggressive on moving things out more quickly than others. |
It seems that we are aligned. I would keep in mind: "is the hassle of this breaking change worth the benefits for the end user of the API?" Some other resources about the impact of breaking changes and consequences:
|
Finally regarding this issue. Assuming "striving for maintaining backwards compatibility" principle is accepted and prioritized, there is a simple way to "Rename Assuming all the rest stays the same, you can simple create rename it and create a It is not always this easy, but the idea here is trying not to have to break the backward compatibility, as long it is counterproductive. |
Yes, we have leveraged this exact strategy for years now. You can look through the history for examples. We are very familiar with it. Staying in the API "forever" can have consequences beyond the CoreUI codebase. On the Skin CSS side, for example. But again, we have strategies to mitigate that when we deem it necessary. |
For now, we will include this in the next minor version. We will rename it to use the new name and create a migrator to still support the old name until next major. |
Feature Request
Description
Rename
ebay-infotip
toebay-infotip-button
to align with our new grouping:This also gives us the ability to extract out the overlay piece as just
ebay-infotip
if we wanted to. This would be consistent with how we doebay-menu
andebay-menu-button
Would need a corresponding change on the Skin side too.
The text was updated successfully, but these errors were encountered: