-
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
Improve the reverse navigation order of focusable elements within KTable cells #840
Improve the reverse navigation order of focusable elements within KTable cells #840
Conversation
@MisRob and @BabyElias , Please have a look at it. |
@shivam-daksh , The overall working looks nicee to me now. Thanks :) |
lib/KTable/index.vue
Outdated
getFocusableElements(cell) { | ||
if (!cell) return []; | ||
const selectors = 'button, a, input, select, textarea'; | ||
return Array.from(cell.querySelectorAll(selectors)); |
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.
About the use of querySelectorAll
here, I was actually having a little lag in the navigation behaviour when moving through the focusable elements - this reminded me of an earlier code review comment here. We were using querySelectorAll earlier as well, but it caused performance issues, so we shifted to getElementByTagname
and it had a very positive impact on the same. Can you update this code to make use of the previous getElementbyTagname logic? or maybe if there's any other conclusion you derive from that conversation about performance improvement- it is more than welcome. Thanks!
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.
@BabyElias, Thanks for noticing. I've changed it to getElementsByTagName
.
@BabyElias , I was thinking the same. Let's leave it to @MisRob what she decides. |
Thanks @shivam-daksh and @BabyElias. Since the first PR review is almost complete, I would recommend to wait until we finish QA and merge #804. Then @shivam-daksh you could rebase this PR on top of the latest |
Hi @shivam-daksh, I've just merged #804. Could you now rebase this PR on top of the latest |
@MisRob, Sure |
@MisRob, Please have a look. |
Hi @shivam-daksh, there are many conflicting files now - perhaps something went wrong during the rebase/merge? |
Hi @MisRob, I'm running into an issue while rebasing—it’s taking much longer than usual, likely due to changes in A quick solution I’m considering is starting a new branch from the latest Looking forward to your guidance! |
Hi @shivam-daksh, ah I'm sorry this is such a hassle. One idea I had was to try to reset all files that are not relevant to this work to their |
283ba75
to
b04207f
Compare
@MisRob, Could you please take a look at this? I believe it should work as expected. |
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.
Thanks @shivam-daksh! The diff now looks meaningful and I confirmed locally that the fix still works. I haven't observed any regressions. Yey, finally merging. Thanks everyone for patience.
Big Thanks to @MisRob, @BabyElias and @AlexVelezLl for being with me and guiding through the whole. I'm really grateful for your support and all the learning I've gained along the way. |
Hey @MisRob, I’m ready to dive deeper into fixing complex issues and am fully committed to investing time in learning and improving. Looking forward to growing and contributing even more! |
Description
This pull request addresses an issue with the Shift+Tab key navigation behavior in the KTable component (follow-up to issue #795). Previously, pressing Shift+Tab to navigate backward through table cells did not follow the expected reverse order of focusable elements, leading to an unintuitive and confusing user experience.
Issue addressed
Closes #837
Addresses #PR# HERE
#795
Before/after videos:
Before:
View actual behavior video
After:
View expected behavior video
Example:
Given a table with the following structure:
Row 1:
Row 2:
Expected Behavior:
Changes Made:
Changelog
Steps to Test:
(optional) Implementation notes
At a high level, how did you implement this?
Initially
focusCell
inupdateFocusState
method was causing diffculty in implementation of the ideal navigation. It can be tackled by introducing a third parameter inupdateFocusState
to check iffocusCell
is necessary or not.Code
Does this introduce any tech-debt items?
Testing checklist
Reviewer guidance
Comments