From 583da45296eda8a9950a346055997e53cb8a7e1e Mon Sep 17 00:00:00 2001 From: t0ng7u Date: Mon, 25 May 2026 05:35:44 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20refactor(ui):=20Improve=20usage=20l?= =?UTF-8?q?og=20filter=20responsiveness=20and=20mobile=20UX?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refactor the usage log filter toolbar into a shared reusable component for common, drawing, and task logs. Optimize desktop filters with a responsive grid, move secondary filters into a mobile drawer, standardize filter typography, remove redundant filter icons, and add the missing i18n translations for the new drawer description. --- web/default/src/components/config-drawer.tsx | 16 +- web/default/src/components/drawer-layout.ts | 105 ++++++ web/default/src/components/group-badge.tsx | 9 +- .../layout/components/app-header.tsx | 27 +- .../layout/components/public-header.tsx | 27 +- .../src/components/notification-button.tsx | 63 ---- ...on-dialog.tsx => notification-popover.tsx} | 164 +++++++--- web/default/src/components/status-badge.tsx | 114 +++++-- web/default/src/components/table-id.tsx | 37 +++ web/default/src/components/ui/drawer.tsx | 2 +- web/default/src/components/ui/sheet.tsx | 2 +- web/default/src/components/ui/sonner.tsx | 32 +- web/default/src/components/ui/table.tsx | 7 +- .../channels/components/channels-columns.tsx | 109 +++---- .../dialogs/channel-test-dialog.tsx | 16 +- .../drawers/channel-mutate-drawer.tsx | 58 ++-- .../src/features/channels/constants.ts | 4 - .../overview/overview-dashboard.tsx | 9 +- .../components/users/user-charts.tsx | 110 ++++--- .../keys/components/api-keys-columns.tsx | 12 +- .../keys/components/api-keys-dialogs.tsx | 15 - .../components/api-keys-mutate-drawer.tsx | 124 +++---- .../keys/components/api-keys-table.tsx | 1 - web/default/src/features/keys/constants.ts | 6 +- .../models/components/deployments-columns.tsx | 12 +- .../dialogs/create-deployment-drawer.tsx | 33 +- .../prefill-group-management-dialog.tsx | 9 +- .../drawers/model-mutate-drawer.tsx | 55 ++-- .../drawers/prefill-group-form-drawer.tsx | 32 +- .../models/components/models-columns.tsx | 37 +-- web/default/src/features/models/constants.ts | 12 +- .../components/dynamic-pricing-breakdown.tsx | 4 +- .../pricing/components/model-details-api.tsx | 52 ++- .../pricing/components/model-details-apps.tsx | 4 +- .../pricing/components/model-details.tsx | 9 +- .../pricing/components/pricing-columns.tsx | 56 ++-- .../pricing/components/pricing-table.tsx | 2 +- .../pricing/components/pricing-toolbar.tsx | 11 +- .../components/redemptions-columns.tsx | 7 +- .../components/redemptions-mutate-drawer.tsx | 253 +++++++------- .../features/redemption-codes/constants.ts | 5 +- .../dialogs/user-subscriptions-dialog.tsx | 20 +- .../components/subscriptions-columns.tsx | 5 +- .../subscriptions-mutate-drawer.tsx | 40 ++- .../components/provider-table.tsx | 4 +- .../general/channel-affinity/index.tsx | 104 ++---- .../amount-discount-visual-editor.tsx | 2 +- .../creem-products-visual-editor.tsx | 2 +- .../payment-methods-visual-editor.tsx | 4 +- .../models/conflict-confirm-dialog.tsx | 4 +- .../models/group-ratio-form.tsx | 14 +- .../models/model-pricing-sheet.tsx | 17 +- .../components/columns/column-helpers.tsx | 56 +--- .../columns/common-logs-columns.tsx | 88 ++--- .../columns/drawing-logs-columns.tsx | 3 - .../components/columns/task-logs-columns.tsx | 2 - .../components/common-logs-filter-bar.tsx | 308 ++++++++++-------- .../compact-date-time-range-picker.tsx | 6 +- .../components/logs-filter-toolbar.tsx | 252 ++++++++++++++ .../components/task-logs-filter-bar.tsx | 86 +++-- .../components/usage-logs-table.tsx | 18 +- .../src/features/usage-logs/constants.ts | 21 +- .../src/features/usage-logs/lib/utils.ts | 12 +- .../users/components/users-columns.tsx | 87 ++--- .../users/components/users-mutate-drawer.tsx | 31 +- web/default/src/features/users/constants.ts | 3 - web/default/src/hooks/use-notifications.ts | 73 +++-- web/default/src/i18n/locales/en.json | 1 + web/default/src/i18n/locales/fr.json | 1 + web/default/src/i18n/locales/ja.json | 1 + web/default/src/i18n/locales/ru.json | 1 + web/default/src/i18n/locales/vi.json | 1 + web/default/src/i18n/locales/zh.json | 1 + web/default/src/lib/build-metadata.ts | 171 ++++++++++ web/default/src/main.tsx | 2 + web/default/src/routes/__root.tsx | 2 +- .../_authenticated/usage-logs/$section.tsx | 20 +- web/default/src/styles/index.css | 12 + web/default/src/styles/theme.css | 4 +- 79 files changed, 1879 insertions(+), 1262 deletions(-) create mode 100644 web/default/src/components/drawer-layout.ts delete mode 100644 web/default/src/components/notification-button.tsx rename web/default/src/components/{notification-dialog.tsx => notification-popover.tsx} (63%) create mode 100644 web/default/src/components/table-id.tsx create mode 100644 web/default/src/features/usage-logs/components/logs-filter-toolbar.tsx create mode 100644 web/default/src/lib/build-metadata.ts diff --git a/web/default/src/components/config-drawer.tsx b/web/default/src/components/config-drawer.tsx index c18d682e..4ece3da2 100644 --- a/web/default/src/components/config-drawer.tsx +++ b/web/default/src/components/config-drawer.tsx @@ -53,6 +53,12 @@ import { SheetTitle, SheetTrigger, } from '@/components/ui/sheet' +import { + sideDrawerContentClassName, + sideDrawerFooterClassName, + sideDrawerFormClassName, + sideDrawerHeaderClassName, +} from '@/components/drawer-layout' import { useSidebar } from './ui/sidebar' const Item = RadioPrimitive.Root @@ -88,14 +94,14 @@ export function ConfigDrawer() { >