Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

[compact interactive list ] No row headers if list has only one semantic column #2110

Merged
merged 3 commits into from
Mar 29, 2024

Conversation

adoroshk
Copy link
Contributor

Summary

Compact interactive list allows users to set an index of a cell in the row that needs to be a row header via rowHeaderIndex prop. If rowHeaderIndex prop is omitted, it defaults to 0, which makes the first row cell a row header. However, if compact interactive list has only one semantic column, that would make each row to have only one cell with role = rowheader, which is redundant.
This change checks if the list has a single column, and does not assign a role = 'rowheader' to the only cell in the row.

Testing

This change was tested using:

  • WDIO
  • Jest
  • Visual testing (please attach a screenshot or recording)
  • Other (please describe below)
  • No tests are needed

Reviews

In addition to engineering reviews, this PR needs:

  • UX review
  • Accessibility review
  • Functional review

Additional Details

This PR resolves:

UXPLATFORM-10330

@adoroshk adoroshk self-assigned this Mar 29, 2024
@github-actions github-actions bot temporarily deployed to preview-pr-2110 March 29, 2024 19:31 Destroyed
@adoroshk adoroshk requested a review from a team March 29, 2024 20:21
Copy link
Contributor

@kenk2 kenk2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One nit but otherwise LGTM

columns={singleCol}
/>,
);
expect(wrapper).toMatchSnapshot();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: IIRC we are kind of moving away from doing these kinds of snapshot tests? These tend to be hard to verify and we just overwrite the results anyways.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the snapshot to ensure the component rendered with correct role, but jest test checks the same so I am willing to remove it. It is a bit extra.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed in 76ce35a

@github-actions github-actions bot temporarily deployed to preview-pr-2110 March 29, 2024 20:28 Destroyed
@github-actions github-actions bot temporarily deployed to preview-pr-2110 March 29, 2024 20:34 Destroyed
@adoroshk adoroshk merged commit 674c7a9 into main Mar 29, 2024
22 checks passed
@adoroshk adoroshk deleted the compact-interactive-list-no-rowheader branch March 29, 2024 21:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants