feat(dashboards): add section headers#10
Open
lordspline wants to merge 2 commits into
Open
Conversation
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Dashboards currently support text tiles, but not a first-class way to add lightweight section breaks. Users organizing dense dashboards need a section header that behaves like a dashboard tile without introducing a new dashboard model or migration.
Changes
transparent_background, regenerate dashboard/MCP API types, and report text tile creation through the existing dashboard tile added action path.section-header-treatment-a.png,section-header-treatment-b.png,section-header-browser-before.png,section-header-browser-after-add.png,section-header-browser-after-drag.png,section-header-dashboard-flow.mp4.How did you test this code?
I’m an agent. I tested with:
pnpm --filter=@posthog/frontend formatpnpm --filter=@posthog/frontend typescript:checkhogli test frontend/src/lib/components/Cards/TextCard/textCardSectionHeader.test.ts frontend/src/lib/components/Cards/TextCard/TextCard.test.tsx frontend/src/lib/components/Cards/TextCard/textCardModalLogic.test.ts frontend/src/scenes/dashboard/DashboardHeader.test.tsx frontend/src/scenes/dashboard/EmptyDashboardComponent.test.tsx frontend/src/scenes/dashboard/dashboardLogic.test.ts frontend/src/scenes/dashboard/dashboardUtils.test.ts frontend/src/scenes/dashboard/tileLayouts.test.tshogli test posthog/api/test/dashboards/test_dashboard.py::TestDashboard::test_create_text_tile_adds_markdown_tile_to_dashboard posthog/api/test/dashboards/test_dashboard.py::TestDashboard::test_create_text_tile_reports_tile_added_event posthog/api/test/dashboards/test_dashboard.py::TestDashboard::test_create_text_tile_requires_edit_permissions posthog/api/test/dashboards/test_dashboard.py::TestDashboard::test_update_text_tile_updates_body_and_layout posthog/api/test/dashboards/test_dashboard.py::TestDashboard::test_update_text_tile_requires_edit_permissions posthog/api/test/dashboards/test_dashboard.py::TestDashboard::test_duplicate_text_tile_within_dashboard_preserves_section_header_fields posthog/api/test/dashboards/test_dashboard.py::TestDashboard::test_create_from_template_json_can_provide_text_tile👉 Stay up-to-date with PostHog coding conventions for a smoother review.
Automatic notifications
Docs update
No docs update included.
🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Captain Capy implemented this as a fork experiment inspired by issue PostHog#58307. I prototyped a transparent divider treatment and a subtle accent-band treatment against realistic dashboard fixtures, then chose the transparent divider because it fits existing dashboard/text-tile visual language without competing with chart cards.
The implementation intentionally avoids a new dashboard model or migration. It uses existing text tile persistence with a marker in the body,
transparent_background, generated dashboard APIs, and layout defaults to preserve section-header behavior across creation, editing, duplication, templates, and responsive dashboards.Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.