-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
refactor(Embed): change addField to match v13 #7533
Conversation
we very explicitly removed this behavior from #addField before, I cannot see this becoming a thing again. |
I'm strongly of the opinion that #7522 is the preferred approach here I would rather not have two very similarly named methods with significantly different parameter interfaces when the single |
You never removed it, you just didn’t add it to the builders version. There was no deprecation warning emitted for v13 like there was with other methods
It’s exactly because they’re similarly named that their interfaces should be different. This makes a clear distinction between the two and gives users an actual reason to use this method over the other, whereas right now there is none. I think this would result in a better user experience overall when v14 releases, if you care about that |
Of course I care, I simply don't agree that this is the better experience. It would also be inconsistent to other |
I do not understand how not continuing something in a replacement is not equal to removing it. |
You can’t apply the logic used here to components. Embed fields have a visual order on the app: the name comes first, then the value, which is why it makes sense to have the name be accepted first and then the value on this method, followed by the inline boolean as that is an optional parameter. It wouldn’t make sense to spread a button in this way because its props are not visually ordered. |
There is no inconsistency when there’s nothing to be consistent with. You cannot compare this method with any other on the library, so there’s no “rule” for it to follow |
two methods, different usage, achieve the same thing. |
Likewise
Because as you said yourself
I agree, which is why I consider applying it here an inconsistency we don't need when |
That “inconsistency” is good here because otherwise why would you even use addField in the first place? |
Exactly, which is why I think it should be removed. It's obsolete against #addFields and giving it inconsistent usage with how the multi-version of the method works introduces confusion in end users. |
Closing this PR, it seems forced to bring more heat to a change the development team decided to take. As such, we will not proceed with this PR. @almostSouji's and @monbrey's points are very valid. |
Please describe the changes this PR makes and why it should be merged:
In order to avoid #7522, this PR makes #addField actually useful by allowing the user to pass each one of the parameters in the field individually, for better code readability and ease of writing this over and over, just like we had in v13. I'm making this PR because, as it sits, this method is useless when compared to #addFields, hence why the proposal to remove it, however, there are many scenarios where we indeed only want to add one field, so this method comes in handy.
Status and versioning classification: