feat(inbox): make report detail sections collapsible - #4027
Draft
posthog[bot] wants to merge 1 commit into
Draft
Conversation
Web Inbox lets users collapse the report Summary, Evidence, Runs, and Reviewers sections. Desktop rendered all of them permanently open, and mobile only collapsed Signals. Desktop: `DetailSection` and `RightColumnSection` take `collapsible` (plus `defaultCollapsed`), turning the header into an `aria-expanded` disclosure button that shares a caret with the other. `rightSlot` stays outside the button so the Evidence count and the Reviewers "Add" popover keep their own click targets. Summary, Evidence, Runs, and Reviewers opt in; the data hooks are untouched, so collapsing only hides rendered content. `pr-review`'s `PrSectionHeader` was a near-copy of that chrome, so `PrCommentsSection` now uses the shared primitive and the duplicate is gone. Mobile: new `ReportSection` disclosure carries the accessible expanded state, and Summary and Suggested reviewers join the existing Signals toggle. Signals keeps its expand analytics. Generated-By: PostHog Code Task-Id: 6694c9d5-a520-4499-9af3-b46a15ab27dd
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
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
Web Inbox lets you collapse the report detail sections (Summary, Evidence, Runs, Reviewers) so a long report stays scannable. PostHog Desktop rendered every one of those sections permanently open, and mobile only collapsed Signals — so the same report reads very differently depending on where you open it.
Reported by the
signals-inbox-parityscout, which spotted the upstreamcollapsiblebehaviour landing inPostHog/posthogand the matching downstream gap.Why: parity — a report should be scannable the same way on desktop, web, and mobile.
Changes
Desktop.
DetailSectionandRightColumnSectiontakecollapsible(plusdefaultCollapsed), turning the header into anaria-expandeddisclosure button with a shared caret.rightSlotstays outside that button, so the Evidence count and the Reviewers "Add" popover keep their own click targets. Summary, Evidence, Runs, and Reviewers opt in — the data hooks are untouched, so collapsing only hides rendered content.pr-review'sPrSectionHeaderwas a near-copy of the same collapsible chrome, soPrCommentsSectionnow uses the shared primitive and the duplicate is deleted.Mobile. New
ReportSectiondisclosure carries the accessible expanded state; Summary and Suggested reviewers join the existing Signals toggle. Signals keeps its expand analytics.No screenshots — this is a disclosure toggle on existing chrome, verified through the tests below rather than a live app run.
How did you test this?
DetailSection.test.tsxruns both primitives through one table (8 tests): body renders with no toggle when not collapsible, header click hides/restores the body while reportingaria-expanded,defaultCollapsedstarts closed, and arightSlotbutton fires its own handler without toggling the section.pnpm --filter @posthog/ui test— 2413 passed.apps/mobileVitest suite — 571 passed.turbo typecheck --filter=@posthog/uiclean;tscoverapps/mobilereports no new errors in the touched files (the app has pre-existing failures elsewhere and no typecheck task).Automatic notifications
Created with PostHog Code from an inbox report