Skip to content

feat: responsive layout foundation, mobile tables, and filter drawer APIs#42

Open
axsapronov wants to merge 15 commits into
gpustack:mainfrom
axsapronov:mobile-fixes
Open

feat: responsive layout foundation, mobile tables, and filter drawer APIs#42
axsapronov wants to merge 15 commits into
gpustack:mainfrom
axsapronov:mobile-fixes

Conversation

@axsapronov

@axsapronov axsapronov commented Jul 4, 2026

Copy link
Copy Markdown

Summary

This PR adds the shared responsive infrastructure consumed by gpustack-ui's mobile/tablet UI work. It introduces a single breakpoint model, drawer/filter patterns for list pages, mobile table rendering, and compact toolbar primitives.

THIS IS PART OF BIG PR - gpustack/gpustack-ui#1258

What's included

Responsive foundation

  • getResponsiveLayout() / useResponsiveLayout() — unified breakpoints and flags (isMobile, isTablet, isIconOnlyToolbar, etc.)
  • Refactored useWindowResize to delegate to getResponsiveLayout
  • getDrawerWidth() and filterResponsiveColumns() helpers

Filters

  • useFilterDrawer — drawer state, active filter count, clear helpers
  • Responsive FilterBar layout (inlineFilters, collapseInlineFilters, compact filters button)
  • FilterFormField — labeled fields for side filter drawers

Toolbar / page header components

  • IconTextButton, PageHeaderTitle, ResponsiveSegmented
  • ResponsiveColGrid, ResponsiveTabsExtra

Tables

  • Seal Table — mobile card layout with mobileTitle / mobileCard / hideBelow column metadata
  • AntdResponsiveTable — drop-in wrapper for ant Design Table with the same mobile card behavior

Other

  • useInitialCollapsed — viewport-aware initial panel collapse (no resize sync)
  • DropdownButtons and StatusTag small-screen fixes
  • package-lock.json added

Commit breakdown

Commit Purpose
feat(responsive): centralize breakpoints in getResponsiveLayout Shared breakpoint model
feat(utils): add drawer width and responsive column filtering Drawer width + column visibility helpers
feat(filters): add useFilterDrawer and responsive FilterBar layout Filter drawer pattern
feat(filter-form): add FilterFormField for labeled drawer fields Labeled filter fields
feat(components): add responsive toolbar and page header primitives Compact toolbar building blocks
feat(hooks): add useInitialCollapsed for viewport-aware panels Playground-style collapse
feat(table): add mobile card layout to Seal Table Card view for Seal Table
feat(table): add AntdResponsiveTable drop-in wrapper Card view for ant Design tables
fix(components): improve DropdownButtons and StatusTag on small screens Toolbar/status overflow fixes
chore: add package-lock.json Lockfile

Notes for maintainers

  • Version bump is intentionally not included — please publish after merge.
  • gpustack-ui depends on this release; see the linked gpustack-ui PR.

Test plan

  • npm test / unit tests pass for new utilities and hooks
  • FilterBar + useFilterDrawer + FilterFormField render correctly in Storybook or a local consumer
  • Seal Table switches to card layout below mobile breakpoint
  • AntdResponsiveTable renders cards on mobile and horizontal scroll on tablet
  • IconTextButton / DropdownButtons show icon-only mode below lg
  • getResponsiveLayout returns expected flags at 767px, 991px, 1199px, 1920px
  • Publish and note the new version for the gpustack-ui PR

axsapronov added 10 commits July 4, 2026 20:54
Single source for isMobile, isTablet, isIconOnlyToolbar and related
layout flags. Refactors useWindowResize to delegate to getResponsiveLayout.
Adds getDrawerWidth helpers and filterResponsiveColumns for hideBelow
column metadata on narrow viewports.
Introduces drawer-based filter state and responsive FilterBar toolbar
layout with inline filters and compact filters button.
Provides a consistent label+control wrapper for filter drawer panels
and fixes FilterForm wrapper height when the drawer is closed.
Adds IconTextButton, PageHeaderTitle, ResponsiveSegmented, ResponsiveColGrid
and ResponsiveTabsExtra for compact mobile toolbars and page headers.
Panels can start collapsed on narrow viewports without syncing collapse
state on every window resize.
Renders list rows as cards on mobile with mobileTitle and mobileCard
column metadata and responsive column visibility.
Wraps ant Design Table with mobile card rendering and horizontal scroll
on tablet, reusing Seal Table mobile card styles.
Icon-only dropdown actions, tooltip wrapper for disabled items, and status
tag overflow fixes; adds ambient type declarations for tinycolor and bibtex.
@axsapronov

Copy link
Copy Markdown
Author

Examples of mobile UI:

gpu-service__templates models__benchmark models__deployments

@axsapronov

Copy link
Copy Markdown
Author

Exampes of desktop UI:

models__deployments resources__clusters__detail

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces comprehensive responsive design enhancements, including a new mobile card-based table view (AntdResponsiveTable and MobileCards), responsive layout hooks, and compact toolbar layouts for smaller viewports. The review feedback identifies critical issues in the mobile table implementation, such as selection loss across paginated pages, the incorrect selection of disabled rows during 'Select All', and TypeScript compilation errors when handling nested dataIndex paths. Additionally, feedback points out a bug in CellContent where editing nested properties fails to update correctly, and notes that the useResponsiveLayout hook is now redundant and can be simplified.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/lib/components/antd-responsive-table/mobile-cards.tsx Outdated
Comment thread src/lib/components/antd-responsive-table/mobile-cards.tsx
Comment thread src/lib/components/antd-responsive-table/utils.ts Outdated
Comment thread src/lib/components/table/mobile-card/mobile-card-utils.ts Outdated
Comment thread src/lib/components/table/components/cell-content.tsx
Comment thread src/lib/hooks/use-responsive-layout.ts
Extract selection helpers with record cache and selectable row keys so
mobile card rowSelection keeps rows from other pages and skips disabled
rows on select all.
Add tests for array dataIndex paths and use lodash-compatible casts so
nested column fields resolve correctly in mobile card rendering.
Add buildSubmittedRow helper and use it on cell submit so nested paths
update the correct field instead of creating a flat comma-separated key.
Remove duplicate getResponsiveLayout calculation now that useWindowResize
already returns the full responsive layout flags.
ResponsiveSegmented, ResponsiveColGrid, and ResponsiveTabsExtra were
implemented but missing from the barrel export, breaking gpustack-ui
consumers that import them from @gpustack/core-ui.
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.

1 participant