-
-
Notifications
You must be signed in to change notification settings - Fork 232
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
feature: format_using and update_using field options #1797
feature: format_using and update_using field options #1797
Conversation
class ExecutionContext | ||
attr_accessor :target, :context, :params, :view_context, :current_user, :request, :include, :main_app, :avo | ||
|
||
def initialize(**args) |
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.
Method initialize
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Code Climate has analyzed commit cdb2462 and detected 1 issue on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
feature: format_as and update_as field options 🔗Stats
Trends
To-Dos
|
feature: format_as and update_as field options 🔗Stats
Trends
To-Dos
|
feature: format_as and update_as field options 🔗Stats
Trends
To-Dos
|
class ExecutionContext | ||
attr_accessor :target, :context, :params, :view_context, :current_user, :request, :include, :main_app, :avo | ||
|
||
def initialize(**args) |
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.
Method initialize
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
feature: format_as and update_as field options 🔗Stats
Trends
To-Dos
|
feature: format_as and update_as field options 🔗Stats
Trends
To-Dos
|
This PR has been merged into Please check the release guide for more information. |
@adrianthedev Thanks for all your hard work, and please take the following as constructive criticism: Dropping the value argument is a breaking change and it did indeed break our application in production. We've got a bunch of formatters in our application using the documented API, ie
which are apparently supposed to now be
but we had no way of knowing that we needed to make this change. Sure, we could have verified the changes in more depth, but when the release notes state that a new feature is added (which we don't use) and links to documentation that states our way of doing things is correct, we didn't raise any red flags. We like Avo (so much that we've paid for it and contributed previously) and I beg of you; please be more wary about breaking changes in the future, they make me look bad ;) I would much have preferred if the change wasn't breaking. Or if it had to be breaking, that it was clearly indicated in the release notes. Also, the documentation should probably have been updated, especially seeing how it was linked from the release notes. Cheers! I'm looking forward to digging into |
Hey @koppen. Thanks for the feedback. Yes, this is constructive 🙌 We know that breaking changes are not cool. We're developers too. We usually cover all changes in our release notes. Even this one is covered. Regarding the documentation, I'm not sure how that could have been out of sync. The release went out on July 4th and the docs were updated a few days prior. That being said, I know breaking changes suck and we definitely don't want to make you look bad, but there might be others in the future. That's how technology advances. Apologies for the trouble and open to suggestions for improvement. |
The change is fine, and I am perfectly okay with breaking changes, I just wish it had been more obvious to me.
The release notes is what we usually run through on upgrades, mostly because that's what Dependabot surfaces for us. And indeed, the change was mentioned there as a new feature.
I did not know about this 😳 That said, it seems to stop at v2.11 and doesn't mention v.2.36?
Again, something doesn't seem right here. I do not see the updated documentation at that URL: So a couple of concrete suggestions that would help me in the future:
|
Wow. That is still hapenning. You're a long-time user of Avo. You are seeing the old docs. Please try to do a ctrl/command+shift+R on that page and clear the cookies and service worker for docs.avohq.io. We changed those docs about a year ago. |
Your suggestions do make sense. I'll go ahead and follow them in the next releases ❤️ |
Whoa! Everything looks new and fresh! It's like the wool has been pulled from my eyes 😆 Yeah, service workers can be a problematic relationship, and indeed, there's no turning it off server-side - short of changing the URLs entirely, I guess. |
Yeah. I feel like changing the URL is going to be too much of a "breaking change". Sorry about that. |
Posted about it on our Discord server too. |
Description
Enables developers to add custom formatters before the data is displayed in the UI and before it gets saved to the database.
We retrofitted
format_using
to use theExecutionContext
and dropped thevalue
argument.The
update_using
block is run just before the value is saved on the model.Docs
Checklist: