From 737d1aa98d04800377035d7d189219fefacfa23f Mon Sep 17 00:00:00 2001 From: Don Date: Tue, 14 Nov 2023 10:28:02 -0500 Subject: [PATCH] revert: feat: forward and back buttons for organize column search (#1640) This reverts commit 75cf184f4b4b9d9a771544ea6335e5d2733368d9. Auto-merge was to eager, I only approved for functionality not code reviewed. --- packages/components/src/SearchInput.scss | 27 --- packages/components/src/SearchInput.tsx | 88 +-------- .../VisibilityOrderingBuilder.test.tsx | 28 --- .../VisibilityOrderingBuilder.tsx | 173 +----------------- .../organize-columns-1-chromium-linux.png | Bin 18058 -> 17569 bytes .../organize-columns-1-firefox-linux.png | Bin 19079 -> 19478 bytes .../organize-columns-1-webkit-linux.png | Bin 14227 -> 14750 bytes 7 files changed, 13 insertions(+), 303 deletions(-) diff --git a/packages/components/src/SearchInput.scss b/packages/components/src/SearchInput.scss index 9508182233..ff93f1ca71 100644 --- a/packages/components/src/SearchInput.scss +++ b/packages/components/src/SearchInput.scss @@ -55,31 +55,4 @@ border-radius: 1rem; background-color: rgba($white, 0.25); } - - .search-change-selection { - position: absolute; - right: $spacer-1; - top: 15%; - bottom: 15%; - height: 70%; - } - - .search-change-button { - background: none; - border: none; - padding: 1px 2px; - } - - .search-change-text { - background-color: rgba($white, 0.2); - border-radius: 10px; - padding: 1px 5px; - } - - .match_count { - background-color: rgba($white, 0.2); - border-radius: 10px; - padding: 1px 5px; - margin: 0 5px; - } } diff --git a/packages/components/src/SearchInput.tsx b/packages/components/src/SearchInput.tsx index 4e1c66e972..165292d736 100644 --- a/packages/components/src/SearchInput.tsx +++ b/packages/components/src/SearchInput.tsx @@ -1,14 +1,9 @@ import React, { PureComponent } from 'react'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { vsArrowLeft, vsArrowRight, vsSearch } from '@deephaven/icons'; +import { vsSearch } from '@deephaven/icons'; import classNames from 'classnames'; -import Button from './Button'; import './SearchInput.scss'; -interface QueryParams { - queriedColumnIndex: number | undefined; - changeQueriedColumnIndex: (direction: 'forward' | 'back') => void; -} interface SearchInputProps { value: string; placeholder: string; @@ -20,7 +15,6 @@ interface SearchInputProps { matchCount: number; id: string; 'data-testid'?: string; - queryParams?: QueryParams; } class SearchInput extends PureComponent { @@ -33,40 +27,19 @@ class SearchInput extends PureComponent { }, id: '', 'data-testid': undefined, - queryParams: undefined, }; constructor(props: SearchInputProps) { super(props); this.inputField = React.createRef(); - this.searchChangeSelection = React.createRef(); - } - - componentDidMount(): void { - this.setInputPaddingRight(); } - componentDidUpdate(): void { - this.setInputPaddingRight(); - } + inputField: React.RefObject; focus(): void { this.inputField.current?.focus(); } - inputField: React.RefObject; - - searchChangeSelection: React.RefObject; - - setInputPaddingRight(): void { - const inputField = this.inputField.current; - const searchChangeSelection = this.searchChangeSelection.current; - if (inputField && searchChangeSelection) { - const paddingRight = searchChangeSelection.getBoundingClientRect().width; - inputField.style.paddingRight = `${paddingRight}px`; - } - } - render(): JSX.Element { const { value, @@ -79,47 +52,7 @@ class SearchInput extends PureComponent { id, onKeyDown, 'data-testid': dataTestId, - queryParams, } = this.props; - - let matchCountSection; - - if (queryParams && matchCount > 1) { - matchCountSection = ( - <> -