-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
070a72d
commit 22e49f8
Showing
8 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
87 changes: 87 additions & 0 deletions
87
packages/nimble-components/src/table/specs/editable-table-ixd.md
This file contains 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,87 @@ | ||
# Nimble Editable Table (IxD) | ||
|
||
## Overview | ||
|
||
Nimble table support for interactive cell editing. | ||
|
||
### Background | ||
|
||
- [ViD spec](https://www.figma.com/file/PO9mFOu5BCl8aJvFchEeuN/Nimble_Components?type=design&node-id=5308-156796&mode=dev) | ||
- [Component Issue](https://github.com/ni/nimble/issues/1876) | ||
|
||
## Usage | ||
|
||
**When to use:** | ||
|
||
Use an editable table when you need to allow users to modify individual cells directly within the table. | ||
This is particularly useful for scenarios where inline editing is required, such as data entry, spreadsheet-like applications, or any situation where quick and efficient data manipulation is necessary. | ||
|
||
**When not to use:** | ||
|
||
- When data integrity is critical and the table should not be modified by users. | ||
- When the table is used for displaying static or read-only data. | ||
- When the table contains sensitive information that should not be editable. | ||
- When the user interface requires a more complex data entry form. | ||
|
||
## Anatomy | ||
|
||
![Editable table anatomy](./spec-images/editable-cell-anatomy.png) | ||
|
||
| Element | Description | | ||
| --------------------- | ------------------------------------------------------------------------ | | ||
| Static cell value | Non-editable display of cell value | | ||
| Action button | Button to open cell context menu. Appears on row hover or keyboard focus | | ||
| Editable cell control | Text or numeric control that supports entering or editing cell data | | ||
|
||
## Behavior | ||
|
||
### States | ||
|
||
![Editable cell states](./spec-images/editable-cell-states.png) | ||
|
||
#### Error State | ||
|
||
![Editable cell error states](./spec-images/editable-cell-error-data.png) | ||
|
||
### ARIA Considerations | ||
|
||
- Maintain compatibility with existing keyboard navigation behavior | ||
- Consider resolving [existing ARIA gaps](https://github.com/ni/nimble/issues/2285) | ||
|
||
### Mouse Interactions | ||
|
||
![Editable cell mouse navigation](./spec-images/editable-cell-mouse-navigation.png) | ||
|
||
- Editable table cells show the same row hover state as non-editable cells on mouse hover. | ||
- I.e. When hovering over a row, the action menu button appears. Depending on the table's selection mode, the row may be highlighted. | ||
- Single clicking editable cell shows the cell focus state. | ||
- Double clicking the editable cell transforms the cell into an input control in the focus state. | ||
- Clicking away from a focused editable cell sets the value and transforms it into the Cell focus state. | ||
|
||
### Non-Mouse Interactions | ||
|
||
![Editable cell key navigation](./spec-images/editable-cell-key-navigation.png) | ||
|
||
- When a cell has keyboard focus (Cell focus state), pressing `TAB` or `ENTER` transforms the cell into an input control in the focus state (Edit focus state). | ||
- When a cell has Edit focus, pressing `TAB` moves the focus to the action button, or to the next available focus target. | ||
|
||
![Editable cell enter key](./spec-images/editable-cell-enter-key.png) | ||
|
||
- When a cell has Edit focus, pressing `ENTER` sets the value and transforms it into the Cell focus state. | ||
|
||
![Editable cell escape key](./spec-images/editable-cell-escape-key.png) | ||
|
||
- When a cell has Edit focus, pressing `ESCAPE` reverts any value change and transforms it into the Cell focus state. | ||
|
||
#### Touch-Screen Devices | ||
|
||
- The edit workflow should support touch screen devices. | ||
|
||
## Open Issues | ||
|
||
See content marked "**QUESTION**" or "**NOTE**". | ||
|
||
## References | ||
|
||
- [AG Grid](https://www.ag-grid.com/example/) | ||
- [Patternfly](https://www.patternfly.org/components/table/react-deprecated/#editable-rows) |
Binary file added
BIN
+5.73 KB
packages/nimble-components/src/table/specs/spec-images/editable-cell-anatomy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.24 KB
packages/nimble-components/src/table/specs/spec-images/editable-cell-enter-key.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+17.1 KB
...ages/nimble-components/src/table/specs/spec-images/editable-cell-error-data.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.29 KB
...ages/nimble-components/src/table/specs/spec-images/editable-cell-escape-key.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+18.9 KB
.../nimble-components/src/table/specs/spec-images/editable-cell-key-navigation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+28.3 KB
...imble-components/src/table/specs/spec-images/editable-cell-mouse-navigation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.7 KB
packages/nimble-components/src/table/specs/spec-images/editable-cell-states.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.