PR: #716: feat(clients): adopt shared list empty state [Story-2689]
by @ayush-pramaan
View PR →
Story 2689
The clients list now uses the prominent shared empty state
A firm with no clients now sees the page-sized shared empty state. A member with write access can open the existing inline add-client sheet directly from it without leaving the clients list.
Before and after
| Before | After |
|---|---|
The clients route rendered a small, route-local empty-state
card from clients-empty-state.tsx.
|
The route renders the shared EmptyState with the
page variant and the larger icon treatment.
|
| The route and shared component duplicated the same job. | One shared component now serves the clients list and the client-related matters register through its page and card variants. |
Copy and interaction contract
-
The title, body, and action reuse
Clients.emptyHeading,Clients.emptyBody, andClients.addFirstClientin both English and Hindi. - No new locale key or route-level display string was added.
-
The action calls the existing
onAddcallback, so it opensAddClientSheetinstead of navigating to/clients/new. - Read-only members see the empty state without an action.
Review path
-
Open
Clients/EmptyStatein Storybook and select thePagestory. Confirm the page-sized treatment includes an action. -
Select the
Cardstory. Confirm the compact variant remains suitable for the related-matters register. - As a member with write access in an empty firm, open the clients list and select “Add your first client”. Confirm the inline sheet opens and the URL does not change.
- Repeat with a read-only member and confirm that no add action is shown.
- Review the empty clients list in English and Hindi and confirm all three labels resolve from the existing locale catalogs.
Files changed
3 file(s), +20 / -48 lines
| Path | Role | + | - |
|---|---|---|---|
| src/app/[locale]/(workspace)/clients/clients-empty-state.tsx | App route | +0 | -39 |
| src/app/[locale]/(workspace)/clients/clients-table.tsx | App route | +18 | -2 |
| src/components/clients/empty-state.stories.tsx | Component | +2 | -7 |