Skip to content

Commit

Permalink
🔥 remove new autocomplete experiment (react-select) (#924)
Browse files Browse the repository at this point in the history
Removing `react-select` and the new autocomplete. This experiment has
failed, so cleaning things up now.
  • Loading branch information
MatissJanis authored Apr 19, 2023
1 parent 10559a6 commit eed097d
Show file tree
Hide file tree
Showing 23 changed files with 125 additions and 971 deletions.
1 change: 0 additions & 1 deletion packages/desktop-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
"react-router-dom": "5.2.0",
"react-router-dom-v5-compat": "^6.4.1",
"react-scripts": "^5.0.1",
"react-select": "^5.7.0",
"react-spring": "^8.0.27",
"react-virtualized-auto-sizer": "^1.0.2",
"redux": "^4.0.5",
Expand Down
3 changes: 0 additions & 3 deletions packages/desktop-client/src/components/Modals.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ function Modals({
budgetId,
actions,
}) {
const isNewAutocompleteEnabled = useFeatureFlag('newAutocomplete');
const isGoalTemplatesEnabled = useFeatureFlag('goalTemplatesEnabled');

const syncServerStatus = useSyncServerStatus();
Expand Down Expand Up @@ -276,7 +275,6 @@ function Modals({
actions={actions}
name={options.name}
onSubmit={options.onSubmit}
isNewAutocompleteEnabled={isNewAutocompleteEnabled}
/>
);
}}
Expand All @@ -288,7 +286,6 @@ function Modals({
modalProps={modalProps}
month={options.month}
actions={actions}
isNewAutocompleteEnabled={isNewAutocompleteEnabled}
isGoalTemplatesEnabled={isGoalTemplatesEnabled}
/>
</Route>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import {
titleFirst,
} from 'loot-core/src/shared/util';

import useFeatureFlag from '../../hooks/useFeatureFlag';
import { useMergedRefs } from '../../hooks/useMergedRefs';
import usePrevious from '../../hooks/usePrevious';
import { useSelectedDispatch, useSelectedItems } from '../../hooks/useSelected';
Expand All @@ -48,12 +47,9 @@ import ArrowsSynchronize from '../../icons/v2/ArrowsSynchronize';
import CalendarIcon from '../../icons/v2/Calendar';
import Hyperlink2 from '../../icons/v2/Hyperlink2';
import { styles, colors } from '../../style';
import LegacyAccountAutocomplete from '../autocomplete/AccountAutocomplete';
import NewCategoryAutocomplete from '../autocomplete/CategoryAutocomplete';
import LegacyCategoryAutocomplete from '../autocomplete/CategorySelect';
import NewAccountAutocomplete from '../autocomplete/NewAccountAutocomplete';
import NewPayeeAutocomplete from '../autocomplete/NewPayeeAutocomplete';
import LegacyPayeeAutocomplete from '../autocomplete/PayeeAutocomplete';
import AccountAutocomplete from '../autocomplete/AccountAutocomplete';
import CategoryAutocomplete from '../autocomplete/CategorySelect';
import PayeeAutocomplete from '../autocomplete/PayeeAutocomplete';
import { View, Text, Tooltip, Button } from '../common';
import { getStatusProps } from '../schedules/StatusBadge';
import DateSelect from '../select/DateSelect';
Expand Down Expand Up @@ -394,7 +390,6 @@ function PayeeCell({
onCreatePayee,
onManagePayees,
}) {
const isNewAutocompleteEnabled = useFeatureFlag('newAutocomplete');
let isCreatingPayee = useRef(false);

// Filter out the account we're currently in as it is not a valid transfer
Expand Down Expand Up @@ -428,9 +423,6 @@ function PayeeCell({
shouldSaveFromKey,
inputStyle,
}) => {
const PayeeAutocomplete = isNewAutocompleteEnabled
? NewPayeeAutocomplete
: LegacyPayeeAutocomplete;
return (
<>
<PayeeAutocomplete
Expand Down Expand Up @@ -531,14 +523,6 @@ export const Transaction = React.memo(function Transaction(props) {
onToggleSplit,
} = props;

const isNewAutocompleteEnabled = useFeatureFlag('newAutocomplete');
const AccountAutocomplete = isNewAutocompleteEnabled
? NewAccountAutocomplete
: LegacyAccountAutocomplete;
const CategoryAutocomplete = isNewAutocompleteEnabled
? NewCategoryAutocomplete
: LegacyCategoryAutocomplete;

let dispatchSelected = useSelectedDispatch();

let [prevShowZero, setPrevShowZero] = useState(showZeroInDeposit);
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit eed097d

Please sign in to comment.