Skip to content

feat(crm): Second pass at overview dashboard #31079

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

Merged
merged 18 commits into from
Apr 11, 2025

Conversation

danielbachhuber
Copy link
Contributor

@danielbachhuber danielbachhuber commented Apr 10, 2025

See #29881
Design discussion in https://posthog.slack.com/archives/C08GGECGJF4/p1744301304806079

Changes

Second pass at the 'Overview' tab in the group detail context. Also sets 'Overview' as the default tab.

CleanShot.2025-04-10.at.16.02.59.mp4
Before After
No dashboard created yet
CleanShot 2025-04-10 at 15 57 36@2x CleanShot 2025-04-10 at 15 56 59@2x
Dashboard created
CleanShot 2025-04-10 at 15 58 04@2x CleanShot 2025-04-10 at 15 59 23@2x

The insight doesn't default to full width because of this funkiness:

values.dashboard?.tiles.forEach((tile: DashboardTile<QueryBasedInsightModel>) => {
editModeTileLayouts[tile.id] = tile.layouts
})

How did you test this code?

Refreshed the page a lot.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 5)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 5)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 5)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@danielbachhuber danielbachhuber changed the title feat(crm): Overview dashboard v2. feat(crm): Overview dashboard v2 Apr 10, 2025
@danielbachhuber danielbachhuber changed the title feat(crm): Overview dashboard v2 feat(crm): Second pass at overview dashboard Apr 10, 2025
@danielbachhuber danielbachhuber marked this pull request as ready for review April 10, 2025 23:03
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR enhances the group detail view with a redesigned Overview tab that provides a more comprehensive and modular information display.

  • Added three new card components (GroupDashboardCard, GroupPeopleCard, GroupPropertiesCard) to display insights, related people, and properties in a structured layout
  • Refactored GroupOverview.tsx to use these card components instead of just showing a dashboard or creation prompt
  • Modified RelatedGroups component to support filtering by type and limiting results
  • Updated dashboard_templates.py to create better insights with 90-day timeframes and full-width tiles
  • Set 'Overview' as the default tab in the group detail view for improved user experience

8 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings | Greptile

</div>
</div>
<div>
<h2>Insights</h2>
<GroupDashboardCard />
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: GroupDashboardCard is used without passing groupData prop, but the component might need it based on its implementation in GroupDashboardCard.tsx

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This component is reading from the logic

Comment on lines +92 to +96
onClick={() => {
setCreatingDetailDashboard(true)
reportGroupTypeDetailDashboardCreated()
createDetailDashboard(groupData.group_type_index)
}}
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Consider adding error handling for the createDetailDashboard call to reset the creatingDetailDashboard state if the operation fails.

<div className="flex flex-col gap-2">
<PropertiesTable
type={PropertyDefinitionType.Group}
properties={propertySummary || {}}
Copy link
Contributor

Choose a reason for hiding this comment

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

style: The fallback to empty object here is redundant since line 15 already has a fallback with || {}

Suggested change
properties={propertySummary || {}}
properties={propertySummary}

Copy link
Contributor

Size Change: +105 B (0%)

Total Size: 13.2 MB

ℹ️ View Unchanged
Filename Size Change
frontend/dist/toolbar.js 13.2 MB +105 B (0%)

compressed-size-action

@danielbachhuber danielbachhuber merged commit 1098e83 into master Apr 11, 2025
122 checks passed
@danielbachhuber danielbachhuber deleted the crm/overview-dashboard-v2 branch April 11, 2025 12:17
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.

3 participants