-
Notifications
You must be signed in to change notification settings - Fork 192
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(app): negative duration in search #28
fix(app): negative duration in search #28
Conversation
🦋 Changeset detectedLatest commit: ee3e6a3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The issue is going to be resolved differently, as mentioned in the #15 |
Hey @mark-omarov , If you are still interested, we'd love to get this fix out. |
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.
Looks awesome! It's good to merge as-is.
I have two minor suggestions we can do later if you'd like:
- It'd be awesome if the value is
N/A
, that we assign the class astext-muted
so it's less distracting in the UI. - I think
null
might work better thanN/A
in the UI, since it is technically null (though I know in the DB it isn't actually nullable, due to performance reasons)
packages/app/src/LogTable.tsx
Outdated
@@ -13,6 +13,7 @@ import cx from 'classnames'; | |||
import { Button, Modal } from 'react-bootstrap'; | |||
import stripAnsi from 'strip-ansi'; | |||
import { CSVLink } from 'react-csv'; | |||
import { curry } from 'lodash'; |
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.
optional nit: we don't have any tree-shaking for lodash built in the build chain so it'd be preferable to do import curry from lodash/curry
. However, we already import all of lodash in a few other components and it needs to be made consistent across the entire code base.
We can merge this as-is, since we're already inconsistent, and I made a follow-up issue addressing the broader issue in our code base #36
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.
Thanks for taking a look! I just pushed the update
I could work on #36 as well, if you don't mind
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.
@MikeShi42 I went ahead and opened an issue based on your comment to make things better down the line. Hope that's cool with you. Ref: #37
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.
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.
Looks awesome, thank you! 😄
Closes #15
Proposed change:
Display "N/A" instead of negative numbers for columns not supporting the
duration
property.Alternatives considered:
null
or omit the field - it would still require changes on the UInull
or0
as a value whenend_timestamp
is missing - requires a DB migration for all existing users, probably not a good ideauseSearchEventStream
- complicates already complicated hook, plus theLogTable
component already had to use theaccessorFn
, might as well use it