Add some tests for TreeGrid. Update README to reflect latest functionality.#39302
Add some tests for TreeGrid. Update README to reflect latest functionality.#39302
Conversation
| ); | ||
| focusablesInNextRow[ nextIndex ].focus(); | ||
|
|
||
| // Let consumers know the row that was originally focused, |
There was a problem hiding this comment.
I guess this was missed in the original PR review. My bad.
|
|
||
| screen.getByText( 'Row 2' ).focus(); | ||
| const row2Element = screen.getByText( 'Row 2' ).closest( 'tr' ); | ||
| screen.getByText( 'Row 1' ).focus(); |
There was a problem hiding this comment.
This was necessary as row 1 will do the collapsing/expanding now.
|
Size Change: -15 B (0%) Total Size: 1.16 MB
ℹ️ View Unchanged
|
ciampo
left a comment
There was a problem hiding this comment.
Thank you as always, @alexstine!
Changes LGTM, although let's wait for @talldan 's review in case they have anything to add :)
One small note — could you just add an entry to the @wordpress/components CHANGELOG mentioning the change to the onFocusRow callback?
talldan
left a comment
There was a problem hiding this comment.
Looks good to me, too! Thanks for these.
|
I cherry-picked this PR into Gutenberg 12.8 release to prevent issues with the merge conflicts in the CHANGELOG file while publishing to npm with the automated script. |
…ality. (#39302) * Start working on updating/implementing new tests. * Update README docs. * Add tests for Home/End. Fix missing onFocus consumer for Home/End. * Add item to changelog. * A few more changelog details. * Fix changelog formatting.
What?
The PR is adding some missing unit tests for the TreeGrid component. It is also clearing up the README.
Why?
Chores are important to keep our code working. 👍
How?
Hopefully all checks will turn green and there will be more test data to prevent against regressions in the future.
Testing Instructions
Wait for PR checks to turn green or test locally with the below command.
Screenshots or screencast