-
Notifications
You must be signed in to change notification settings - Fork 3
hide upload & download when bulk transactions selected #1069
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Greptile OverviewGreptile SummaryConditionally hides download and upload buttons when bulk transaction selection is active instead of just disabling them.
Confidence Score: 4/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant User
participant BankTransactionsHeader
participant BulkSelectionStore
participant DownloadButton
participant BankTransactionsHeaderMenu
User->>BankTransactionsHeader: Selects transactions (count > 0)
BankTransactionsHeader->>BulkSelectionStore: useCountSelectedIds()
BulkSelectionStore-->>BankTransactionsHeader: count > 0
BankTransactionsHeader->>BankTransactionsHeader: showBulkActions = true
alt showBulkActions is true
BankTransactionsHeader->>BankTransactionsHeader: Render BulkActionsModule
BankTransactionsHeader->>BankTransactionsHeader: Hide download/upload HStack (return null)
Note over DownloadButton,BankTransactionsHeaderMenu: Components not rendered
else showBulkActions is false
BankTransactionsHeader->>DownloadButton: Render with disabled=false
BankTransactionsHeader->>BankTransactionsHeaderMenu: Render with isDisabled=false
User->>DownloadButton: Click download
DownloadButton->>DownloadButton: Trigger download
User->>BankTransactionsHeaderMenu: Click menu
BankTransactionsHeaderMenu->>BankTransactionsHeaderMenu: Show menu options
end
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 file reviewed, 3 comments
| <DownloadButton | ||
| downloadButtonTextOverride={stringOverrides?.downloadButton} | ||
| iconOnly={listView} | ||
| disabled={showBulkActions} |
There was a problem hiding this comment.
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
| 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.| iconOnly={listView} | ||
| disabled={showBulkActions} | ||
| /> | ||
| <BankTransactionsHeaderMenu actions={headerMenuActions} isDisabled={showBulkActions} /> |
There was a problem hiding this comment.
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
| <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.| {showBulkActions | ||
| ? null | ||
| : ( |
There was a problem hiding this comment.
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
| {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.
src/styles/bank_transactions.scss
Outdated
| padding-left: 0; | ||
|
|
||
| // padding-right: var(--spacing-md); | ||
| // padding-left: var(--spacing-md); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Commented-out code appears accidentally committed
The commented-out padding-right and padding-left properties with var(--spacing-md) values appear to be accidentally left in the codebase. These look like the original values that were replaced with 0 but kept as comments, possibly for debugging or reference purposes. This clutters the stylesheet and may cause confusion about the intended styling.
Note
Hide download/upload controls when bulk selection is active and refine mobile header, list item, and bulk-actions spacing/styles.
download-uploadcontrols insrc/components/BankTransactions/BankTransactionsHeader.tsxwhen bulk selection (showBulkActions) is active; showBulkActionsModuleinstead.className='Layer__BulkActionsModule'to rootHStackinBulkActionsModule.tsx.bulkActionsModule.scss): new.Layer__BulkActionsModule { max-width: 100% }; make.Layer__BulkActionsModule__SelectedItemsContainernon-shrinking.BankTransactionsMobileBulkActionsHeader.tsx: reduce padding (pitoxs,pbstosm).bank_transactions.scss(<=760px): remove horizontal padding on.Layer__bank-transactions__header.bank_transactions_mobile_list.scss: set list item width to100%and margins to vertical only (var(--spacing-2xs) 0).Written by Cursor Bugbot for commit 949cc8e. This will update automatically on new commits. Configure here.