-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add NoDataAlert widget #188
Add NoDataAlert widget #188
Conversation
This pull request has been linked to Shortcut Story #183641: Add component for showing an alert in widgets when there is no data available. |
Pull Request Test Coverage Report for Build 1295492895
💛 - Coveralls |
I've added it also to FormulaWidget, for consistency (and because default 0.00 value for empty might be wrong / misleading under certain operations). I also reduced a bit the IMO very long text (@borja-munoz can maybe give us feedback on that during QA) |
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.
LGTM, so 🚀
Sorry @VictorVelarde, I don't agree. From my experience in PS projects, when the count of elements is 0, the client wants to see 0, no "No data". That's why I didn't add it there. Another example, if the sum of revenue of a certain store is 0, it isn't the same as no data. Maybe I'd add it when formulaData is null or undefined. |
I understand that displaying 0.0 might be fine assuming Count or Sum, but there are other operations that can be applied to Formula, where 0 is not, IMO, correct. Having said that I have no issues in reverting that commit, let's just ping @borja-munoz for confirmation on this before merging it |
I'm gonna do one thing, I'm gonna revert my commit 0d021bf, so to merge this as Sergio set it, and if Borja wants to include my FormulaWidget change, we can do another PR with cherry-pick later |
0d021bf
to
c47f49a
Compare
I think for COUNT operations makes sense to show 0 if there is no data in the current viewport. For the other aggregation operations (SUM, AVG, MIN, MAX), I think it is better to show the no data message. Sorry for introducing a third option. If there is no time now to implement it, I'd keep Sergio's approach for now, but revisit this in the future. |
Story details: https://app.shortcut.com/cartoteam/story/183641