From b964f755ec165c169770824c78893decf2e84fed Mon Sep 17 00:00:00 2001 From: t0ng7u Date: Wed, 23 Jul 2025 02:23:25 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(ui):=20enhance=20pricing=20tab?= =?UTF-8?q?le=20&=20filters=20with=20responsive=20button-group,=20fixed=20?= =?UTF-8?q?column,=20scroll=20tweaks=20(#1365)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • SelectableButtonGroup • Added optional collapsible support with gradient mask & toggle • Dynamic tagCount badge support for groups / quota types • Switched to responsive Row/Col (`xs 24`, `sm 24`, `lg 12`, `xl 8`) for fluid layout • Shows expand button only when item count exceeds visible rows • Sidebar filters • PricingGroups & PricingQuotaTypes now pass tag counts to button-group • Counts derived from current models & quota_type • PricingTableColumns • Moved “Availability” column to far right; fixed via `fixed: 'right'` • Re-ordered columns and preserved ratio / price logic • PricingTable • Added `compactMode` prop; strips fixed columns and sets `scroll={compactMode ? undefined : { x: 'max-content' }}` • Processes columns to remove `fixed` in compact mode • PricingPage & index.css • Added `.pricing-scroll-hide` utility to hide Y-axis scrollbar for `Sider` & `Content` • Responsive / style refinements • Sidebar width adjusted to 460px • Scrollbars hidden uniformly across pricing modules These changes complete the model-pricing UI refactor, ensuring clean scrolling, responsive filters, and fixed availability column for better usability. --- .../common/ui/SelectableButtonGroup.jsx | 2 +- .../table/model-pricing/PricingContent.jsx | 4 +- .../table/model-pricing/PricingPage.jsx | 2 + .../table/model-pricing/PricingTable.jsx | 18 +- .../model-pricing/PricingTableColumns.js | 160 +++++++++--------- web/src/index.css | 4 +- 6 files changed, 102 insertions(+), 88 deletions(-) diff --git a/web/src/components/common/ui/SelectableButtonGroup.jsx b/web/src/components/common/ui/SelectableButtonGroup.jsx index 270cacc7..097283e7 100644 --- a/web/src/components/common/ui/SelectableButtonGroup.jsx +++ b/web/src/components/common/ui/SelectableButtonGroup.jsx @@ -82,7 +82,7 @@ const SelectableButtonGroup = ({ {items.map((item) => { const isActive = activeValue === item.value; return ( - +