Skip to content

Improve models main view for easier access based on model type#6556

Open
mirekm wants to merge 6 commits intomainfrom
feat/better-modelling-list
Open

Improve models main view for easier access based on model type#6556
mirekm wants to merge 6 commits intomainfrom
feat/better-modelling-list

Conversation

@mirekm
Copy link
Copy Markdown
Member

@mirekm mirekm commented May 6, 2026

Let's fix the generic lists UX to match the individual views and use-cases better.

Scope for the Models list view:

  • Split models into separate tabs based on the type.
  • Make the Create model button context/tab aware
  • Hide Filters since there is only Model Type to filter against (we may bring it back for custom tabs with mode model types per single tab)

After

image

Before

image

@mirekm mirekm requested review from a team, NyanKiyoshi and Copilot May 6, 2026 14:29
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 6, 2026

🦋 Changeset detected

Latest commit: bbc7ed9

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codecov
Copy link
Copy Markdown

codecov Bot commented May 6, 2026

Codecov Report

❌ Patch coverage is 23.92638% with 248 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.50%. Comparing base (268465b) to head (bbc7ed9).

Files with missing lines Patch % Lines
src/modeling/views/PageList/PageList.tsx 0.00% 52 Missing ⚠️
src/modeling/hooks/useActiveModelType.ts 0.00% 43 Missing ⚠️
src/modeling/hooks/useModelTypeCountsFor.ts 0.00% 32 Missing ⚠️
src/modeling/hooks/usePinnedModelTypes.ts 0.00% 29 Missing ⚠️
...nents/PageListPage/ModelTypeTabs/ModelTypeTabs.tsx 62.50% 23 Missing and 1 partial ⚠️
src/modeling/hooks/useLastUsedModelType.ts 0.00% 18 Missing ⚠️
src/modeling/hooks/useModelTypes.ts 0.00% 15 Missing ⚠️
...geListPage/ModelTypeTabs/ModelTypeTabs.stories.tsx 0.00% 14 Missing ⚠️
...ents/PageTypePickerDialog/PageTypePickerDialog.tsx 0.00% 12 Missing ⚠️
.../modeling/components/PageListPage/PageListPage.tsx 0.00% 4 Missing ⚠️
... and 3 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6556      +/-   ##
==========================================
- Coverage   48.63%   48.50%   -0.13%     
==========================================
  Files        2591     2599       +8     
  Lines       46143    46428     +285     
  Branches    10873    10669     -204     
==========================================
+ Hits        22441    22521      +80     
- Misses      22466    23526    +1060     
+ Partials     1236      381     -855     
Flag Coverage Δ
storybook 44.16% <74.50%> (+0.31%) ⬆️
units 44.03% <0.96%> (-0.27%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mirekm mirekm changed the title First attempt to provide a more comprehensive models view beyond the … Improve models main view for easier access based on model type May 6, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Models (Pages) list UX to better match domain-specific use cases by introducing Model Type–based tabs, making “Create model” context-aware, and removing the now-redundant filter/preset UI.

Changes:

  • Added Model Type tabs (with counts + overflow dropdown) and wired the list query to filter by the active type via a new activeType URL param.
  • Made the Create model flow context-aware (tab default + “last used type” persistence) and adjusted navigation from Model Type delete → Models list.
  • Simplified the list header by removing ConditionalFilter + presets, and aligned styling/spacing across tabs/search/datagrid.

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/modelTypes/hooks/usePageTypeDelete/usePageTypeDelete.tsx Deep-links “view assigned items” into a specific Model Type tab when deleting a single type.
src/modeling/views/PageList/PageList.tsx Reworks list state (active type tabs, search handling, create dialog defaults) and removes filter preset plumbing.
src/modeling/views/PageList/filters.ts Removes the legacy page type filter config (filters UI no longer shown).
src/modeling/urls.ts Replaces old tab/filter params with activeType and simplifies dialog types.
src/modeling/index.tsx Drops ConditionalPageFilterProvider wrapper for the Models list route.
src/modeling/hooks/useModelTypeCounts.ts Adds hook to fetch model types and per-type counts used by the tabs.
src/modeling/hooks/useLastUsedModelType.ts Adds localStorage-backed “last used type” for defaulting the create picker.
src/modeling/hooks/useActiveModelType.ts Adds URL + localStorage resolution and setter for the active Model Type tab.
src/modeling/components/PageTypePickerDialog/PageTypePickerDialog.tsx Adds defaultPageTypeId support and preselection logic when dialog opens.
src/modeling/components/PageListPage/PageListPage.tsx Replaces filter/presets header with Model Type tabs + search + bulk actions layout.
src/modeling/components/PageListPage/ModelTypeTabs/ModelTypeTabs.tsx New tab strip component with counts and overflow (“More”) dropdown.
src/modeling/components/PageListPage/ModelTypeTabs/ModelTypeTabs.stories.tsx Storybook coverage for ModelTypeTabs states (few/many/loading/empty).
src/modeling/components/PageListPage/ModelTypeTabs/messages.ts i18n messages for the new tabs UI.
src/modeling/components/PageListDatagrid/PageListDatagrid.tsx Adjusts datagrid checkbox column width to align with new inset header layout.
src/components/TableFilter/FilterTabs.tsx Uses macaw-ui-next border token for better dark mode tab separator visibility.
src/components/TableFilter/FilterTab.tsx Adds optional count rendering and improves tab label layout (inline + ellipsis).
src/components/Datagrid/Datagrid.tsx Introduces rowMarkerWidth prop to control checkbox column width.
src/components/AppLayout/ListFilters/components/SearchTooltip/SearchTooltip.tsx Adjusts cursor styling for tooltip trigger to use __cursor="help".
src/components/AppLayout/ListFilters/components/SearchInput.tsx Updates search input wrapper styling to a single continuous bordered surface.
src/components/AppLayout/ListFilters/components/SearchInput.module.css New CSS module to neutralize nested backgrounds and add focus-within surface tint.
locale/defaultMessages.json Adds default messages for new ModelTypeTabs strings.

Comment thread src/modeling/components/PageListPage/PageListPage.tsx
Comment thread src/modeling/hooks/useModelTypeCounts.ts Outdated
Copilot AI review requested due to automatic review settings May 6, 2026 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants