fix: Board item visibility issue when moving using keyboard arrows#379
fix: Board item visibility issue when moving using keyboard arrows#379georgylobko merged 2 commits intomainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #379 +/- ##
==========================================
+ Coverage 95.11% 95.54% +0.43%
==========================================
Files 67 67
Lines 3275 3278 +3
Branches 703 706 +3
==========================================
+ Hits 3115 3132 +17
+ Misses 160 146 -14 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| z-index: 2000; | ||
| position: fixed; | ||
| } | ||
| .transformed.keyboardDragged { |
There was a problem hiding this comment.
nit: why do we define it as .transformed.keyboardDragged and not just .keyboardDragged? That is not an issue, but is asymmetrical to the .dragged style above.
There was a problem hiding this comment.
Because transformed is applied for all board items, not only for the one which is being moved by keyboard. So combining these classes gives you a way to distinguish the active one
| } | ||
| .transformed.keyboardDragged { | ||
| z-index: 2000; | ||
| position: absolute; |
There was a problem hiding this comment.
the .transformed style that we add already defines position: absolute, so there is no need to define it again
There was a problem hiding this comment.
Idea: what if we add some class .active when the condition if (transition) {} applies? Inside we can define z-index: 2000, so we'd need no separate class and condition for keyboard.
There was a problem hiding this comment.
This is a bit more difficult. We need to separate keyboard and mouse interactions. There is a difference between keyboard and mouse dragging:
Mouse dragging makes the board item position: fixed and assigns a new width right away
Keyboard interaction keeps the board item position: absolute and does not assign a width right away, and the item should keep its place on the board while scrolling
But the point about defining position: absolute is valid. Addressed
Description
Fix Board Item z-index inconsistency between mouse and keyboard interactions (AWSUI-61346)
Related links, issue #, if available: n/a
How has this been tested?
Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
CONTRIBUTING.md.CONTRIBUTING.md.Security
checkSafeUrlfunction.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.