A local-first personal finance app
Remove glamor css (#1637)
Joel Jeremy Marquez15ab80a47569
diff --git a/packages/desktop-client/src/components/AppBackground.tsx b/packages/desktop-client/src/components/AppBackground.tsxindex 1af44ea58b..b23e84af6a 100644--- a/packages/desktop-client/src/components/AppBackground.tsx+++ b/packages/desktop-client/src/components/AppBackground.tsx@@ -21,7 +21,7 @@ function AppBackground({ initializing, loadingText }: AppBackgroundProps) {{(loadingText != null || initializing) && (<View- {...css({+ className={`${css({position: 'absolute',top: 0,left: 0,@@ -30,7 +30,7 @@ function AppBackground({ initializing, loadingText }: AppBackgroundProps) {paddingTop: 200,color: theme.pageText,alignItems: 'center',- })}+ })}`}><Block style={{ marginBottom: 20, fontSize: 18 }}>{loadingText}diff --git a/packages/desktop-client/src/components/NotesButton.tsx b/packages/desktop-client/src/components/NotesButton.tsxindex e49c57c43d..ac46eed8bb 100644--- a/packages/desktop-client/src/components/NotesButton.tsx+++ b/packages/desktop-client/src/components/NotesButton.tsx@@ -109,13 +109,13 @@ function NotesTooltip({{editable ? (<textarearef={inputRef}- {...css({+ className={`${css({border: '1px solid ' + colors.border,padding: 7,minWidth: 350,minHeight: 120,outline: 'none',- })}+ })}`}value={notes || ''}onChange={e => setNotes(e.target.value)}placeholder="Notes (markdown supported)"diff --git a/packages/desktop-client/src/components/autocomplete/Autocomplete.tsx b/packages/desktop-client/src/components/autocomplete/Autocomplete.tsxindex 7dd2f084a7..7f8365474f 100644--- a/packages/desktop-client/src/components/autocomplete/Autocomplete.tsx+++ b/packages/desktop-client/src/components/autocomplete/Autocomplete.tsx@@ -117,14 +117,14 @@ function defaultRenderItems(items, getItemProps, highlightedIndex) {// * https://github.com/WebKit/WebKit/blob/58956cf59ba01267644b5e8fe766efa7aa6f0c5c/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm#L783role="button"key={name}- {...css({+ className={`${css({padding: 5,cursor: 'default',backgroundColor:highlightedIndex === index? theme.alt2MenuItemBackgroundHover: null,- })}+ })}`}>{name}</div>@@ -384,10 +384,7 @@ function SingleAutocomplete({// Super annoying but it works best to return a div so we// can't use a View here, but we can fake it be using the// className- <div- className={'view ' + css({ display: 'flex' }).toString()}- {...containerProps}- >+ <div className={`view ${css({ display: 'flex' })}`} {...containerProps}>{renderInput(getInputProps({focused,diff --git a/packages/desktop-client/src/components/budget/BudgetSummaries.js b/packages/desktop-client/src/components/budget/BudgetSummaries.jsindex 9d512ec064..e8cf86ddd3 100644--- a/packages/desktop-client/src/components/budget/BudgetSummaries.js+++ b/packages/desktop-client/src/components/budget/BudgetSummaries.js@@ -60,13 +60,13 @@ export default function BudgetSummaries({ SummaryComponent }) {return (<div- {...css([+ className={`${css([{ flex: 1, overflow: 'hidden' },months.length === 1 && {marginLeft: -4,marginRight: -4,},- ])}+ ])}`}ref={containerRef}><animated.divdiff --git a/packages/desktop-client/src/components/budget/report/BudgetSummary.tsx b/packages/desktop-client/src/components/budget/report/BudgetSummary.tsxindex de2da31c16..82c5cc0f2f 100644--- a/packages/desktop-client/src/components/budget/report/BudgetSummary.tsx+++ b/packages/desktop-client/src/components/budget/report/BudgetSummary.tsx@@ -277,12 +277,12 @@ function Saved({ projected, style }: SavedProps) {}}><View- {...css([+ className={`${css([{fontSize: 25,color: projected ? colors.y3 : isNegative ? colors.r4 : colors.p5,},- ])}+ ])}`}><PrivacyFilter blurIntensity={7}>{format(saved, 'financial')}@@ -368,7 +368,7 @@ export function BudgetSummary({ month }: BudgetSummaryProps) {</View><div- {...css([+ className={`${css([{textAlign: 'center',marginTop: 3,@@ -377,7 +377,7 @@ export function BudgetSummary({ month }: BudgetSummaryProps) {textDecorationSkip: 'ink',},currentMonth === month && { textDecoration: 'underline' },- ])}+ ])}`}>{monthUtils.format(month, 'MMMM')}</div>diff --git a/packages/desktop-client/src/components/budget/rollover/BudgetSummary.tsx b/packages/desktop-client/src/components/budget/rollover/BudgetSummary.tsxindex c6778fd83e..f137a857e8 100644--- a/packages/desktop-client/src/components/budget/rollover/BudgetSummary.tsx+++ b/packages/desktop-client/src/components/budget/rollover/BudgetSummary.tsx@@ -180,7 +180,7 @@ function ToBudget({<BlockonClick={() => setMenuOpen('actions')}data-cellname={sheetName}- {...css([+ className={`${css([styles.veryLargeText,{fontWeight: 400,@@ -193,7 +193,7 @@ function ToBudget({borderColor: isNegative ? colors.r4 : colors.p5,},},- ])}+ ])}`}>{format(num, 'financial')}</Block>@@ -337,7 +337,7 @@ export function BudgetSummary({</View><div- {...css([+ className={`${css([{textAlign: 'center',marginTop: 3,@@ -346,7 +346,7 @@ export function BudgetSummary({textDecorationSkip: 'ink',},currentMonth === month && { fontWeight: 'bold' },- ])}+ ])}`}>{monthUtils.format(month, 'MMMM')}</div>diff --git a/packages/desktop-client/src/components/common/AnchorLink.tsx b/packages/desktop-client/src/components/common/AnchorLink.tsxindex c513747707..c1ea474938 100644--- a/packages/desktop-client/src/components/common/AnchorLink.tsx+++ b/packages/desktop-client/src/components/common/AnchorLink.tsx@@ -23,7 +23,11 @@ export default function AnchorLink({return (<NavLinkto={to}- {...css([styles.smallText, style, match ? activeStyle : null])}+ className={`${css([+ styles.smallText,+ style,+ match ? activeStyle : null,+ ])}`}>{children}</NavLink>diff --git a/packages/desktop-client/src/components/common/Block.tsx b/packages/desktop-client/src/components/common/Block.tsxindex 6d69ba1fdd..4a4db9b968 100644--- a/packages/desktop-client/src/components/common/Block.tsx+++ b/packages/desktop-client/src/components/common/Block.tsx@@ -7,12 +7,12 @@ type BlockProps = HTMLProps<HTMLDivElement> & {};export default function Block(props: BlockProps) {- const { style, innerRef, ...restProps } = props;+ const { className = '', style, innerRef, ...restProps } = props;return (<div{...restProps}ref={innerRef}- className={`${props.className || ''} ${css(props.style)}`}+ className={`${className} ${css(style)}`}/>);}diff --git a/packages/desktop-client/src/components/common/InlineField.tsx b/packages/desktop-client/src/components/common/InlineField.tsxindex 2fc45fa632..285191ff87 100644--- a/packages/desktop-client/src/components/common/InlineField.tsx+++ b/packages/desktop-client/src/components/common/InlineField.tsx@@ -21,7 +21,7 @@ export default function InlineField({}: InlineFieldProps) {return (<label- {...css(+ className={`${css({display: 'flex',flexDirection: 'row',@@ -30,7 +30,7 @@ export default function InlineField({width,},style,- )}+ )}`}><divstyle={{diff --git a/packages/desktop-client/src/components/common/Input.tsx b/packages/desktop-client/src/components/common/Input.tsxindex f31ac0bac9..6e0cbbcda9 100644--- a/packages/desktop-client/src/components/common/Input.tsx+++ b/packages/desktop-client/src/components/common/Input.tsx@@ -43,7 +43,7 @@ export default function Input({return (<inputref={inputRef ? mergeRefs([inputRef, ref]) : ref}- {...css(+ className={`${css(defaultInputStyle,{whiteSpace: 'nowrap',@@ -57,7 +57,7 @@ export default function Input({},styles.smallText,style,- )}+ )}`}{...nativeProps}onKeyDown={e => {if (e.key === 'Enter' && onEnter) {diff --git a/packages/desktop-client/src/components/common/LinkButton.tsx b/packages/desktop-client/src/components/common/LinkButton.tsxindex 8c64d45214..e5f1ba8a1a 100644--- a/packages/desktop-client/src/components/common/LinkButton.tsx+++ b/packages/desktop-client/src/components/common/LinkButton.tsx@@ -14,7 +14,7 @@ export default function LinkButton({return (<buttontype="button"- {...css([+ className={`${css([{textDecoration: 'none',color: theme.pageTextLink,@@ -34,7 +34,7 @@ export default function LinkButton({},styles.smallText,style,- ])}+ ])}`}{...nativeProps}>{children}diff --git a/packages/desktop-client/src/components/common/Paragraph.tsx b/packages/desktop-client/src/components/common/Paragraph.tsxindex df3553f1b6..ebbe8b37a7 100644--- a/packages/desktop-client/src/components/common/Paragraph.tsx+++ b/packages/desktop-client/src/components/common/Paragraph.tsx@@ -18,7 +18,9 @@ export default function Paragraph({return (<div{...props}- {...css(!isLast && { marginBottom: 15 }, style, { lineHeight: '1.5em' })}+ className={`${css(!isLast && { marginBottom: 15 }, style, {+ lineHeight: '1.5em',+ })}`}>{children}</div>diff --git a/packages/desktop-client/src/components/common/Select.tsx b/packages/desktop-client/src/components/common/Select.tsxindex 6d1bfd3221..a89b5f7700 100644--- a/packages/desktop-client/src/components/common/Select.tsx+++ b/packages/desktop-client/src/components/common/Select.tsx@@ -65,7 +65,10 @@ export default function Select<Value extends string>({}}><ListboxButton- {...css([{ borderWidth: 0, padding: 5, borderRadius: 4 }, style])}+ className={`${css([+ { borderWidth: 0, padding: 5, borderRadius: 4 },+ style,+ ])}`}arrow={<ExpandArrowstyle={{@@ -100,7 +103,7 @@ export default function Select<Value extends string>({boxShadow: styles.cardShadow,border: '1px solid ' + theme.menuBorder,}}- {...css({+ className={`${css({'[data-reach-listbox-option]': {background: theme.menuItemBackground,color: theme.menuItemText,@@ -109,7 +112,7 @@ export default function Select<Value extends string>({background: theme.menuItemBackgroundHover,color: theme.menuItemTextHover,},- })}+ })}`}>{!line ? (<ListboxList style={{ maxHeight: 250, overflowY: 'auto' }}>diff --git a/packages/desktop-client/src/components/common/Text.tsx b/packages/desktop-client/src/components/common/Text.tsxindex 296385bee3..5ded8e2568 100644--- a/packages/desktop-client/src/components/common/Text.tsx+++ b/packages/desktop-client/src/components/common/Text.tsx@@ -12,12 +12,12 @@ type TextProps = HTMLProps<HTMLSpanElement> & {};const Text = (props: TextProps) => {- const { style, innerRef, ...restProps } = props;+ const { className = '', style, innerRef, ...restProps } = props;return (<span{...restProps}ref={innerRef}- className={`${props.className} ${css(props.style)}`}+ className={`${className} ${css(style)}`}/>);};diff --git a/packages/desktop-client/src/components/common/View.tsx b/packages/desktop-client/src/components/common/View.tsxindex 6b892f7909..5212bb7758 100644--- a/packages/desktop-client/src/components/common/View.tsx+++ b/packages/desktop-client/src/components/common/View.tsx@@ -21,13 +21,13 @@ const View = (props: ViewProps) => {// everywhere and we can avoid any perf penalty that glamor would// incur.- const { style, nativeStyle, innerRef, className = '', ...restProps } = props;+ const { className = '', style, nativeStyle, innerRef, ...restProps } = props;return (<div{...restProps}ref={innerRef}style={nativeStyle}- className={`view ${className} ${css(props.style)}`}+ className={`view ${className} ${css(style)}`}/>);};diff --git a/packages/desktop-client/src/components/forms.tsx b/packages/desktop-client/src/components/forms.tsxindex a3ad654afa..516668b33e 100644--- a/packages/desktop-client/src/components/forms.tsx+++ b/packages/desktop-client/src/components/forms.tsx@@ -73,7 +73,7 @@ export const Checkbox = (props: CheckboxProps) => {<inputtype="checkbox"{...props}- {...css(+ className={`${css([{position: 'relative',@@ -120,7 +120,7 @@ export const Checkbox = (props: CheckboxProps) => {},],props.style,- )}+ )}`}/>);};diff --git a/packages/desktop-client/src/components/mobile/MobileForms.js b/packages/desktop-client/src/components/mobile/MobileForms.jsindex bf9b020205..4114b2571f 100644--- a/packages/desktop-client/src/components/mobile/MobileForms.js+++ b/packages/desktop-client/src/components/mobile/MobileForms.js@@ -117,12 +117,12 @@ export function BooleanField({ checked, onUpdate, style }) {type="checkbox"checked={checked}onChange={e => onUpdate(e.target.checked)}- {...css([+ className={`${css([{marginInline: EDITING_PADDING,},style,- ])}+ ])}`}/>);}diff --git a/packages/desktop-client/src/components/modals/CreateEncryptionKey.js b/packages/desktop-client/src/components/modals/CreateEncryptionKey.jsindex 8f312e40b6..0012680877 100644--- a/packages/desktop-client/src/components/modals/CreateEncryptionKey.js+++ b/packages/desktop-client/src/components/modals/CreateEncryptionKey.js@@ -69,7 +69,12 @@ export default function CreateEncryptionKey({</ExternalLink></Paragraph><Paragraph>- <ul {...css({ marginTop: 0, '& li': { marginBottom: 8 } })}>+ <ul+ className={`${css({+ marginTop: 0,+ '& li': { marginBottom: 8 },+ })}`}+ ><li><strong>Important:</strong> if you forget this password{' '}<em>and</em> you don’t have any local copies of your data,diff --git a/packages/desktop-client/src/components/reports/Tooltip.js b/packages/desktop-client/src/components/reports/Tooltip.jsindex 9b1d8c83c4..966e2233a5 100644--- a/packages/desktop-client/src/components/reports/Tooltip.js+++ b/packages/desktop-client/src/components/reports/Tooltip.js@@ -43,7 +43,7 @@ class Tooltip extends Component {return ReactDOM.createPortal(<div- {...css(+ className={`${css({position: 'absolute',top: 0,@@ -75,7 +75,7 @@ class Tooltip extends Component {content: '" "',}),style,- )}+ )}`}>{datum.premadeLabel}</div>,diff --git a/packages/desktop-client/src/components/settings/UI.tsx b/packages/desktop-client/src/components/settings/UI.tsxindex e5eb6e78b7..aaa205206d 100644--- a/packages/desktop-client/src/components/settings/UI.tsx+++ b/packages/desktop-client/src/components/settings/UI.tsx@@ -17,7 +17,7 @@ type SettingProps = {export const Setting = ({ primaryAction, style, children }: SettingProps) => {return (<View- {...css([+ className={`${css([{backgroundColor: colors.n9,alignSelf: 'flex-start',@@ -28,7 +28,7 @@ export const Setting = ({ primaryAction, style, children }: SettingProps) => {width: '100%',},style,- ])}+ ])}`}><Viewstyle={{diff --git a/packages/desktop-client/src/components/sidebar/Account.tsx b/packages/desktop-client/src/components/sidebar/Account.tsxindex d4ec0e00db..6e05a4c6f8 100644--- a/packages/desktop-client/src/components/sidebar/Account.tsx+++ b/packages/desktop-client/src/components/sidebar/Account.tsx@@ -120,8 +120,7 @@ function Account({}}><div- className="dot"- {...css({+ className={`dot ${css({marginRight: 3,width: 5,height: 5,@@ -130,7 +129,7 @@ function Account({marginLeft: 2,transition: 'transform .3s',opacity: connected ? 1 : 0,- })}+ })}`}/></View>diff --git a/packages/desktop-client/src/components/tooltips.js b/packages/desktop-client/src/components/tooltips.jsindex 3fa898a400..d3b667c9a9 100644--- a/packages/desktop-client/src/components/tooltips.js+++ b/packages/desktop-client/src/components/tooltips.js@@ -313,7 +313,7 @@ export class Tooltip extends Component {<div ref={el => (this.target = el)}>{ReactDOM.createPortal(<div- {...css(contentStyle, style, styles.darkScrollbar)}+ className={`${css(contentStyle, style, styles.darkScrollbar)}`}ref={this.contentRef}data-testid={this.props['data-testid'] || 'tooltip'}data-istooltipdiff --git a/packages/desktop-client/src/components/transactions/MobileTransaction.js b/packages/desktop-client/src/components/transactions/MobileTransaction.jsindex 0ec5d17d62..a5d0cb536b 100644--- a/packages/desktop-client/src/components/transactions/MobileTransaction.js+++ b/packages/desktop-client/src/components/transactions/MobileTransaction.js@@ -1189,7 +1189,7 @@ function ListBoxSection({ section, state }) {{section.rendered && (<div{...headingProps}- {...css(styles.smallText, {+ className={`${css(styles.smallText, {backgroundColor: colors.n10,borderBottom: `1px solid ${colors.n9}`,borderTop: `1px solid ${colors.n9}`,@@ -1202,7 +1202,7 @@ function ListBoxSection({ section, state }) {top: '0',width: '100%',zIndex: zIndices.SECTION_HEADING,- })}+ })}`}>{section.rendered}</div>diff --git a/packages/desktop-client/src/icons/AnimatedLoading.js b/packages/desktop-client/src/icons/AnimatedLoading.jsindex 027e99ace0..803c86f1c6 100644--- a/packages/desktop-client/src/icons/AnimatedLoading.js+++ b/packages/desktop-client/src/icons/AnimatedLoading.js@@ -12,13 +12,13 @@ const rotation = css.keyframes({function AnimatedLoading(props) {return (<span- {...css({+ className={`${css({animationName: rotation,animationDuration: '1.6s',animationTimingFunction: 'cubic-bezier(0.17, 0.67, 0.83, 0.67)',animationIterationCount: 'infinite',lineHeight: 0,- })}+ })}`}><Loading {...props} /></span>diff --git a/upcoming-release-notes/1637.md b/upcoming-release-notes/1637.mdnew file mode 100644index 0000000000..b409429bdd--- /dev/null+++ b/upcoming-release-notes/1637.md@@ -0,0 +1,6 @@+---+category: Maintenance+authors: [joel-jeremy]+---++Remove glamor ...css syntax.