From 38fddeb281588de41d8ff6292c1dd48443a059a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elisi=C3=A1rio=20Couto?= Date: Sun, 5 Oct 2025 23:14:19 +0100 Subject: [PATCH] refactor(frontend): Standardize button styling using shadcn Button component. Replace inconsistent native HTML button elements with shadcn/ui Button component across all components for consistent styling and behavior. Changes: - TransactionsTable: Use Button with ghost variant for Raw action buttons - Settings: Standardize edit, save, cancel, and delete buttons with icon variant - AccountsOverview: Apply consistent Button component for account actions - AccountSettings: Update account editing buttons to use Button component - NotificationFiltersDrawer: Convert filter removal buttons to Button component Benefits: - Consistent design system throughout the app - Better accessibility and keyboard navigation - Proper theme support and state handling - Reduced custom CSS and improved maintainability --- frontend/src/components/AccountSettings.tsx | 24 ++++++++------ frontend/src/components/AccountsOverview.tsx | 24 ++++++++------ .../components/NotificationFiltersDrawer.tsx | 16 ++++++---- frontend/src/components/Settings.tsx | 32 ++++++++++++------- frontend/src/components/TransactionsTable.tsx | 14 ++++---- 5 files changed, 68 insertions(+), 42 deletions(-) diff --git a/frontend/src/components/AccountSettings.tsx b/frontend/src/components/AccountSettings.tsx index b3594d2..04ea5f0 100644 --- a/frontend/src/components/AccountSettings.tsx +++ b/frontend/src/components/AccountSettings.tsx @@ -234,24 +234,28 @@ export default function AccountSettings() { }} autoFocus /> - - +

{account.institution_id} @@ -265,13 +269,15 @@ export default function AccountSettings() { account.name || "Unnamed Account"} - +

{account.institution_id} diff --git a/frontend/src/components/AccountsOverview.tsx b/frontend/src/components/AccountsOverview.tsx index a6d47c7..07ea005 100644 --- a/frontend/src/components/AccountsOverview.tsx +++ b/frontend/src/components/AccountsOverview.tsx @@ -273,24 +273,28 @@ export default function AccountsOverview() { }} autoFocus /> - - +

{account.institution_id} @@ -304,13 +308,15 @@ export default function AccountsOverview() { account.name || "Unnamed Account"} - +

{account.institution_id} diff --git a/frontend/src/components/NotificationFiltersDrawer.tsx b/frontend/src/components/NotificationFiltersDrawer.tsx index 4777ca5..a00bb0d 100644 --- a/frontend/src/components/NotificationFiltersDrawer.tsx +++ b/frontend/src/components/NotificationFiltersDrawer.tsx @@ -166,13 +166,15 @@ export default function NotificationFiltersDrawer({ className="flex items-center space-x-1 bg-secondary text-secondary-foreground px-2 py-1 rounded-md text-sm" > {filter} - + )) ) : ( @@ -222,13 +224,15 @@ export default function NotificationFiltersDrawer({ className="flex items-center space-x-1 bg-secondary text-secondary-foreground px-2 py-1 rounded-md text-sm" > {filter} - + )) ) : ( diff --git a/frontend/src/components/Settings.tsx b/frontend/src/components/Settings.tsx index fbb1ea3..94f4a6b 100644 --- a/frontend/src/components/Settings.tsx +++ b/frontend/src/components/Settings.tsx @@ -403,24 +403,28 @@ export default function Settings() { }} autoFocus /> - - +

{account.institution_id} @@ -434,13 +438,15 @@ export default function Settings() { account.name || "Unnamed Account"} - +

{account.institution_id} @@ -579,7 +585,7 @@ export default function Settings() { Created {formatDate(connection.created_at)}

- + diff --git a/frontend/src/components/TransactionsTable.tsx b/frontend/src/components/TransactionsTable.tsx index 794b00c..1feb559 100644 --- a/frontend/src/components/TransactionsTable.tsx +++ b/frontend/src/components/TransactionsTable.tsx @@ -259,14 +259,15 @@ export default function TransactionsTable() { cell: ({ row }) => { const transaction = row.original; return ( - + ); }, }, @@ -530,14 +531,15 @@ export default function TransactionsTable() { transaction.transaction_currency, )}

- +