-
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.
# Pull Request ## 🤨 Rationale This PR adds a `placeholder` configuration to the following table columns as described in #1869: - anchor - date-text - duration-text - number-text - text This is part of #1538. The remaining work is to add the `placeholder` attributes to the Angular and Blazor wrappers for each column. As part of this PR, I also included best practices established for each column in the storybook docs. These are adapted from the placeholder HLD. ## 👩💻 Implementation I implemented this change in a similar way as #1914. Specifically, I updated `TableColumnTextCellViewBase` to have its own implementation of `columnConfigChanged` and `cellRecordChanged` that calls a new `applyPlaceholderTextIfNeeded` function. This required me to create a `TableColumnTextBaseCellRecord` interface to enforce that the cell records used by `TableColumnTextCellViewBase` have a `value` property and to create a `TableColumnTextBaseColumnConfig` interface to enforce that the column configs used by `TableColumnTextCellViewBase` have an optional `placeholder` property. ## 🧪 Testing - Updated/created unit tests - Manually tested in storybook - Updated matrix tests to test each relevant column with & without a placeholder ## ✅ Checklist <!--- Review the list and put an x in the boxes that apply or ~~strike through~~ around items that don't (along with an explanation). --> - [ ] I have updated the project documentation to reflect my changes or determined no changes are needed. --------- Co-authored-by: Milan Raj <rajsite@users.noreply.github.com>
- Loading branch information
1 parent
6310ab5
commit a01932b
Showing
45 changed files
with
1,074 additions
and
326 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
change/@ni-nimble-components-a55ae070-d85f-4102-9219-b84655baab32.json
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,7 @@ | ||
{ | ||
"type": "minor", | ||
"comment": "Add placeholders to table columns", | ||
"packageName": "@ni/nimble-components", | ||
"email": "20542556+mollykreis@users.noreply.github.com", | ||
"dependentChangeType": "patch" | ||
} |
1 change: 1 addition & 0 deletions
1
...ts/src/patterns/table-column/tests/no-null-and-undefined-best-practice-docs.mdx
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 @@ | ||
Avoid mixing `undefined` and `null` as values for the same field. When grouping this will lead to two groups (one for `null` values and one for `undefined` values) that both have the text `"No value"`. |
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
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
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
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
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
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
Oops, something went wrong.