PB-534: transparency slider works in real time#865
Conversation
Passing run #2401 ↗︎Details:
Review all test suite changes for PR #865 ↗︎ |
|||||||||||||||
pakb
left a comment
There was a problem hiding this comment.
I think it would make sense to debounce it just a little bit, so that it doesn't fire a store action each little changes
|
@pakb : I've already put a 100ms interval to avoid firing it too fast, I could make it slower. |
eb54f47 to
494da51
Compare
|
I was more referring on using what is in |
494da51 to
9c2a9c3
Compare
Issue: The transparency slider did not change the opacity in real time when users were moving the slider, only applying the changes when it was released Fix: When clicking on the slider, it sets an interval which updates the opacity as long as we're handling the slider. This interval is set to 100ms, which allows to see the changes happen often enough to work, without burdening the backend with too much commits. We also reduce the number of commits by never committing the same value as the one stored.
bbef108 to
00dc3fb
Compare
pakb
left a comment
There was a problem hiding this comment.
small log/comment issue and good to go
| log.info( | ||
| '[Menu Active Layers List Item component]: Committing last transparency reached and clearing the interval' | ||
| ) |
There was a problem hiding this comment.
this log isn't up to date anymore, as you aren't using setInterval anymore
linting and removing dev logs update in log
00dc3fb to
6a678d6
Compare
Issue: The transparency slider did not change the opacity in real time when users were moving the slider, only applying the changes when it was released
Fix: When clicking on the slider, it sets an interval which updates the opacity as long as we're handling the slider. This interval is set to 100ms, which allows to see the changes happen often enough to work, without burdening the backend with too much commits. We also reduce the number of commits by never committing the same value as the one stored.
If this puts too much strain on the backend, we can wait until post prod to find a more elegant solution.
Test link