Skip to content

Tidy custom notification sound settings layout#3047

Merged
pauldambra merged 3 commits into
mainfrom
posthog-code/tidy-custom-sound-ui
Jul 1, 2026
Merged

Tidy custom notification sound settings layout#3047
pauldambra merged 3 commits into
mainfrom
posthog-code/tidy-custom-sound-ui

Conversation

@pauldambra

Copy link
Copy Markdown
Member

Problem

UI feedback on the new custom notification sounds section: the Add button sat next to the sound picker rather than with the custom sounds, the picker's "Test" control and the per-sound "Play" control looked different, and the Play button was to the left of each sound's name.

Changes

  • Move the Add button into the Custom sounds section as a new row below the list. The section now always renders, so adding a sound simply appends a row.
  • Replace the Test text button next to the sound picker with a Play icon button, matching the custom sound rows.
  • In each custom sound row, move the Play button to the right of the sound name.

How did you test this?

  • pnpm --filter @posthog/ui typecheck
  • biome lint on the changed file

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Created with PostHog from a Slack thread

Address UI feedback on the custom notification sounds section:

- Move the "Add" button into the Custom sounds section as a new row below the list, so the section is always shown and adding a sound just adds a row.
- Replace the "Test" text button next to the sound picker with a Play icon button, matching the custom sound rows.
- In each custom sound row, move the Play button to the right of the name.

Generated-By: PostHog Code
Task-Id: 0d0d9a9d-6c4b-4e19-9dbd-9759fc2e716b
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

React Doctor found 1 issue in 1 file · 1 warning.

1 warning

src/features/settings/sections/NotificationsSettings.tsx

Reviewed by React Doctor for commit 92dc7b6.

@greptile-apps

greptile-apps Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "refactor(notifications): tidy custom sou..." | Re-trigger Greptile

When no custom sounds exist yet, the Custom sounds section now describes why you'd add one instead of showing the rename/remove copy.

Generated-By: PostHog Code
Task-Id: 0d0d9a9d-6c4b-4e19-9dbd-9759fc2e716b
@pauldambra pauldambra marked this pull request as ready for review July 1, 2026 09:47
@greptile-apps

greptile-apps Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Reviews (2): Last reviewed commit: "feat(notifications): explain custom soun..." | Re-trigger Greptile

@pauldambra pauldambra left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Note

🤖 Automated comment by QA Swarm — not written by a human

Multi-perspective review: paul-reviewer, xp-reviewer, security-audit (qa-team unavailable in this environment — skipped)

Verdict: 💬 APPROVE WITH NITS

Clean, well-scoped response to the UI feedback. No correctness or security concerns — only low/nit design and UX polish suggestions, none blocking.

Key findings

  • 🟢 UX — Play icon lost its hover affordance. Swapping the Test text button for a bare Play icon means sighted mouse users no longer get a label; only aria-label remains. Consider a Radix Tooltip (applies to the per-row Play icons too). (paul)
  • 🟢 Stale noBorder flag. noBorder={completionSound === "none"} on the Sound-effect row predates this change — the "Custom sounds" row now always renders directly below, so the last-row-before-a-gap intent no longer holds. Worth eyeballing the none case in the running app. (paul)
  • 🟢 Lift the description ternary to a named const (customSoundsDescription) so the JSX stays scannable. (xp)
  • 🟢 completionSound !== "none" is repeated 4× to gate rows — a single const soundEnabled = completionSound !== "none" names the concept once. (xp)
  • No test locks in the new "always renders" behaviour of the Custom sounds section (+ that it hosts Add). A one-line render assertion would be cheap. (paul)
  • No analytics on add/play/remove custom sound — since this PR is about making Add discoverable, a track on it would tell us if it's used. Not necessarily this PR. (paul)

Convergence

Both reviewers independently concluded the playCompletionSound appearing in the picker (selected-sound preview) and in CustomSoundRow (single-sound preview) is not duplication worth extracting — same JSX, different intent. Leave them separate.

Reviewer summaries

Reviewer Assessment
👤 paul nice tidy-up matching the feedback; eyeball the none border case and consider a tooltip on the icon; approve with comments
📐 xp the code is the design and reads that way; two small clarity/OnceAndOnlyOnce touch-ups, take or leave
🛡 security-audit pure UI rearrangement, no user input reaches a new/modified sink — no findings

Automated by QA Swarm — not a human review

Comment thread packages/ui/src/features/settings/sections/NotificationsSettings.tsx Outdated
@pauldambra pauldambra added the Stamphog This will request an autostamp by stamphog on small changes label Jul 1, 2026 — with PostHog
github-actions[bot]
github-actions Bot previously approved these changes Jul 1, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Purely cosmetic UI layout changes in a single settings component — no business logic, data models, API contracts, or dependencies touched. All review comments are low-severity nits; the one unresolved comment (tooltip affordance on the Play icon) is explicitly non-blocking.

Wrap the sound-effect "Test" icon button and the per-custom-sound Play icon buttons in a Tooltip so sighted mouse users get the label the old "Test" text gave for free (screen readers already had aria-label). Addresses review feedback that the icon-only buttons lost their affordance.

Generated-By: PostHog Code
Task-Id: 0d0d9a9d-6c4b-4e19-9dbd-9759fc2e716b
@github-actions github-actions Bot dismissed their stale review July 1, 2026 09:58

New commits pushed (delta classified non_trivial_delta) — stamphog approval dismissed; re-review running automatically.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pure UI layout and accessibility improvement in a single settings component — no business logic, data models, API contracts, or new dependencies. All review comments are resolved, including the tooltip affordance concern that was addressed in a follow-up commit.

@pauldambra pauldambra removed the Stamphog This will request an autostamp by stamphog on small changes label Jul 1, 2026
@pauldambra pauldambra added the Stamphog This will request an autostamp by stamphog on small changes label Jul 1, 2026 — with PostHog
@pauldambra pauldambra enabled auto-merge (squash) July 1, 2026 10:00

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pure UI layout and accessibility improvement in a single settings component — no business logic, data models, API contracts, or new dependencies. All inline review comments are resolved, including the tooltip affordance concern that was addressed in a follow-up commit.

@pauldambra pauldambra merged commit 88887ab into main Jul 1, 2026
26 checks passed
@pauldambra pauldambra deleted the posthog-code/tidy-custom-sound-ui branch July 1, 2026 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Stamphog This will request an autostamp by stamphog on small changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant