-
Notifications
You must be signed in to change notification settings - Fork 33
feat: DH-18960: Improve column selection functionality for large tables #2555
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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
99f661c
Mostly working
mattrunyon 78f684a
Remove unused unit tests
mattrunyon 407feff
Fin
mattrunyon a3791e0
Keyboard nav and fixing e2e tests
mattrunyon 9342bc6
Address review comments
mattrunyon 36b4ec4
Fix focus and popper opening after clicking outside window
mattrunyon be12676
Fix weird drag issue after moving a group
mattrunyon 8586324
Fix unit and e2e tests
mattrunyon d16e565
Update e2e snapshots
mattrunyon 9c9a161
Address review comment and add tests
mattrunyon 0a1102a
Add keyboard nav tests
mattrunyon 620dedb
Update package-lock after bumping peer dep
mattrunyon 3854c47
Fix ctrl+click dragging
mattrunyon 488c8af
Fix unit test
mattrunyon 3c222a5
Attempt to fix large drag positioning issues
mattrunyon 79e6552
Change DragOverlay to render TreeItem
mattrunyon 75c918b
Fix drop positioning
mattrunyon 03b6783
Fix unit test
mattrunyon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
packages/iris-grid/src/sidebar/visibility-ordering-builder/SearchItem.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| import React, { forwardRef, memo, useCallback } from 'react'; | ||
| import classNames from 'classnames'; | ||
| import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; | ||
| import { vsGripper } from '@deephaven/icons'; | ||
| import { Tooltip } from '@deephaven/components'; | ||
| import { type FlattenedIrisGridTreeItem } from './sortable-tree/utilities'; | ||
|
|
||
| type SearchItemProps = { | ||
| value: string; | ||
| item: FlattenedIrisGridTreeItem; | ||
| onClick: (name: string, event: React.MouseEvent<HTMLElement>) => void; | ||
| onKeyDown: (name: string, event: React.KeyboardEvent<HTMLElement>) => void; | ||
| handleProps?: Record<string, unknown>; | ||
| }; | ||
|
|
||
| const SearchItem = forwardRef<HTMLDivElement, SearchItemProps>( | ||
| function VisibilityOrderingItem(props, ref) { | ||
| const { value, item, onClick, onKeyDown, handleProps } = props; | ||
|
|
||
| const handleClick = useCallback( | ||
| (event: React.MouseEvent<HTMLElement>) => { | ||
| onClick(value, event); | ||
| }, | ||
| [onClick, value] | ||
| ); | ||
|
|
||
| const handleKeyDown = useCallback( | ||
| (event: React.KeyboardEvent<HTMLElement>) => { | ||
| onKeyDown(value, event); | ||
| }, | ||
| [onKeyDown, value] | ||
| ); | ||
|
|
||
| return ( | ||
| // eslint-disable-next-line jsx-a11y/no-static-element-interactions | ||
| <div | ||
| ref={ref} | ||
| className={classNames('tree-item', { | ||
| isSelected: item.selected, | ||
| })} | ||
| onClick={handleClick} | ||
| onKeyDownCapture={handleKeyDown} | ||
| data-index={item.index} | ||
| // eslint-disable-next-line react/jsx-props-no-spreading | ||
| {...handleProps} | ||
| > | ||
| <span title={value} className={classNames('column-name')}> | ||
| {value} | ||
| </span> | ||
| <div> | ||
| <Tooltip>Drag to re-order</Tooltip> | ||
| <FontAwesomeIcon icon={vsGripper} /> | ||
| </div> | ||
| </div> | ||
| ); | ||
| } | ||
| ); | ||
|
|
||
| const MemoizedSearchItem = memo(SearchItem); | ||
|
|
||
| export default MemoizedSearchItem; | ||
47 changes: 47 additions & 0 deletions
47
packages/iris-grid/src/sidebar/visibility-ordering-builder/SearchWithModal.scss
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| @import '../../IrisGrid.scss'; | ||
|
|
||
| .visibility-search-list { | ||
| width: 0.75 * $table-sidebar-max-width; | ||
| border: 1px solid var(--dh-color-popover-border); | ||
|
|
||
| .popper-arrow { | ||
| display: none; | ||
| } | ||
|
|
||
| .tree-item { | ||
| padding: $spacer-1; | ||
| } | ||
|
|
||
| .no-results { | ||
| padding: $spacer-1; | ||
| margin: auto; | ||
| color: var(--dh-color-text-disabled); | ||
| } | ||
| } | ||
|
|
||
| .visibility-search-list-inner { | ||
| display: flex; | ||
| flex-direction: column; | ||
| max-height: inherit; | ||
|
|
||
| .tree-container { | ||
| max-height: inherit; | ||
| padding: $spacer-1; | ||
| overflow: auto; | ||
| flex-grow: 1; | ||
| flex-shrink: 1; | ||
| } | ||
|
|
||
| .footer-buttons { | ||
| border-top: 1px solid var(--dh-color-popover-border); | ||
| flex-grow: 0; | ||
| flex-shrink: 0; | ||
| display: flex; | ||
| flex-direction: row; | ||
| justify-content: space-between; | ||
|
|
||
| & > * { | ||
| flex-grow: 1; | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.