DestinyItemManager / DIM

Destiny Item Manager
https://destinyitemmanager.com
MIT License
2.06k stars 644 forks source link

[fix/qol] LO: Debounce Mod Removal #8809

Open nev-r opened 1 year ago

nev-r commented 1 year ago

image when mashing several times on this X to remove successive mods, recalculation flickers and hiccups enough that sometimes, some clicks don't go through

robojumper commented 1 year ago

Maybe we can offer some solution to the button mashing problem? The loadout drawer has bulk clear buttons, maybe LO should have those too (perhaps split by slot categorization)

bhollis commented 1 year ago

ecalculation flickers and hiccups enough

We should figure that out. It shouldn't be flickering

mattjbones commented 1 year ago

I had a bit of a play with this and tried to debounce the worker processing, which was pretty nice as it meant that a bunch of interactions with the LO felt snappier. I can through up a PR if anyone is curious?

(I was mostly noodling around with parts of the app that felt a bit sluggish, more to understand what was going on behind the scenes)

delphiactual commented 1 year ago

@mattjbones please open the PR that you discussed.

bhollis commented 1 month ago

Maybe we need to use React's useDeferredValue or startTransition to allow user actions to interrupt render.