-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Updating column resize to support mode where resizer is always visible #4077
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 all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
02c2487
Updating column resize to support mode where resizer is always visible
LFDanLu a00fa21
update to match latest changes to api
LFDanLu c270a5a
mimic docs example
LFDanLu f6a3d07
forgot to clean up some things
LFDanLu cc62d52
pulling in code changes from docs PR
LFDanLu caefaf7
remove sorting story and cleanup
LFDanLu 01f2d31
starting resize on press for indicator
LFDanLu 5daa07a
using triggerRef existance to determine if behavior is resize on focus
LFDanLu 9834b8b
fixing test
LFDanLu d84ac1d
make resizer single line for focus
LFDanLu 460bb5f
Merge branch 'main' into updates_to_column_resizing
LFDanLu 935fe4a
nit reorganizing
LFDanLu 8c85bd1
Merge branch 'updates_to_column_resizing' of github.com:adobe/react-s…
LFDanLu 5a6741c
mimic docs example
LFDanLu 7b8aaf4
adding description for keyboard users for Enter to start resizing
LFDanLu 1f4213f
fixing issue where tab wasnt exiting the table when focused on the re…
LFDanLu 2bc566f
adding min width for columns to avoid weirdness with trying to collap…
LFDanLu 54b7327
fix lint
LFDanLu dc7aaa6
propagate all keydown events if we arent in resize mode and have alwa…
LFDanLu c2a8a7f
removing ref read in render
LFDanLu e1b1abf
add aria description to input for virtual modality too
LFDanLu cf63a95
addressing review comments
LFDanLu 3503d2e
Merge branch 'main' of github.com:adobe/react-spectrum into updates_t…
LFDanLu f44068d
prevent extraneous scrolling when keyboard navigating to the resizer
LFDanLu 60a66c5
address review comments
LFDanLu b228c3a
fix logic
LFDanLu 605bd5f
Merge branch 'main' into updates_to_column_resizing
LFDanLu 74d2bc2
Merge branch 'main' into updates_to_column_resizing
LFDanLu df372ef
Merge branch 'main' into updates_to_column_resizing
LFDanLu 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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,5 +6,6 @@ | |
| "descending": "descending", | ||
| "ascendingSort": "sorted by column {columnName} in ascending order", | ||
| "descendingSort": "sorted by column {columnName} in descending order", | ||
| "columnSize": "{value} pixels" | ||
| "columnSize": "{value} pixels", | ||
| "resizerDescription": "Press Enter to start resizing" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we're going to need translations if we include this @dannify ^ |
||
| } | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,100 @@ | ||
| .aria-table { | ||
|
snowystinger marked this conversation as resolved.
|
||
| border-collapse: collapse; | ||
| width: 300px; | ||
| height: 200px; | ||
| display: block; | ||
| position: relative; | ||
| overflow: auto; | ||
|
|
||
| .aria-table-rowGroup { | ||
| display: block; | ||
| } | ||
|
|
||
| .aria-table-rowGroupHeader { | ||
| border-bottom: 2px solid var(--spectrum-global-color-gray-800); | ||
| position: sticky; | ||
| top: 0; | ||
| background: var(--spectrum-gray-100); | ||
| width: fit-content; | ||
| } | ||
|
|
||
| .aria-table-rowGroupBody { | ||
| max-height: 200px; | ||
| } | ||
|
|
||
| .aria-table-row { | ||
| display: flex; | ||
| } | ||
|
|
||
| .aria-table-headerCell { | ||
| padding: 5px 10px; | ||
| outline: none; | ||
| cursor: default; | ||
| display: block; | ||
| flex: 0 0 auto; | ||
| box-sizing: border-box; | ||
| text-align: left; | ||
|
|
||
| .aria-table-headerTitle { | ||
| width: 100%; | ||
| text-align: left; | ||
| border: none; | ||
| background: transparent; | ||
| flex: 1 1 auto; | ||
| overflow: hidden; | ||
| white-space: nowrap; | ||
| text-overflow: ellipsis; | ||
| margin-inline-start: -6px; | ||
| outline: none; | ||
|
|
||
| &.focus { | ||
| outline: 2px solid orange; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| .aria-table-resizer { | ||
| width: 6px; | ||
| background-color: grey; | ||
| cursor: col-resize; | ||
| height: auto; | ||
| touch-action: none; | ||
| flex: 0 0 auto; | ||
| box-sizing: border-box; | ||
| border: 2px; | ||
| border-style: none solid; | ||
| border-color: transparent; | ||
| background-clip: content-box; | ||
|
|
||
| &.focus { | ||
| background-color: orange; | ||
| } | ||
|
|
||
| &.resizing { | ||
| border-color: orange; | ||
| background-color: transparent; | ||
| } | ||
| } | ||
|
|
||
| .aria-table-row { | ||
| display: flex; | ||
| width: fit-content; | ||
| } | ||
|
|
||
| .aria-table-cell { | ||
| padding: 5px 10px; | ||
| outline: none; | ||
| cursor: default; | ||
| display: block; | ||
| flex: 0 0 auto; | ||
| box-sizing: border-box; | ||
| box-shadow: none; | ||
| overflow: hidden; | ||
| white-space: nowrap; | ||
| text-overflow: ellipsis; | ||
|
|
||
| &.focus { | ||
| box-shadow: inset 0 0 0 2px orange; | ||
| } | ||
| } | ||
| } | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happened here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was were running into a case where calling
state.setKeyboardNavigationDisabled(true);in TableView from the resize menu item would break grid keyboard navigation due to the timing with which the listeners from useSelectableCollection were turned off byisKeyboardNavigationDisabled. If we immediately turned off keyboard navigation before focus moved from clicking the column's menu item to the resizer, this line wouldn't be called and thus useSelectableItem wouldn't focus the table cell as you tried to keyboard navigatemanager.isFocusedtracking didn't feel like it should be disabled just because keyboard navigation was disabled thus the addition of thenavDisabledHandlers