Repository navigation
FE-2290: Improve the empty state of the /types table - #10524
claude[bot] wants to merge 3 commits into
Conversation
…table The /types table showed a bare "No results found" when nothing was visible, which is where a new user lands under the default "my webs" filter. When the user's webs have no types at all it now offers to create an entity type. Otherwise it offers to clear the filters or include public types, each only when that would show some types. Grid takes an optional noResultsContent to replace its default message.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
3 Skipped Deployments
|
PR SummaryLow Risk Overview
Reviewed by Cursor Bugbot for commit 36c9cb4. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
🟡 Changes recommended
Catalogue-load failures can leave empty type tabs stuck loading indefinitely, and the Playwright test can time out by expecting the wrong empty-state heading for accounts without unarchived owned types.
2 open issues
What changed in this PR
Improves the /types empty state while preserving the default “my webs only” filter, replacing the approach in #10522.
Changes:
- Adds contextual empty-state messages with creation and filter actions.
- Uses all loaded type kinds to distinguish empty webs from filtered-out results, and adds custom empty content support to
Grid. - Updates the Playwright test to exercise the public-types action.
| File | Description |
|---|---|
tests/hash-playwright/tests/features/types-page.spec.ts |
Exercises empty-state messaging and the public-types action. |
apps/hash-frontend/src/pages/types/[[...type-kind]].page.tsx |
Passes all loaded types to the table. |
apps/hash-frontend/src/pages/shared/types-table/types-empty-state.tsx |
Adds the empty-state message and action component. |
apps/hash-frontend/src/pages/shared/types-table.tsx |
Determines empty-state content, available actions, loading, and height. |
apps/hash-frontend/src/components/grid/grid.tsx |
Supports custom interactive empty-state content. |
Review effort: Balanced
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 49a2923. Configure here.
An empty /types tab waited for every kind of type before choosing its empty state, so a failed entity or data type query left it loading forever. The page now tells the table when a query failed, and the table falls back to the general empty state. The Playwright test no longer expects one heading, since the user may own no types at all; it waits for the button both empty states offer.


Requested by Deivids Vilkinsons, Ciaran Morinan, Alex Leon · Slack thread
🌟 Purpose
The
/typestable showed only "No results found" when no rows were visible. A new user lands there under the default "my webs" filter, and the page gave them nothing to do next. This supersedes #10522, which was closed because the default filter should stay "my webs only".The table's empty state now depends on why it is empty:
/new/types/entity-type. An "Show all public types" button also appears when that would show types.Screenshots (rendered from the real
Gridand empty-state components with the app's MUI theme) are in the Slack thread, because uploading images to GitHub is not available from this session.To see it: sign in as a new user and open
/types. For the general case, open the "Web is" filter and untick your webs, or add a filter that matches nothing.🔍 Changes
allTypes, whichever tab is open. Until they have all loaded, an empty table shows its loading state, so the wrong message does not flash on screen.Gridtakes an optionalnoResultsContent, which replaces its default message and can hold buttons. Every other table keeps the existing message.onlyOneWeb) is unchanged./typesPlaywright test now unticks every web, checks for "No types match your filters", and clicks "Show all public types" before it checks for a non-zero count. Before, it opened the menu and ticked "Public in any web" itself.Generated by Claude Code