Skip to content
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

[Maintenance] Cleanup react aria packages and dedupe #3450

Merged
merged 2 commits into from
Sep 16, 2024
Merged
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
10 changes: 3 additions & 7 deletions packages/desktop-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@
"devDependencies": {
"@juggle/resize-observer": "^3.4.0",
"@playwright/test": "1.41.1",
"@react-aria/focus": "^3.16.0",
"@react-aria/listbox": "^3.11.3",
"@react-aria/utils": "^3.23.0",
"@react-stately/collections": "^3.10.4",
"@react-stately/list": "^3.10.2",
"@rollup/plugin-inject": "^5.0.5",
"@svgr/cli": "^8.1.0",
"@swc/core": "^1.5.3",
Expand Down Expand Up @@ -54,8 +49,8 @@
"promise-retry": "^2.0.1",
"re-resizable": "^6.9.17",
"react": "18.2.0",
"react-aria": "^3.33.1",
"react-aria-components": "^1.2.1",
"react-aria": "^3.34.3",
"react-aria-components": "^1.3.3",
"react-dnd": "^16.0.1",
"react-dnd-html5-backend": "^16.0.1",
"react-dom": "18.2.0",
Expand All @@ -69,6 +64,7 @@
"react-router-dom": "6.21.3",
"react-simple-pull-to-refresh": "^1.3.3",
"react-spring": "^9.7.3",
"react-stately": "^3.10.9",
"react-virtualized-auto-sizer": "^1.0.21",
"recharts": "^2.10.4",
"redux": "^4.2.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React, { useState, useRef, useEffect, useReducer } from 'react';
import { FocusScope } from 'react-aria';
import { Form } from 'react-aria-components';
import { useHotkeys } from 'react-hotkeys-hook';
import { Trans, useTranslation } from 'react-i18next';

import { FocusScope } from '@react-aria/focus';
import {
parse as parseDate,
format as formatDate,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, { useRef } from 'react';

import { useListBox } from '@react-aria/listbox';
import { useListState } from '@react-stately/list';
import { useListBox } from 'react-aria';
import { useListState } from 'react-stately';

import { usePrevious } from '../../../hooks/usePrevious';
import { useScroll } from '../../ScrollProvider';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { useListBoxSection } from 'react-aria';

import { useListBoxSection } from '@react-aria/listbox';
import { css } from 'glamor';

import { styles, theme } from '../../../style';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import React, { useRef } from 'react';

import { useFocusRing } from '@react-aria/focus';
import { useOption } from '@react-aria/listbox';
import { mergeProps } from '@react-aria/utils';
import { useFocusRing, useOption, mergeProps } from 'react-aria';

import { theme } from '../../../style';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React, { memo } from 'react';
import { mergeProps } from 'react-aria';

import {
PressResponder,
usePress,
useLongPress,
} from '@react-aria/interactions';
import { mergeProps } from '@react-aria/utils';

import { getScheduledAmount } from 'loot-core/src/shared/schedules';
import { isPreviewId } from 'loot-core/src/shared/transactions';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import React, {
useState,
} from 'react';
import { useDispatch } from 'react-redux';

import { Item, Section } from '@react-stately/collections';
import { Item, Section } from 'react-stately';

import { setNotificationInset } from 'loot-core/client/actions';
import { groupById, integerToCurrency } from 'loot-core/shared/util';
Expand All @@ -28,7 +27,7 @@ import { AnimatedLoading } from '../../../icons/AnimatedLoading';
import { SvgDelete } from '../../../icons/v0';
import { SvgDotsHorizontalTriple } from '../../../icons/v1';
import { styles, theme } from '../../../style';
import { Button } from '../../common/Button';
import { Button } from '../../common/Button2';
import { Menu } from '../../common/Menu';
import { Popover } from '../../common/Popover';
import { Text } from '../../common/Text';
Expand Down Expand Up @@ -260,10 +259,10 @@ function SelectedTransactionsFloatingActionBar({ transactions, style }) {
}}
>
<Button
type="bare"
variant="bare"
{...buttonProps}
style={{ ...buttonProps.style, marginRight: 4 }}
onClick={() => {
onPress={() => {
if (selectedTransactions.size > 0) {
dispatchSelected({ type: 'select-none' });
}
Expand All @@ -285,10 +284,10 @@ function SelectedTransactionsFloatingActionBar({ transactions, style }) {
}}
>
<Button
type="bare"
variant="bare"
ref={editMenuTriggerRef}
aria-label="Edit fields"
onClick={() => {
onPress={() => {
setIsEditMenuOpen(true);
}}
{...buttonProps}
Expand Down Expand Up @@ -394,10 +393,10 @@ function SelectedTransactionsFloatingActionBar({ transactions, style }) {
</Popover>

<Button
type="bare"
variant="bare"
ref={moreOptionsMenuTriggerRef}
aria-label="More options"
onClick={() => {
onPress={() => {
setIsMoreOptionsMenuOpen(true);
}}
{...buttonProps}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,6 @@ function PayeeCell({
onUpdate={(id, value) => onUpdate?.(value)}
onSelect={onSave}
onManagePayees={() => onManagePayees(payee?.id)}
menuPortalTarget={undefined}
/>
)}
</CustomCell>
Expand Down
6 changes: 6 additions & 0 deletions upcoming-release-notes/3450.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
category: Maintenance
authors: [joel-jeremy]
---

Cleanup react-aria packages and dedupe packages.
Loading
Loading