Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lelemm committed Aug 26, 2024
1 parent d489f62 commit 6df0e6a
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,7 @@ const Transaction = memo(function Transaction({
const { columnWidths, updateColumnWidth, resetColumnWidths } =
useColumnWidth();

const sidebar = useLocalPref('sidebarWidth');
const [sidebarWidth] = useLocalPref('sidebarWidth');

const checkColumnSizes = useCallback(() => {
setTimeout(() => {
Expand Down Expand Up @@ -1122,6 +1122,8 @@ const Transaction = memo(function Transaction({
const valueStyle = added ? { fontWeight: 600 } : null;
const backgroundFocus = focusedField === 'select';
const amountStyle = hideFraction ? { letterSpacing: -0.5 } : null;

Check warning on line 1125 in packages/desktop-client/src/components/transactions/TransactionsTable.jsx

View workflow job for this annotation

GitHub Actions / lint

Delete `··`
const maxWidthDynamic = - 10 - Math.floor((445 + (showBalance ? 103 : 0) + (showCleared ? 38 : 0) + sidebarWidth) / 4);

Check warning on line 1126 in packages/desktop-client/src/components/transactions/TransactionsTable.jsx

View workflow job for this annotation

GitHub Actions / lint

Replace `·-·10·-·Math.floor((445·+·(showBalance·?·103·:·0)·+·(showCleared·?·38·:·0)·+·sidebarWidth)·/·4` with `⏎····-10·-⏎····Math.floor(⏎······(445·+·(showBalance·?·103·:·0)·+·(showCleared·?·38·:·0)·+·sidebarWidth)·/⏎········4,⏎····`

const runningBalance = !isTemporaryId(id)
? balance
Expand Down Expand Up @@ -1305,7 +1307,7 @@ const Transaction = memo(function Transaction({
minWidth: columnWidths['account']
? `${columnWidths['account']}px`
: 'auto',
maxWidth: `calc(25vw - 10px - ${Math.floor((445 + (showBalance ? 103 : 0) + (showCleared ? 38 : 0) + sidebar) / 4)}px)`,
maxWidth: `calc(25vw -${maxWidthDynamic}px)`,
}}
textAlign="flex"
value={accountId}
Expand Down Expand Up @@ -1362,7 +1364,7 @@ const Transaction = memo(function Transaction({
: null
}
style={{
maxWidth: `calc(25vw - 10px - ${Math.floor((445 + (showBalance ? 103 : 0) + (showCleared ? 38 : 0) + sidebar) / 4)}px)`,
maxWidth: `calc(25vw -${maxWidthDynamic}px)`,
}}
focused={focusedField === 'payee'}
/* Filter out the account we're currently in as it is not a valid transfer */
Expand Down Expand Up @@ -1417,7 +1419,7 @@ const Transaction = memo(function Transaction({
alignItems: 'center',
justifyContent: 'flex-start',
height: '100%',
maxWidth: `calc(25vw - 10px - ${Math.floor((445 + (showBalance ? 103 : 0) + (showCleared ? 38 : 0) + sidebar) / 4)}px)`,
maxWidth: `calc(25vw -${maxWidthDynamic}px)`,
}}
plain
>
Expand Down Expand Up @@ -1525,7 +1527,7 @@ const Transaction = memo(function Transaction({
fontStyle: 'italic',
color: theme.pageTextSubdued,
fontWeight: 300,
maxWidth: `calc(25vw - 10px - ${Math.floor((445 + (showBalance ? 103 : 0) + (showCleared ? 38 : 0) + sidebar) / 4)}px)`,
maxWidth: `calc(25vw -${maxWidthDynamic}px)`,
}}
inputProps={{
readOnly: true,
Expand All @@ -1541,7 +1543,7 @@ const Transaction = memo(function Transaction({
textAlign="flex"
value={categoryId}
style={{
maxWidth: `calc(25vw - 10px - ${Math.floor((445 + (showBalance ? 103 : 0) + (showCleared ? 38 : 0) + sidebar) / 4)}px)`,
maxWidth: `calc(25vw -${maxWidthDynamic}px)`,
}}
formatter={value =>
value
Expand Down

0 comments on commit 6df0e6a

Please sign in to comment.