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

chore: Table grid navigation (no integration) #1389

Merged
merged 64 commits into from
Aug 17, 2023
Merged

Conversation

pan-kot
Copy link
Member

@pan-kot pan-kot commented Jul 28, 2023

Description

Added new navigation mechanism for table grids. For now the change is tested on a custom table and only minimal changes to the official table component are made so that everything can be tested and merged incrementally.

Eventually the new navigation will replace the current one for editable tables (use-table-focus-navigation.ts) and for selection column (useSelection.ts:useFocusMove) and will be offered for all tables with a dedicated API.

How has this been tested?

New unit and integration tests to cover the change. Screenshot tests.

The behaviour can be manually tested in the new test page.

Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov
Copy link

codecov bot commented Jul 28, 2023

Codecov Report

Patch coverage: 99.58% and project coverage change: +0.14% 🎉

Comparison is base (2ca759e) 93.56% compared to head (7aa0555) 93.70%.
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1389      +/-   ##
==========================================
+ Coverage   93.56%   93.70%   +0.14%     
==========================================
  Files         633      636       +3     
  Lines       16901    17161     +260     
  Branches     5581     5658      +77     
==========================================
+ Hits        15813    16081     +268     
+ Misses       1016     1008       -8     
  Partials       72       72              
Files Changed Coverage Δ
src/table/header-cell/index.tsx 92.85% <ø> (ø)
src/table/table-role/use-grid-navigation.ts 99.22% <99.22%> (ø)
src/table/body-cell/td-element.tsx 91.30% <100.00%> (ø)
src/table/internal.tsx 99.25% <100.00%> (+0.71%) ⬆️
src/table/table-role/table-role-helper.ts 100.00% <100.00%> (ø)
src/table/table-role/utils.ts 100.00% <100.00%> (ø)
src/table/thead.tsx 95.45% <100.00%> (+0.10%) ⬆️

... and 12 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pan-kot pan-kot marked this pull request as ready for review August 16, 2023 11:26
@pan-kot pan-kot requested a review from a team as a code owner August 16, 2023 11:26
@pan-kot pan-kot requested review from jperals, avinashbot, gethinwebster and timogasda and removed request for a team and jperals August 16, 2023 11:26
Copy link
Member

@gethinwebster gethinwebster left a comment

Choose a reason for hiding this comment

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

General comment on this functionality: can we document somewhere accessible to customers (perhaps on the website?) the expected behavior/interactions? From what I remember from the last call, there were quite a few edge cases/tradeoffs related to interactive elements in cells, and the standards/guidelines aren't entirely clear, so it would be good to write down how and why the component/feature behaves.

(This has been a regular ask from customers for existing functionality, and for something complex like this I think it's even more valuable)

@pan-kot
Copy link
Member Author

pan-kot commented Aug 16, 2023

General comment on this functionality: can we document somewhere accessible to customers (perhaps on the website?) the expected behavior/interactions? From what I remember from the last call, there were quite a few edge cases/tradeoffs related to interactive elements in cells, and the standards/guidelines aren't entirely clear, so it would be good to write down how and why the component/feature behaves.

(This has been a regular ask from customers for existing functionality, and for something complex like this I think it's even more valuable)

Sure, that makes total sense - I will add the docs.

Copy link
Member

@gethinwebster gethinwebster left a comment

Choose a reason for hiding this comment

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

Should this be a feat? As far as I see there's no public changes so far, so we probably don't e.g. want this in the changelog

@pan-kot pan-kot changed the title feat: Table grid navigation (no integration) chore: Table grid navigation (no integration) Aug 16, 2023
gethinwebster
gethinwebster previously approved these changes Aug 17, 2023
@pan-kot
Copy link
Member Author

pan-kot commented Aug 17, 2023

@gethinwebster, I added the doc explaining the current behaviour. I am expecting certain changes to come as result of further discussions, bug bashes, integration with the table, and the API proposal - I will make sure to reflect those changes in the doc.

Copy link
Member

@gethinwebster gethinwebster left a comment

Choose a reason for hiding this comment

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

Looks great!

@pan-kot pan-kot merged commit e87f4e7 into main Aug 17, 2023
24 checks passed
@pan-kot pan-kot deleted the table-grid-navigation branch August 17, 2023 09:23
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.

2 participants