Skip to content
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

Add cell placeholders #1950

Merged
merged 24 commits into from
Mar 27, 2024
Merged

Add cell placeholders #1950

merged 24 commits into from
Mar 27, 2024

Conversation

mollykreis
Copy link
Contributor

@mollykreis mollykreis commented Mar 20, 2024

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

  • I have updated the project documentation to reflect my changes or determined no changes are needed.

@mollykreis
Copy link
Contributor Author

@m-akinc, will you buddy this PR for me?

@mollykreis mollykreis requested a review from m-akinc March 20, 2024 17:47
@m-akinc m-akinc marked this pull request as ready for review March 21, 2024 19:19
@mollykreis mollykreis requested a review from jattasNI March 25, 2024 14:14
@mollykreis mollykreis merged commit a01932b into main Mar 27, 2024
11 checks passed
@mollykreis mollykreis deleted the cell-placeholder branch March 27, 2024 16:39
jattasNI pushed a commit that referenced this pull request Mar 27, 2024
# Pull Request

## 🤨 Rationale

This came up in [a discussion on the PR to add placeholders to table
columns](#1950 (comment)).
The goal is the increase pipeline stability and reproducibility by
ensuring more of the configuration is consistent regardless of what
machine is running the pipeline. In this case, I am setting the time
zone to _America/Chicago_.

## 👩‍💻 Implementation

- set `TZ` environment variable to `Americal/Chicago`
- set `--time-zone-for-testing=America/Chicago` in the Chrome flags for
the nimble-components unit tests

## 🧪 Testing

Build succeeds
Verified locally that the `--time-zone-for-testing` Chrome flag is used
as expected

## ✅ 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants