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

Fix markup in Table's column manager #2135

Merged
merged 27 commits into from
Jul 10, 2024

Conversation

r100-stack
Copy link
Member

@r100-stack r100-stack commented Jul 9, 2024

Changes

Fixes #2134. Upon investigating that issue, I noticed that there were a few issues in the markup. E.g.:

  • <input> (checkbox) as a descendant of a <button>
  • <div> not allowed as a child of <button> in this context
MenuItem markup in the column manager image

Furthermore, @mayank99 added that even if each menu item was a div, no interactable elements are allowed in role="menuitem".

As a result, we decided to replace the DropdownMenu + MenuItem startIcon={<Checkbox>} with a Popover + floating <fieldset> with a <Checkbox label={…}> for each column. Using a Popover also makes it easy to expand on column manager functionality to address #783.

Created a new iui-table-column-manager class mainly for padding and max-block-size styles. Like iui-menu, this also shows a maximum of 8.5 items (hardcoded without any calculation (#2135 (comment))). The 0.5 part is to show that there are more items in the list.

Unrelated: Added @default to the JSDocs and a default value to the deconstructed object for the Surface's isPadded prop.

Testing

  • Fixed failing unit tests
  • Approved failing test images

Docs

Added changesets

After PR TODOs

@r100-stack r100-stack self-assigned this Jul 9, 2024
@r100-stack r100-stack changed the title Fix markup in Table's ActionColumn (column manager) Fix markup in Table's column manager Jul 9, 2024
@r100-stack r100-stack changed the base branch from main to mayank/fieldset-base July 9, 2024 16:10
@r100-stack r100-stack marked this pull request as ready for review July 9, 2024 20:45
@r100-stack r100-stack requested review from a team as code owners July 9, 2024 20:45
@r100-stack r100-stack requested review from mayank99 and Ben-Pusey-Bentley and removed request for a team July 9, 2024 20:45
Base automatically changed from mayank/fieldset-base to main July 10, 2024 00:12
An error occurred while trying to automatically change base from mayank/fieldset-base to main July 10, 2024 00:12
Ben-Pusey-Bentley

This comment was marked as resolved.

@r100-stack

This comment was marked as resolved.

mayank99
mayank99 previously approved these changes Jul 10, 2024
@mayank99 mayank99 dismissed their stale review July 10, 2024 15:44
broken
@r100-stack r100-stack merged commit 96e6d22 into main Jul 10, 2024
16 checks passed
@r100-stack r100-stack deleted the r/remove-aria-hidden-from-action-column-checkbox branch July 10, 2024 16:44
@imodeljs-admin imodeljs-admin mentioned this pull request Jul 10, 2024
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.

3 participants