Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions src/components/BankTransactions/BankTransactionsHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -275,14 +275,19 @@ export const BankTransactionsHeader = ({
</HStack>
)}
<TransactionsSearch slot='search' isDisabled={showBulkActions} />
<HStack slot='download-upload' justify='center' gap='xs'>
<DownloadButton
downloadButtonTextOverride={stringOverrides?.downloadButton}
iconOnly={listView}
disabled={showBulkActions}
/>
<BankTransactionsHeaderMenu actions={headerMenuActions} isDisabled={showBulkActions} />
</HStack>

{showBulkActions
? null
: (
Comment on lines +279 to +281
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Use {!showBulkActions && (...)} instead of ternary for cleaner conditional rendering when one branch is null

Suggested change
{showBulkActions
? null
: (
{!showBulkActions && (
<HStack slot='download-upload' justify='center' gap='xs'>
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/components/BankTransactions/BankTransactionsHeader.tsx
Line: 279:281

Comment:
**style:** Use `{!showBulkActions && (...)}` instead of ternary for cleaner conditional rendering when one branch is null

```suggestion
        {!showBulkActions && (
          <HStack slot='download-upload' justify='center' gap='xs'>
```

How can I resolve this? If you propose a fix, please make it concise.

<HStack slot='download-upload' justify='center' gap='xs'>
<DownloadButton
downloadButtonTextOverride={stringOverrides?.downloadButton}
iconOnly={listView}
disabled={showBulkActions}
Copy link
Contributor

Choose a reason for hiding this comment

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

style: The disabled={showBulkActions} prop is redundant since this component won't render when showBulkActions is true

Suggested change
disabled={showBulkActions}
disabled={false}
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/components/BankTransactions/BankTransactionsHeader.tsx
Line: 286:286

Comment:
**style:** The `disabled={showBulkActions}` prop is redundant since this component won't render when `showBulkActions` is true

```suggestion
                disabled={false}
```

How can I resolve this? If you propose a fix, please make it concise.

/>
<BankTransactionsHeaderMenu actions={headerMenuActions} isDisabled={showBulkActions} />
Copy link
Contributor

Choose a reason for hiding this comment

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

style: The isDisabled={showBulkActions} prop is redundant since this component won't render when showBulkActions is true

Suggested change
<BankTransactionsHeaderMenu actions={headerMenuActions} isDisabled={showBulkActions} />
<BankTransactionsHeaderMenu actions={headerMenuActions} isDisabled={false} />
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/components/BankTransactions/BankTransactionsHeader.tsx
Line: 288:288

Comment:
**style:** The `isDisabled={showBulkActions}` prop is redundant since this component won't render when `showBulkActions` is true

```suggestion
              <BankTransactionsHeaderMenu actions={headerMenuActions} isDisabled={false} />
```

How can I resolve this? If you propose a fix, please make it concise.

</HStack>
)}
</BankTransactionsActions>
</Header>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ export const BankTransactionsMobileBulkActionsHeader = ({
return (
<HStack
gap='md'
pi='lg'
pbs='md'
pi='xs'
pbs='sm'
justify='space-between'
align='center'
>
Expand Down
2 changes: 1 addition & 1 deletion src/components/BulkActionsModule/BulkActionsModule.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const BulkActionsModule = ({ slots }: BulkActionsModuleProps) => {
const { count } = useCountSelectedIds()
const { clearSelection } = useBulkSelectionActions()
return (
<HStack slot='toggle' justify='space-between' align='center' gap='xs'>
<HStack slot='toggle' justify='space-between' align='center' gap='xs' className='Layer__BulkActionsModule'>
<HStack justify='space-between' align='center' pis='sm' pie='3xs' gap='3xs' className='Layer__BulkActionsModule__SelectedItemsContainer'>
<Span noWrap>
{`${count} selected`}
Expand Down
5 changes: 5 additions & 0 deletions src/components/BulkActionsModule/bulkActionsModule.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
.Layer__BulkActionsModule {
max-width: 100%;
}

.Layer__BulkActionsModule__SelectedItemsContainer {
flex-shrink: 0;
height: 2.25rem;
border-radius: var(--border-radius-2xs);
border: 1px solid var(--color-base-300);
Expand Down
2 changes: 2 additions & 0 deletions src/styles/bank_transactions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -839,6 +839,8 @@
position: sticky;
z-index: 2;
top: 0;
padding-right: 0;
padding-left: 0;
border-top-left-radius: var(--border-radius-sm);
border-top-right-radius: var(--border-radius-sm);
box-shadow: 0 -1px 0 0 rgb(23 51 45 / 16%) inset;
Expand Down
4 changes: 2 additions & 2 deletions src/styles/bank_transactions_mobile_list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@

.Layer__bank-transaction-mobile-list-item {
box-sizing: border-box;
width: 95%;
width: 100%;
padding: 0;
border-radius: var(--border-radius-sm);
border: 1px solid var(--border-color);
margin: var(--spacing-2xs) var(--spacing-md);
margin: var(--spacing-2xs) 0;
background: var(--color-base-0);
cursor: pointer;
user-select: none;
Expand Down