A local-first personal finance app
:bug: (darkmode) fix more issues - transaction table and csv imports (#1541)
Matiss Janis Aboltinsfe8ed4e346fc
diff --git a/packages/desktop-client/src/components/budget/misc.js b/packages/desktop-client/src/components/budget/misc.jsindex aa625f2421..ff8be607a2 100644--- a/packages/desktop-client/src/components/budget/misc.js+++ b/packages/desktop-client/src/components/budget/misc.js@@ -437,7 +437,6 @@ function SidebarCategory({formatter={value => displayed}width="flex"exposed={editing || temporary}- borderColor={dragPreview ? 'transparent' : borderColor}onUpdate={value => {if (temporary) {if (value === '') {@@ -598,7 +597,6 @@ function SidebarGroup({formatter={value => displayed}width="flex"exposed={editing}- borderColor={colors.border}onUpdate={value => {if (temporary) {if (value === '') {diff --git a/packages/desktop-client/src/components/common/View.tsx b/packages/desktop-client/src/components/common/View.tsxindex 9229205afc..4133c2d352 100644--- a/packages/desktop-client/src/components/common/View.tsx+++ b/packages/desktop-client/src/components/common/View.tsx@@ -22,7 +22,7 @@ const View = (props: ViewProps) => {{...restProps}ref={innerRef}style={nativeStyle}- className={`view ${css([props.className, props.style])}`}+ className={`view ${props.className} ${css(props.style)}`}/>);};diff --git a/packages/desktop-client/src/components/modals/ImportTransactions.js b/packages/desktop-client/src/components/modals/ImportTransactions.jsindex 6ff4ea5b7c..760650c100 100644--- a/packages/desktop-client/src/components/modals/ImportTransactions.js+++ b/packages/desktop-client/src/components/modals/ImportTransactions.js@@ -275,7 +275,7 @@ function Transaction({return (<Row style={{ backgroundColor: 'white' }}>- <Field width={200} borderColor={colors.border}>+ <Field width={200}>{showParsed ? (<ParsedDateparseDateFormat={parseDateFormat}@@ -288,19 +288,17 @@ function Transaction({</Field><Fieldwidth="flex"- borderColor={colors.border}title={transaction.imported_payee || transaction.payee_name}>{transaction.payee_name}</Field>- <Field width="flex" borderColor={colors.border} title={transaction.notes}>+ <Field width="flex" title={transaction.notes}>{transaction.notes}</Field>{splitMode ? (<><Fieldwidth={90}- borderColor={colors.border}contentStyle={[{ textAlign: 'right' }, styles.tnum]}title={outflow}>@@ -308,7 +306,6 @@ function Transaction({</Field><Fieldwidth={90}- borderColor={colors.border}contentStyle={[{ textAlign: 'right' }, styles.tnum]}title={inflow}>@@ -318,7 +315,6 @@ function Transaction({) : (<Fieldwidth={90}- borderColor={colors.border}contentStyle={[{ textAlign: 'right' }, styles.tnum]}title={amount}>@@ -357,7 +353,7 @@ function SelectField({]),]}value={value === null ? 'choose-field' : value}- style={{ borderWidth: 1, width: '100%' }}+ style={{ width: '100%' }}wrapperStyle={style}onChange={value => onChange(value)}/>@@ -391,7 +387,7 @@ function DateFormatSelect({])}value={parseDateFormat || ''}onChange={value => onChange(value)}- style={{ borderWidth: 1, width: '100%' }}+ style={{ width: '100%' }}/></View>);@@ -930,7 +926,7 @@ export default function ImportTransactions({ modalProps, options }) {setCsvDelimiter(value);parse(filename, { delimiter: value, hasHeaderRow });}}- style={{ borderWidth: 1, width: 50 }}+ style={{ width: 50 }}/></label><CheckboxOptiondiff --git a/packages/desktop-client/src/components/table.tsx b/packages/desktop-client/src/components/table.tsxindex e5d712e7b2..9bbb2f2243 100644--- a/packages/desktop-client/src/components/table.tsx+++ b/packages/desktop-client/src/components/table.tsx@@ -506,6 +506,7 @@ type CellButtonProps = {onSelect?: (e) => void;onEdit?: () => void;children: ReactNode;+ className?: string;};export const CellButton = forwardRef<HTMLDivElement, CellButtonProps>((@@ -518,6 +519,7 @@ export const CellButton = forwardRef<HTMLDivElement, CellButtonProps>(onSelect,onEdit,children,+ className,},ref,) => {@@ -537,7 +539,7 @@ export const CellButton = forwardRef<HTMLDivElement, CellButtonProps>(return (<ViewinnerRef={ref}- className="cell-button"+ className={className}tabIndex={0}onKeyDown={e => {if (e.key === 'x' || e.key === ' ') {@@ -607,6 +609,7 @@ type SelectCellProps = Omit<ComponentProps<typeof Cell>, 'children'> & {partial?: boolean;onEdit?: () => void;onSelect?: (e) => void;+ buttonProps?: Partial<CellButtonProps>;};export function SelectCell({focused,@@ -614,6 +617,7 @@ export function SelectCell({style,onSelect,onEdit,+ buttonProps = {},...props}: SelectCellProps) {return (@@ -652,6 +656,7 @@ export function SelectCell({onEdit={onEdit}onSelect={onSelect}clickBehavior="none"+ {...buttonProps}>{selected && <Checkmark width={6} height={6} />}</CellButton>diff --git a/packages/desktop-client/src/components/transactions/TransactionsTable.js b/packages/desktop-client/src/components/transactions/TransactionsTable.jsindex d13bdef7b9..dcaa5b8cd7 100644--- a/packages/desktop-client/src/components/transactions/TransactionsTable.js+++ b/packages/desktop-client/src/components/transactions/TransactionsTable.js@@ -835,6 +835,12 @@ const Transaction = memo(function Transaction(props) {':hover': !(backgroundFocus || selected) && {backgroundColor: theme.tableRowBackgroundHover,},+ '& .hover-visible': {+ opacity: 0,+ },+ ':hover .hover-visible': {+ opacity: 1,+ },},highlighted || selected? { color: theme.tableRowBackgroundHighlightText }@@ -842,7 +848,7 @@ const Transaction = memo(function Transaction(props) {style,isPreview && {color: theme.tableTextInactive,- backgroundColor: '#fcfcfc',+ backgroundColor: !selected ? '#fcfcfc' : undefined,fontStyle: 'italic',},_unmatched && { opacity: 0.5 },@@ -886,7 +892,10 @@ const Transaction = memo(function Transaction(props) {) : (<SelectCell/* Checkmark field for non-child transaction */- exposed={selected || editing}+ exposed+ buttonProps={{+ className: selected || editing ? null : 'hover-visible',+ }}focused={focusedField === 'select'}onSelect={e => {dispatchSelected({ type: 'select', id: transaction.id, event: e });diff --git a/upcoming-release-notes/1541.md b/upcoming-release-notes/1541.mdnew file mode 100644index 0000000000..80345f4dc6--- /dev/null+++ b/upcoming-release-notes/1541.md@@ -0,0 +1,6 @@+---+category: Bugfix+authors: [MatissJanis]+---++Fix more darkmode regressions - transaction table, csv import modal