Skip to content
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

feat(data-exploration): fix event table regressions #13251

Closed
wants to merge 116 commits into from

Conversation

mariusandra
Copy link
Collaborator

@mariusandra mariusandra commented Dec 9, 2022

Problem

Fixes #13223

Changes

  • Hides the "person" column when looking at just one person
  • Make the trash/more buttons width:0
  • Fixes problem with editing filters. Was an issue in kea after all.
  • Add timestamp filter to events list query
  • ? Make sure the events buffer notice is in all places
  • ? Date separators
  • ? Property value columns don't show anything
  • ? There's no "Time" column

How did you test this code?

Clicky click.

Base automatically changed from person-data-tables to master December 12, 2022 13:42
@mariusandra mariusandra marked this pull request as ready for review December 13, 2022 13:06
@mariusandra
Copy link
Collaborator Author

This is ready for a look. The cypress tests fail for some reason, I suspect weird caching coming from the node18 or pnpm changes.

Copy link
Collaborator

@Twixes Twixes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is almost perfect now, but would be great to keep those date separators in the new component. :D
Also, it seems the event buffer notice isn't there, though I'm totally OK with doing away with that as long as we only release data-exploration-live-events after Pipeline folks' "live events" table is live.

@@ -1542,3 +1542,5 @@ export function downloadFile(file: File): void {
link?.parentNode?.removeChild(link)
}, 0)
}

export const daysAgo = (days: number): string => now().subtract(days, 'day').toISOString()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this truncate to start of day?
As it is now, TBH I'd find the plain now().subtract(days, 'day').toISOString() clearer, because then it's pretty evident what's going on

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I stole it from the existing events table, and ran into some mocking trouble, so didn't reuse the new lib there. Good idea though, I just inlined this now.

// NOTE: PropertyFilterType.Event is not a mistake. PropertyKeyInfo only knows events vs elements ¯\_(ツ)_/¯
return { title: <PropertyKeyInfo value={key.substring(18)} type={PropertyFilterType.Event} disableIcon /> }
} else {
return { title: String(key) }
Copy link
Collaborator

@Twixes Twixes Dec 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Supposedly key already must be string, so isn't useful to stringify it (unless it can be something else, but then typing should reflect that for everyone's safety)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can only assume there's a historic reason for this...

@Twixes Twixes closed this Dec 15, 2022
@Twixes Twixes deleted the event-data-table-fixr branch December 15, 2022 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regressions in new data table component
2 participants