-
Notifications
You must be signed in to change notification settings - Fork 91
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
Fixes keyboard navigation in Ktable #900
base: develop
Are you sure you want to change the base?
Conversation
Hi @Pandaa007, thank you! I appreciate your critical and pro-active mindset, and it is true these improvements are needed. However I'd recommend to check on proposed changes that are out of scope beforehand in the issue comment with the team. Unfortunately, we won't be able to accept everything. Some of the extra issues you took on are already addressed and reviewed, and only wait for final QA here:
I'd recommend you only keep changes directly related to #883. We're a bit behind on QA but I hope we can merge all pre-existing |
Thanks @MisRob for the review. Totally my bad as I wasn't aware that these problems of refactoring and keyboard navigation were already being worked upon by other contributors, and thus felt that I might adress them here itself. As per your advice, I'd like to wait for them to be merged to the codebase first and then make my changes on top of them! Would really appreciate a tag whenever the same are merged and I can start working again on it. Thanks :) |
Thanks for your understanding @Pandaa007. I will make sure to let you know when it's time to rebase. |
Hi @Pandaa007, we're close to having everything ready for you. I will follow-up hopefully next week. |
Hi @Pandaa007, we've just merged
and I assume that #883 will still be valid but let' see. |
Hi @MisRob! Thanks for the heads-up. I had checked out the latest changes and noted that the same playground example that I was using to test the navigation was not working correctly with the current code. It was most probably due to not handling the I have updated the PR with the changes so that the example functions well again, as well tried to pull out some of the stuff that was inlined before to sepearate functions for better maintainability. I have also seperated out the code for forward and backward tab navigation, as it allows us to make some minor improvements in performace (like while forwarding navigating with tab, if we are at the end of the focusable elements in the current cell, we do not need to query all the focusable elements of the next cell, and can directly just focus on the next cell itself!) I would love to hear the views of the team on these changes. Thanks! |
Hi @Pandaa007, would you be able to update the PR description with the changes you described in the latest comment and the recordings of the latest issues you mention? I think it would help us to orient ourselves. Thank you. |
@MisRob I have updated the same with detailed descriptions of the changes as well as before & after videos! Please let me know if any more modifications are needed! |
Thank you @Pandaa007, that's helpful. @BabyElias this is another chunk of work on your |
Thanks for the heads up @MisRob, will have a look at it :) |
Thank you @BabyElias, as always. There's no time pressure around this work, so any time you can - this review will take a while. |
@Pandaa007, thank you for working on this issue!
I think these can also be noticed in the video samples that you have attached in the PR description. |
Thank you @BabyElias. @Pandaa007 since the refactor as a whole has some important regressions, I'd recommend to separate this work into two parts. The first one would be solely for #883. After that, if you'd still like to do further improvements, we can consider. This will make it easier for everyone to understand the source of these regressions, and help us to focus on the bug we need to fix and which has much higher priority than further internal refactors. |
This will also help the review process since it seems there will be some things to look into deeper here - |
Hi @BabyElias. Thanks for your review. I actaully tried to setup Thanks for your time! |
@Pandaa007, it might take some time before I am able to send the video here. Just for reference uptil then, the current.mp4 file that you have added in the PR description- these can be noticed there as well. The light grey color bg that appears all over the row cell which is active, and the corresponding column header cell is not happening for the first cell of each row or when shift+tab key is used. |
Ahh okay! Got it. Completely missed that part. I will look into fixing the same. Thanks for the review! Also just for reference, is this the correct table which you had earlier mentioned in your comment? classes.mp4 |
Yes, this is the table I am talking about. But for noticing your KDS changes in Kolibri, you need to run Kolibri with your local KDS repo. The command to do so is |
Thanks for the guidance @BabyElias. I wasn't aware about the classes-updated.mp4pg-updated.mp4I have attached the demo for both the playground the earlier mentioned table. Hope that this is the functionlity that we looking for! I have updated the video demo's in the PR description as well, so that it makes for easier review. I wanted to take @MisRob's advice of separating out the work into two PRs, but I feel that tracking down the exact source of the bug is actually much more cumbersome that refactoring the table internals into clean functions (to reduce inlining). I have mostly followed the original implementation, but just make it more conscise with the help of utilities. I hope that would be okay for this PR. Please let me know if you have any more suggestions on the same. |
Hi @Pandaa007
Sounds fine - take my words as recommendations in case it would actually be helpful, and no problem to leave it aside when it's not. I am glad to have @BabyElias to coordinate with you as fits best since she's the main reviewer of this work now :) |
Description
Changed the handling of Tab & Shift-Tab navigation in the
KTable
component to address the following:disabled
elements (as the current code tries to focus on them blindly by calling.focus()
on them, which is not supported for disabled elements)You can see the behaviour on the current implementation in the following video (The key presses that I am making can't be seen, but I am first trying to navigating forward to the end of the page, and then reverse navigate to the starting. If stuck on disbaled elements, or the header cell in the first table, I using mouse to refocus and continue navigation):
prev.mp4
The same after the changes in the PR are checked out is as follows:
classes-updated.mp4
pg-updated.mp4
I used the following playground snippet to generate the sample page for testing (on which the demo videos are recorded).
Playground
To make the changes, I have
getNextCellCoordinates
andgetPreviousCellCoordinates
to that the actual navigation logic becomes more concise and easy to follow (reducing the inling of code)Issue addressed
Fixes #883
Changelog
KTable
KTable
Testing checklist
Reviewer guidance