feat(notifications): readability redesign + Storybook coverage#6254
Closed
tsahimatsliah wants to merge 15 commits into
Closed
feat(notifications): readability redesign + Storybook coverage#6254tsahimatsliah wants to merge 15 commits into
tsahimatsliah wants to merge 15 commits into
Conversation
Improve notification readability and collect every notification surface into a single Storybook folder for review. Components (shared): - NotificationItem: scannable hierarchy (regular title with bold actor name at ~15px to match X, tertiary low-glare description), relative time moved inline after the title, top-aligned avatar/cover/menu, three-dots menu pinned to the top-right corner, no reserved gap when a row has no menu, no title truncation, roomier vertical padding. - Extract shared NotificationItemLead (avatar + category badge / type icon) so the feed row and in-app popup render leads identically. - InAppNotificationItem: redesigned to match the row (icon + category badge lead, bold-name headline). - NotificationsBell: compact corner badge on the rail bell instead of a full-size bubble that blanketed the icon. - Category badges: Squads now shares the Followers purple (dropped the low-contrast cheese yellow); per-badge glyph color for contrast on both bright and dark fills. Storybook (Components/Notifications/*): - Overview, Bell & badge, Icons & badges, List item, Full page, In-app popup, Toast (live), Incoming playground. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The row led with avatars[0], but the API lists avatars in different orders per type — squad comments/replies/posts arrive as [source, user], so the row showed a source/squad logo instead of the person who acted (e.g. a comment on your post showed the post's source, not the commenter). Add getNotificationLeadAvatar: always lead with the User avatar when one is present, falling back to the first avatar for source-only rows (new post in a source, role changes) and the type icon for system/digest rows. Applied to both NotificationItem and the in-app popup. Kept in its own module so the value import of NotificationAvatarType doesn't create a utils <-> graphql import cycle. Also add a "Use cases" Storybook page documenting every scenario with the avatars the API sends, the resolved lead, the badge, and the rationale. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- NotificationsFeed: shrink the mobile title-header padding (p-6 → px-4 pt-4 pb-2) to close the gap above the filter tabs, and render the tab strip like the Squad/Explore header (min-h-14, items-center, quaternary border) so the tabs read consistently across the app. - Mirror the same layout in the Storybook Full page story. Add a "Avatar alternatives" Storybook page presenting options for the multi-actor lead (current 2x2 grid vs overlapping stack, single avatar + badge, single + count pill, icon-only, two-avatar overlap) so we can pick a direction before changing the shared component. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Per feedback, the lead must show several faces inside the fixed lead box without overlapping other content. Replace the avatar-alternatives page with contained grid refinements (circular faces, 4-face + corner badge, +N count cell, +N corner chip), each shown at 'a few' (3) and 'many' (24), and keep the round-1 options below for reference. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… page - NotificationFilterBar: use XSmall tabs on mobile and Small on laptop, exactly like the Squads directory (isMobileLayout ? XSmall : Small). - NotificationItem: tighter rows below laptop (min-h-14 + py-3), restoring min-h-16 + py-4 from laptop up. - Mirror the responsive tab size in the Storybook Full page story. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace the avatar-alternatives page with 5 fresh directions that obey two rules — never overlap the text/layout, always show several faces: 1) liked-by face row under the title, 2) faces pill in the subtitle, 3) clipped peeking cluster (overflow-hidden so it can't spill), 4) diamond cluster, 5) count coin + peeking faces. Each shown at few (3) and many (24). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Build on the diamond direction (#4): 4A triad + mark, 4B quad + center hub, 4C triad + '+N' chip, 4D loose quad. Each rendered with circular and rounded-square faces side by side to compare the face shape. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Replace the 2x2 grid lead (>3 actors) with the chosen "4A" diamond: rounded-square faces at the top/left/right points and the colored category mark at the bottom point (a 4th face when the row has no badge). Stays inside the 40px lead box, so rows keep their alignment. - Square off the category badge everywhere (rounded-full -> rounded-8) via the shared NotificationItemLead, so single-avatar rows and the in-app popup get the rounded-square badge too. - Update the Icons story badges to match. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Code-review follow-ups: - Only render the diamond cluster when enough real avatars were sent to fill it (3 + badge, or 4) — otherwise fall back to the single lead. Avoids a lopsided cluster with empty points when numTotalAvatars > sent avatars. - Key diamond faces with `referenceId ?? index` to avoid key collisions. - In-app popup: render the title in a <div> (not <p>) with [&_p]:inline — the sanitized title can be wrapped in <p>, and <p> inside <p> is invalid and gets auto-closed by the browser, breaking the layout. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…tack Replace the diamond cluster with the chosen direction (#61): more than three actors now render as a tight overlap of up to three rounded-square faces, with the category badge centered on the bottom-right corner of the front face (rounded-square badge, matching the single-actor lead). Sized like one avatar so the lead never grows wider and rows stay aligned; the exact count stays in the title. Also includes the exploration Storybook pages (Stack explorations I/II/III, Avatar alternatives round 4, Use cases) used to arrive at this direction. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Make every notification avatar a rounded square to match the multi-actor stack: users render at rounded-8, and org/achievement/source avatars switch from circles to rounded-8. SourceButton gains a `rounded` prop (defaults to 'full', so all other callers are unchanged) since it hard-coded a circle. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2 tasks
Member
Author
|
Superseded by #6272 — the engineering-ready port on top of |
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.
Changes
Improves notification readability and collects every notification surface into one Storybook folder for ongoing design review.
Components (
packages/shared):typo-callout) to match X.text-text-tertiaryto reduce glare.Storybook (
Components/Notifications/*):Events
No new tracking events.
Experiment
No new experiments.
Manual Testing
Caution
Please make sure existing components are not breaking/affected by this PR
Verified via Storybook (light/dark, mobile/desktop) and strict
tscon changed files.NotificationItem/NotificationsBellare shared and used in the webapp header, notifications page, and extension companion — worth a sanity check there.Did you test the modified components media queries?
Preview domain
https://claude-heuristic-lamarr-0182ae.preview.app.daily.dev