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): person and cohort tables #13136

Merged
merged 96 commits into from
Dec 12, 2022
Merged

Conversation

mariusandra
Copy link
Collaborator

@mariusandra mariusandra commented Dec 5, 2022

Problem

Follow up to #13116

Changes

Replaces persons and cohort tables with data exploration versions.

2022-12-05 16 28 45
2022-12-05 16 29 05

I had to do some annoying refactors to get the delete button properly extracted, apologies for all the noise around this in the PR:

2022-12-07 15 37 01

I also cleaned up the storybook query stories somewhat.

How did you test this code?

Clicking around in the interface. Hopefully soon with visual regression tests.

@mariusandra mariusandra marked this pull request as ready for review December 7, 2022 14:40
@mariusandra
Copy link
Collaborator Author

Actually ready for a look!

Copy link
Contributor

@thmsobrmlr thmsobrmlr left a comment

Choose a reason for hiding this comment

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

Great! Only one real issue that I ran into: The delete button for persons in cohorts does not show up for me.

Besides that some UX details regarding exports on the persons page, and a few inline comments. Nothing that needs to change, just observations:

  • The exported CSV for "selected columns" contains a person.$delete column, which is probably unnecessary.

  • The exported CSV for "all columns" contains a value_at_data_point column, which is probably unnecessary.

  • Not related to this PR, but we might be able to improve this with data exploration - The exported CSV contains columns id and distinct_ids.0, but I can't filter for these columns (unclear what property I should use).

  • The export button does not reflect the number of selected columns this any more:

    Before
    Screenshot 2022-12-08 at 12 00 58

    After
    Screenshot 2022-12-08 at 12 00 54

frontend/src/queries/nodes/DataTable/DataTable.tsx Outdated Show resolved Hide resolved
frontend/src/queries/nodes/DataTable/defaults.ts Outdated Show resolved Hide resolved
@@ -193,7 +198,7 @@ export function CohortEdit({ id }: CohortLogicProps): JSX.Element {
</>
)}

{!isNewCohort && (
{typeof cohort.id === 'number' && (
Copy link
Contributor

Choose a reason for hiding this comment

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

How does this differ from !isNewCohort? Might want to extract to a variable for better understanding.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Unfortunately this is needed for typing below when passing the cohort id to the query :/

Copy link
Contributor

Choose a reason for hiding this comment

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

I think a comment would be great in that case :)

frontend/src/scenes/persons/PersonsScene.tsx Show resolved Hide resolved
frontend/src/scenes/persons/PersonsScene.tsx Show resolved Hide resolved
@mariusandra
Copy link
Collaborator Author

mariusandra commented Dec 9, 2022

Thanks for the review! Fixed all the feedback, I hope. Would love to get this in to help move along work on the two stacked PRs on top of this, plus the event table regressions...

  • The exported CSV for "selected columns" contains a person.$delete column, which is probably unnecessary.

Removed!

  • The exported CSV for "all columns" contains a value_at_data_point column, which is probably unnecessary.

This is there also on the current live persons table export. I propose we deal with it later 🙃

  • Not related to this PR, but we might be able to improve this with data exploration - The exported CSV contains columns id and distinct_ids.0, but I can't filter for these columns (unclear what property I should use).

Hopefully HogQL will help here

  • The export button does not reflect the number of selected columns this any more:

Fixed!

Copy link
Contributor

@thmsobrmlr thmsobrmlr left a comment

Choose a reason for hiding this comment

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

🚢 it!

@@ -193,7 +198,7 @@ export function CohortEdit({ id }: CohortLogicProps): JSX.Element {
</>
)}

{!isNewCohort && (
{typeof cohort.id === 'number' && (
Copy link
Contributor

Choose a reason for hiding this comment

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

I think a comment would be great in that case :)

@mariusandra mariusandra merged commit ff1643e into master Dec 12, 2022
@mariusandra mariusandra deleted the person-data-tables branch December 12, 2022 13: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.

2 participants