-
Notifications
You must be signed in to change notification settings - Fork 4
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
Fix Counter, Leaderboard and TimeSeries bugs #73
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
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.
Looking good. I think we could improve some parts
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.
@felipecadavid +1 for the detailed PR description. Let's chat tomorrow about
- How we document feature additions/bug fixes in this project.
- We might want a pull request template.
- We might start tracking a CHANGELOG.md in this project.
- How we manually validate (with @davepropel) that a PR like this is good-to-go.
} | ||
if (typeof fetchedValue === 'undefined') { | ||
setHasError(true) | ||
console.error(`QueryError: Your metric ${query?.metric} returned undefined.`) |
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.
@felipecadavid I am think we should probably remove the console.error
for now, and plan for logging as a feature soon.
What I mean is that,
- First of all, customers should be able to enable/disable logging; and
- Second of all, customers may even want to provide their own callbacks to avoid sending directly to console.
Since we don't have that prepared yet, let's not add more non-configurable console.error
, console.log
, etc., calls to the library just yet.
console.error(`QueryError: Your metric ${query?.metric} returned undefined.`) |
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.
I'm going to comment all the console.error
and will leave a comment related to this
if (variant === 'table') { | ||
destroyChart() | ||
} |
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.
@felipecadavid Why are we only calling destroyChart
for variant === 'table'
? What about the other variant(s)?
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.
We currently only have 'table'
and 'bar'
variants for leaderboard, what I'm doing here is stating that when the variant
changes to 'table'
we should then cleanup the 'bar'
chart, so we allow changing the component's variant dynamically
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.
+1 — let's get this in a release candidate
This PR fixes some bugs found while testing the components in the example apps.
TimeSeries
Leaderboard
bar
totable
and then tobar
again madebar
chart disappearCounter
null
value, it showed an error, changed to-
instead