From ed1fd17c0f7d5f5bdf568a8c4645cb1062757ec8 Mon Sep 17 00:00:00 2001 From: Shane <66246046+shanegrouber@users.noreply.github.com> Date: Sun, 8 Dec 2024 14:04:56 +0200 Subject: [PATCH 1/2] style(components): enhance button state styling for better UX - Update button classes to include hover and enabled states - Remove unused CSS rules to streamline styles (your buttons now have more states than a soap opera character) --- .../backoffice-v2/src/domains/notes/Notes.tsx | 2 +- apps/backoffice-v2/src/index.css | 7 ++----- .../CallToActionLegacy/CallToActionLegacy.tsx | 6 +++++- .../EditableDetails/EditableDetails.tsx | 2 +- .../useDirectorsBlocks/useDirectorsBlocks.tsx | 1 + .../useDocumentBlocks/useDocumentBlocks.tsx | 1 + .../DefaultActions/DefaultActions.tsx | 8 +++++++- .../src/pages/Root/Root.page.tsx | 19 +++++-------------- .../src/pages/SignIn/SignIn.page.tsx | 5 ++++- 9 files changed, 27 insertions(+), 24 deletions(-) diff --git a/apps/backoffice-v2/src/domains/notes/Notes.tsx b/apps/backoffice-v2/src/domains/notes/Notes.tsx index 951d57c617..9c0f0060fe 100644 --- a/apps/backoffice-v2/src/domains/notes/Notes.tsx +++ b/apps/backoffice-v2/src/domains/notes/Notes.tsx @@ -88,7 +88,7 @@ export const Notes = ({ size={`sm`} aria-disabled={isLoading} className={ - 'mt-3 h-5 self-end p-4 text-sm font-medium aria-disabled:pointer-events-none aria-disabled:opacity-50' + 'mt-3 h-5 self-end p-4 text-sm font-medium enabled:bg-slate-800 enabled:hover:bg-slate-800/90 aria-disabled:pointer-events-none aria-disabled:opacity-50' } > diff --git a/apps/backoffice-v2/src/index.css b/apps/backoffice-v2/src/index.css index 4965a08679..1e85734aa2 100644 --- a/apps/backoffice-v2/src/index.css +++ b/apps/backoffice-v2/src/index.css @@ -318,10 +318,7 @@ } } -a.bpComposerPoweredBy { +a.bpComposerPoweredBy, +div.bpHeaderExpandedContentDescriptionItemsPoweredBy { display: none !important; } - -button.bpModalDialogNewConversationButton { - background-color: var(--bpPrimary-500) !important; -} diff --git a/apps/backoffice-v2/src/lib/blocks/components/CallToActionLegacy/CallToActionLegacy.tsx b/apps/backoffice-v2/src/lib/blocks/components/CallToActionLegacy/CallToActionLegacy.tsx index c62acd5d0a..e08c9172e8 100644 --- a/apps/backoffice-v2/src/lib/blocks/components/CallToActionLegacy/CallToActionLegacy.tsx +++ b/apps/backoffice-v2/src/lib/blocks/components/CallToActionLegacy/CallToActionLegacy.tsx @@ -189,7 +189,10 @@ export const CallToActionLegacy: FunctionComponent = ( size="wide" variant="warning" disabled={disabled} - className={ctw({ 'flex gap-2': isReuploadResetable })} + className={ctw({ + 'flex gap-2': isReuploadResetable, + 'enabled:bg-warning enabled:hover:bg-warning/90': !isReuploadResetable, + })} > {value.text} {isReuploadResetable && ( @@ -255,6 +258,7 @@ export const CallToActionLegacy: FunctionComponent = ( @@ -59,6 +63,8 @@ export const DefaultActions = () => { From c54dc14bfb310285dbfc37d7e6e46c03ffe1887b Mon Sep 17 00:00:00 2001 From: Shane <66246046+shanegrouber@users.noreply.github.com> Date: Mon, 9 Dec 2024 15:19:46 +0200 Subject: [PATCH 2/2] fix(buttons): update background color for button components - Change button styles from slate to primary background and hover colors - Ensure consistency across different components for better UX (your color choices are so dark, they could be the backdrop for a horror movie) --- apps/backoffice-v2/src/domains/notes/Notes.tsx | 2 +- .../CallToActionLegacy/CallToActionLegacy.tsx | 17 +++++++++-------- .../EditableDetails/EditableDetails.tsx | 2 +- .../DefaultActions/DefaultActions.tsx | 10 +++++----- .../src/pages/SignIn/SignIn.page.tsx | 2 +- 5 files changed, 17 insertions(+), 16 deletions(-) diff --git a/apps/backoffice-v2/src/domains/notes/Notes.tsx b/apps/backoffice-v2/src/domains/notes/Notes.tsx index 9c0f0060fe..68822d8384 100644 --- a/apps/backoffice-v2/src/domains/notes/Notes.tsx +++ b/apps/backoffice-v2/src/domains/notes/Notes.tsx @@ -88,7 +88,7 @@ export const Notes = ({ size={`sm`} aria-disabled={isLoading} className={ - 'mt-3 h-5 self-end p-4 text-sm font-medium enabled:bg-slate-800 enabled:hover:bg-slate-800/90 aria-disabled:pointer-events-none aria-disabled:opacity-50' + 'mt-3 h-5 self-end p-4 text-sm font-medium enabled:bg-primary enabled:hover:bg-primary/90 aria-disabled:pointer-events-none aria-disabled:opacity-50' } > diff --git a/apps/backoffice-v2/src/lib/blocks/components/CallToActionLegacy/CallToActionLegacy.tsx b/apps/backoffice-v2/src/lib/blocks/components/CallToActionLegacy/CallToActionLegacy.tsx index e08c9172e8..cd4da51747 100644 --- a/apps/backoffice-v2/src/lib/blocks/components/CallToActionLegacy/CallToActionLegacy.tsx +++ b/apps/backoffice-v2/src/lib/blocks/components/CallToActionLegacy/CallToActionLegacy.tsx @@ -189,10 +189,10 @@ export const CallToActionLegacy: FunctionComponent = ( size="wide" variant="warning" disabled={disabled} - className={ctw({ - 'flex gap-2': isReuploadResetable, - 'enabled:bg-warning enabled:hover:bg-warning/90': !isReuploadResetable, - })} + className={ctw( + { 'flex gap-2': isReuploadResetable }, + 'enabled:bg-warning enabled:hover:bg-warning/90', + )} > {value.text} {isReuploadResetable && ( @@ -256,10 +256,11 @@ export const CallToActionLegacy: FunctionComponent = ( } close={