-
Notifications
You must be signed in to change notification settings - Fork 11
HLD Add Breakpoint table column to Ok #2826
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
15 commits
Select commit
Hold shift + click to select a range
526e5a9
breakpoint hld draft
hellovolcano 3531e9e
Merge branch 'main' into users/vgleason/breakpoint-hld
hellovolcano 155bd9e
fixing IxD link
hellovolcano a33e66f
fixing broken image link from move
hellovolcano ce88f36
HLD changes
hellovolcano d178c40
Merge branch 'main' into users/vgleason/breakpoint-hld
hellovolcano 55ac984
Merge branch 'main' into users/vgleason/breakpoint-hld
hellovolcano 35af3aa
HLD feedback
hellovolcano d7c4bcf
Update packages/spright-components/src/table-column/breakpoint/specs/β¦
hellovolcano 18e133a
update to use label provider
hellovolcano 889ad53
Merge branch 'users/vgleason/breakpoint-hld' of https://github.com/niβ¦
hellovolcano c186966
Merge branch 'main' into users/vgleason/breakpoint-hld
hellovolcano ab1b1ff
Merge branch 'main' into users/vgleason/breakpoint-hld
hellovolcano 95b304b
adding framework integration details
hellovolcano 81589e9
move to ok
hellovolcano 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
File renamed without changes
164 changes: 164 additions & 0 deletions
164
.../ok-components/src/table-column/breakpoint/specs/table-column-breakpoint-hld.md
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,164 @@ | ||
| # Table Column Breakpoint | ||
|
|
||
| ## Overview | ||
|
|
||
| The breakpoint table column provides a visual indicator for debugging breakpoints in code-centric table displays. | ||
|
|
||
| ### Background | ||
|
|
||
| [IxD](https://github.com/ni/nimble/blob/main/packages/nimble-components/src/table-column/breakpoint/IxD.md) | ||
|
|
||
| ### Features | ||
|
|
||
| - Visual breakpoint indicators with multiple states (Off, Enabled, Disabled, Hit) | ||
| - Click-to-toggle functionality for setting/removing breakpoints | ||
| - Callback mechanisms for client-implemented breakpoint operations (like row highlighting and context menu, as specified in IxD) | ||
| - Keyboard shortcuts for breakpoint management (Ctrl+B, F9) | ||
| - Tooltip display for breakpoint actions | ||
|
|
||
| ### Non-goals | ||
|
|
||
| - Debugging functionality or integration with debugger engines | ||
| - Sorting or grouping capabilities | ||
| - Resizable column width | ||
| - Context menu for disabling or enabling breakpoints | ||
| - Updates to the nimble table to modify column ordering or pin columns | ||
| - Implementing keyboard shortcuts | ||
|
|
||
| ## Implementation / Design | ||
|
|
||
| The breakpoint column will render a clickable indicator in each row that can cycle through different breakpoint states. | ||
|
|
||
| Typical usage: | ||
|
|
||
| ```html | ||
| <nimble-table> | ||
| <ok-table-column-breakpoint field-name="breakpointState"> | ||
| <!-- Column header can be empty or contain accessibility label --> | ||
| </ok-table-column-breakpoint> | ||
| <!-- Other columns --> | ||
| </nimble-table> | ||
| ``` | ||
|
|
||
| ### API | ||
|
|
||
| #### Column Element | ||
|
|
||
| _Element Name_ | ||
|
|
||
| - `ok-table-column-breakpoint` | ||
|
|
||
| _Props/Attrs_ | ||
|
|
||
| - `field-name`: string - The field name in the data record that contains the breakpoint state | ||
|
|
||
| _Content_ | ||
|
|
||
| - Column label (icon and/or text), typically empty | ||
|
|
||
| _Events_ | ||
|
|
||
| - `breakpoint-column-toggle`: Emitted when a breakpoint is toggled via click or keyboard interaction | ||
| ```ts | ||
| interface BreakpointToggleEventDetail { | ||
| recordId: string; | ||
| newState: BreakpointState; | ||
| oldState: BreakpointState; | ||
| } | ||
| ``` | ||
|
|
||
| #### Cell View Element | ||
|
|
||
| _Element Name_ | ||
|
|
||
| - `ok-table-column-breakpoint-cell-view` | ||
|
|
||
| _Rendering_ | ||
|
|
||
| The cell view will render a breakpoint indicator based on the current state: | ||
| - **Off**: Empty circular outline (shown on hover) | ||
| - **Enabled**: Filled red circle | ||
| - **Disabled**: Outlined red circle with slash through it | ||
| - **Hit**: Filled red circle with highlight/border indicating active state within the indicator itself | ||
|
|
||
| Each indicator will have a minimum 24x24 pixel hit target. | ||
hellovolcano marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| _DOM / Hit Target_ | ||
|
|
||
| The indicator will be implemented as a native `<button>` with a fixed 24x24 hit target. The button will be visually transparent (no background, border, or shadow) so only the breakpoint icon is visible. The icon for the current state will be slotted inside the button. | ||
|
|
||
| #### Breakpoint States | ||
|
|
||
| The breakpoint state is represented as an enum with the following values: | ||
|
|
||
| ```ts | ||
| enum BreakpointState { | ||
| Off = 'off', | ||
| Enabled = 'enabled', | ||
| Disabled = 'disabled', | ||
| Hit = 'hit' | ||
| } | ||
| ``` | ||
|
|
||
| ### Sorting / Grouping | ||
|
|
||
| The breakpoint column will not be sortable or groupable. No new group header view element. | ||
|
|
||
| ### Sizing | ||
|
|
||
| Column will be a fixed width of 32 pixels and will not be resizable. | ||
|
|
||
| ### Placeholder | ||
|
|
||
| When the breakpoint state is `undefined` or `null`, the cell will render in the "Off" state (no visible indicator until hover). | ||
|
|
||
| ### Delegated Events | ||
|
|
||
| The following events from the cell view will be delegated to the column: | ||
|
|
||
| - `breakpoint-column-toggle` | ||
|
|
||
| The event will include the `recordId` to identify the row where the interaction occurred. | ||
|
|
||
| ### Interactions | ||
|
|
||
| The breakpoint indicator will be marked as focusable via the cell view's `tabbableChildren`. The indicator element will properly forward the `tabIndex` value to ensure keyboard accessibility. | ||
|
|
||
| Interactive elements: | ||
| - Breakpoint indicator button (focusable) | ||
|
|
||
| ### Test Cases | ||
|
|
||
| - Verify breakpoint state transitions (Off β Enabled β Disabled β Hit) | ||
| - Test click-to-toggle functionality | ||
| - Verify tooltip display on hover/focus | ||
| - Verify proper event delegation with correct recordId values | ||
| - Test that column appears leftmost in table layout | ||
| - Verify non-resizable behavior | ||
| - Test with various data states (undefined, null, invalid values) | ||
| - Verify callback events provide proper context for client implementations | ||
|
|
||
| ### Internationalization | ||
|
|
||
| Tooltips will use label provider strings for the default text ("Add breakpoint" / "Remove breakpoint"). | ||
hellovolcano marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ### Accessibility | ||
|
|
||
| - Breakpoint indicators will have proper ARIA labels describing current state | ||
| - Keyboard navigation support with Tab/Shift+Tab | ||
| - Space/Enter key activation for toggling breakpoints | ||
| - Tooltips will be announced by screen readers | ||
| - High contrast support for different breakpoint states | ||
| - Minimum 24x24 pixel hit targets for web accessibility | ||
|
|
||
| ### Framework Integration | ||
|
|
||
| - Standard Blazor wrapper, including: | ||
| - Add `BreakpointState` enum (ensure values serialize correctly within table data) | ||
| - Add `breakpoint-column-toggle` event on the column | ||
| - Add the new column component | ||
| - Add a component-specific label provider (`ok-label-provider-table-column-breakpoint`) for tooltip strings | ||
|
|
||
| ## Open Issues | ||
|
|
||
| None | ||
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.