Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Adding an e2e test verifying simple keyboard navigation through blocks #13455
Adding an e2e test verifying simple keyboard navigation through blocks #13455
Changes from 1 commit
9ac4720
dbdf8ff
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any way to automate this tabbing through the toolbar? It's going to be hard to maintain every time something changes in the paragraph block toolbar. It would be great to end up with a set of utilities which can be applied to every core block, not only paragraph.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a really interesting idea, and I'd love to have a look at doing this over the next few days
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can split this work into 2 PRs if you prefer. It's valuable as is if we add the code comment I mentioned in my previous note. Let me know how do you want to approach it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain why does it navigates through those blocks twice? It feels like it should be fine to do it only once. Maybe it would be enough to navigate to content editor top and finish there. I don't see any technical reasons why it would work differently after this step.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure can. The regression we're testing for here is illustrated in this image:
And you can find more information about the bug and the patch for it here: #11773
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okey, we need to document it in the code and reference the bug we are guarding against. Something along those lines:
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gziolo would love your thoughts on this approach here. I could find only one other example of a function from
e2e-test-utils
that containedexpect
assertions like the ones I was using intabThroughBlockMoverControl
andtabThroughBlockToolbar
.tjnicolaides#1
Currently thinking about the block-agnostic test you mentioned living in
keyboard-navigable-blocks.test.js
and the paragraph order tests written in this PR living in a different fileThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So let's merge this PR as it's solid enough and do a follow-up with the work started in your fork. I didn't test it at all but I anticipate that we will only need to add some JSDoc tweaks to ensure that those new public methods get properly documented in the auto-generated docs :)