-
Notifications
You must be signed in to change notification settings - Fork 619
[BLD-242] Dashboard: Fix Notification overflow, UI Improvements #7985
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
[BLD-242] Dashboard: Fix Notification overflow, UI Improvements #7985
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughUpdated notification UI: popover sizing/offsets adjusted, notification entry layout and hover actions redesigned (left icon capsule, CTA button, hover-visible mark-as-read), and notification list container/tabs/empty states restructured. No API, control-flow, or data-model changes. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Assessment against linked issues
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
✨ Finishing Touches
🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7985 +/- ##
=======================================
Coverage 56.53% 56.53%
=======================================
Files 904 904
Lines 58626 58626
Branches 4146 4146
=======================================
Hits 33145 33145
Misses 25375 25375
Partials 106 106
🚀 New features to boost your workflow:
|
size-limit report 📦
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
🧹 Nitpick comments (5)
apps/dashboard/src/@/components/notifications/notification-entry.tsx (1)
46-48: Decorative icon should be hidden from ATMark the bell icon as decorative.
- <BellIcon className="size-4 text-muted-foreground" /> + <BellIcon aria-hidden className="size-4 text-muted-foreground" />apps/dashboard/src/@/components/notifications/notification-button.tsx (1)
59-61: Nit: remove redundant max-w when width is fixed
w-[450px]makesmax-w-mdredundant.- className="max-h-[90vh] min-h-[550px] w-[450px] max-w-md p-0 flex flex-col rounded-xl overflow-hidden" + className="max-h-[90vh] min-h-[550px] w-[450px] p-0 flex flex-col rounded-xl overflow-hidden"apps/dashboard/src/@/components/notifications/notification-list.tsx (3)
26-27: Confirm hover override of TabButtons
tabClassName="hover:bg-transparent"overrides TabButtons’ defaulthover:bg-accent. If the intent was to keep hover feedback, consider a softer token (e.g.,hover:bg-muted/30) rather than disabling it entirely.
96-99: Consider shared EmptyState component for consistencyWe have guidance to use shared notice/empty components. Replacing bespoke empty states with
EmptyStateCard(or equivalent) keeps patterns consistent.Example sketch:
<EmptyStateCard icon={<BellIcon className="size-5" aria-hidden />} title="No new notifications" className="grow" />And for Archive:
<EmptyStateCard icon={<ArchiveIcon className="size-5" aria-hidden />} title="No archived notifications" className="grow" />Also applies to: 134-137
24-24: Optional: split subviews into dedicated componentsThis file contains list + tabs + infinite loader. For clarity and tree-shaking, consider moving
InboxTab,ArchiveTab, andAutoLoadMoreinto colocated files.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (3)
apps/dashboard/src/@/components/notifications/notification-button.tsx(1 hunks)apps/dashboard/src/@/components/notifications/notification-entry.tsx(2 hunks)apps/dashboard/src/@/components/notifications/notification-list.tsx(4 hunks)
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.{ts,tsx}: Write idiomatic TypeScript with explicit function declarations and return types
Limit each file to one stateless, single-responsibility function for clarity
Re-use shared types from@/typesor localtypes.tsbarrels
Prefer type aliases over interface except for nominal shapes
Avoidanyandunknownunless unavoidable; narrow generics when possible
Choose composition over inheritance; leverage utility types (Partial,Pick, etc.)
Comment only ambiguous logic; avoid restating TypeScript in prose
**/*.{ts,tsx}: Use explicit function declarations and explicit return types in TypeScript
Limit each file to one stateless, single‑responsibility function
Re‑use shared types from@/typeswhere applicable
Prefertypealiases overinterfaceexcept for nominal shapes
Avoidanyandunknownunless unavoidable; narrow generics when possible
Prefer composition over inheritance; use utility types (Partial, Pick, etc.)
Lazy‑import optional features and avoid top‑level side‑effects to reduce bundle size
Files:
apps/dashboard/src/@/components/notifications/notification-button.tsxapps/dashboard/src/@/components/notifications/notification-entry.tsxapps/dashboard/src/@/components/notifications/notification-list.tsx
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Load heavy dependencies inside async paths to keep initial bundle lean (lazy loading)
Files:
apps/dashboard/src/@/components/notifications/notification-button.tsxapps/dashboard/src/@/components/notifications/notification-entry.tsxapps/dashboard/src/@/components/notifications/notification-list.tsx
apps/{dashboard,playground-web}/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
apps/{dashboard,playground-web}/**/*.{ts,tsx}: Import UI primitives from@/components/ui/*(Button, Input, Select, Tabs, Card, Sidebar, Badge, Separator) in dashboard and playground apps
UseNavLinkfor internal navigation with automatic active states in dashboard and playground apps
Use Tailwind CSS only – no inline styles or CSS modules
Usecn()from@/lib/utilsfor conditional class logic
Use design system tokens (e.g.,bg-card,border-border,text-muted-foreground)
Server Components (Node edge): Start files withimport "server-only";
Client Components (browser): Begin files with'use client';
Always callgetAuthToken()to retrieve JWT from cookies on server side
UseAuthorization: Bearerheader – never embed tokens in URLs
Return typed results (e.g.,Project[],User[]) – avoidany
Wrap client-side data fetching calls in React Query (@tanstack/react-query)
Use descriptive, stablequeryKeysfor React Query cache hits
ConfigurestaleTime/cacheTimein React Query based on freshness (default ≥ 60s)
Keep tokens secret via internal API routes or server actions
Never importposthog-jsin server components
Files:
apps/dashboard/src/@/components/notifications/notification-button.tsxapps/dashboard/src/@/components/notifications/notification-entry.tsxapps/dashboard/src/@/components/notifications/notification-list.tsx
apps/{dashboard,playground}/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
apps/{dashboard,playground}/**/*.{ts,tsx}: Import UI primitives from@/components/ui/_(e.g., Button, Input, Tabs, Card)
UseNavLinkfor internal navigation to get active state handling
Use Tailwind CSS for styling; no inline styles
Merge class names withcn()from@/lib/utilsfor conditional classes
Stick to design tokens (e.g., bg-card, border-border, text-muted-foreground)
Server Components must start withimport "server-only"; usenext/headers, server‑only env, heavy data fetching, andredirect()where appropriate
Client Components must start with'use client'; handle interactivity with hooks and browser APIs
Server-side data fetching: callgetAuthToken()from cookies, sendAuthorization: Bearer <token>header, and return typed results (avoidany)
Client-side data fetching: wrap calls in React Query with descriptive, stablequeryKeysand set sensiblestaleTime/cacheTime(≥ 60s default); keep tokens secret via internal routes or server actions
Do not importposthog-jsin server components (client-side only)
Files:
apps/dashboard/src/@/components/notifications/notification-button.tsxapps/dashboard/src/@/components/notifications/notification-entry.tsxapps/dashboard/src/@/components/notifications/notification-list.tsx
apps/{dashboard,playground}/**/*.tsx
📄 CodeRabbit inference engine (AGENTS.md)
Expose a
classNameprop on the root element of every component
Files:
apps/dashboard/src/@/components/notifications/notification-button.tsxapps/dashboard/src/@/components/notifications/notification-entry.tsxapps/dashboard/src/@/components/notifications/notification-list.tsx
🧠 Learnings (2)
📚 Learning: 2025-06-05T23:07:58.286Z
Learnt from: jnsdls
PR: thirdweb-dev/js#7290
File: apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/usage/page.tsx:13-13
Timestamp: 2025-06-05T23:07:58.286Z
Learning: `formatDate` is a valid export from `date-fns` library version 4.1.0 and can be imported and used alongside other date-fns functions like `parseISO`.
Applied to files:
apps/dashboard/src/@/components/notifications/notification-entry.tsx
📚 Learning: 2025-07-18T19:20:32.530Z
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : For notices & skeletons rely on `AnnouncementBanner`, `GenericLoadingPage`, `EmptyStateCard`.
Applied to files:
apps/dashboard/src/@/components/notifications/notification-list.tsx
🧬 Code graph analysis (1)
apps/dashboard/src/@/components/notifications/notification-list.tsx (1)
apps/dashboard/src/@/components/ui/tabs.tsx (1)
TabButtons(85-165)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: E2E Tests (pnpm, vite)
- GitHub Check: E2E Tests (pnpm, webpack)
- GitHub Check: Size
- GitHub Check: Lint Packages
- GitHub Check: Analyze (javascript)
🔇 Additional comments (1)
apps/dashboard/src/@/components/notifications/notification-entry.tsx (1)
57-72: Guard CTA rendering if data is missingAvoid rendering an anchor with undefined
href/text whenctaUrlorctaTextis absent.- <div className="flex flex-row justify-between gap-2 pt-2"> - <Button - asChild - size="sm" - variant="outline" - className="rounded-full bg-card gap-2" - > - <a - href={notification.ctaUrl} - rel="noopener noreferrer" - target="_blank" - > - {notification.ctaText} - <ArrowUpRightIcon className="size-4 text-muted-foreground" /> - </a> - </Button> - </div> + {notification.ctaUrl && notification.ctaText ? ( + <div className="flex flex-row justify-between gap-2 pt-2"> + <Button asChild size="sm" variant="outline" className="rounded-full bg-card gap-2"> + <a href={notification.ctaUrl} rel="noopener noreferrer" target="_blank"> + {notification.ctaText} + <ArrowUpRightIcon className="size-4 text-muted-foreground" /> + </a> + </Button> + </div> + ) : null}If
Notificationguarantees both fields, feel free to skip this guard and mark types as required.
apps/dashboard/src/@/components/notifications/notification-entry.tsx
Outdated
Show resolved
Hide resolved
apps/dashboard/src/@/components/notifications/notification-entry.tsx
Outdated
Show resolved
Hide resolved
8890aa2 to
eb7f3d9
Compare
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Merge activity
|
<!--
## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"
If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):
## Notes for the reviewer
Anything important to call out? Be sure to also clarify these in your comments.
## How to test
Unit tests, playground, etc.
-->
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on enhancing the UI of the notification components in the dashboard. It includes updates to layout, spacing, and styles, improving the overall user experience and visual consistency.
### Detailed summary
- Updated `PopoverContent` with new dimensions and layout.
- Enhanced `NotificationList` with improved tab spacing and structure.
- Adjusted styles for empty state messages in `InboxTab` and `ArchiveTab`.
- Modified `NotificationEntry` layout and added icons for better aesthetics.
- Changed button styles and interactions for improved usability.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
* **Style**
* Refreshed Notifications panel: larger, rounded popover with improved spacing, overflow handling, and updated alignment.
* Redesigned notification items: bell capsule indicator, clearer card-like layout, hover-revealed “Mark as read,” and an outline CTA with arrow icon.
* Improved list layout: flexible, smoother scrolling, simplified tab styling, and refined spacing.
* Enhanced empty states for Inbox and Archive with centered, card-style icon visuals.
* **Refactor**
* Reorganized component layouts for consistency and responsiveness without changing behavior or public APIs.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
eb7f3d9 to
769019d
Compare

PR-Codex overview
This PR focuses on enhancing the design and layout of the notification components in the dashboard, improving usability and aesthetics through updated styles and structure.
Detailed summary
PopoverContentinnotification-button.tsxwith new dimensions and layout.NotificationListinnotification-list.tsxfor improved structure and styling.InboxTabandArchiveTabfor better presentation.NotificationEntryinnotification-entry.tsxfor a more modern look and improved interaction elements.Summary by CodeRabbit
Style
Refactor