ui: add shadow to chessground dragged pieces#19778
ui: add shadow to chessground dragged pieces#19778Simek wants to merge 3 commits intolichess-org:masterfrom
Conversation
|
I'm concerned with performance here. It's just a drop shadow and modern browsers on good hardware laugh at it, for sure. But what about crappy browsers on cheap hardware? We want to be fast there too. If it reduce the FPS when dragging pieces, it would really worsen the playing experience. How do we know it won't happen? |
|
We can do performance analysis, take a snapshots before and after the change, and more-less asses the impact of the changes - if it's noticeable or not on the end results. However, this would not guarantee the performance on low-end devices. We might want to think about creating a consistent way - set of tests, benchmark or something else - that will provide a measurable results, and be reusable, so we can run it over time, and on PRs like this one, to detect performance regressions, will explore what we can do on that avenue. On the other hand, we already are using CSS filter over SVG elements with user performance driven shade alteration, so we basically add one filter to the list for the dragging state, which is also conditional one, but I cannot say with 100% confidence that the impact of this change won't be noticeable, so will try to do some performance assessment anyway. |
Why
An experiment to add a bit more visual feedback to pieces while dragging them.
Note
Since this is an experiment, some tweaks to the shadow values are welcome, we can also decide not to go that way and close the PR.
How
Add
drop-shadowfilter to piece which is in dragging state, mix filters with user board ones if needed.Preview
Kapture.2026-03-10.at.14.27.14.mp4