Matter Ikea Scroll: Add global scroll state#3039
Conversation
|
Invitation URL: |
Test Results 73 files 516 suites 0s ⏱️ Results for commit fb7fe8b. |
|
Minimum allowed coverage is Generated by 🐒 cobertura-action against fb7fe8b |
|
Is the idea of the timer rather than just always tracking the state that we get protected for a certain amount of time, but still allow the device to send us new out of bounds events just in case, if if we were to get the state tracking wrong? Is it possible for us to ignore any valid events? Also, is the behavior like the following?
Does that feel intuitive? I'm not arguing for or against, just wondering if you've tested to see how it feels. |
Basically, yeah. The timer basically protects us within a context window that we can be fairly confident about for this device. But as to why we need a timer, imagine this is scrolling a dimmable bulb. In the moment we can cap between -100 and 100, but what if later the user moves the level to 30? Then scrolling "up" should definitely do something. I think this strangeness speaks to the fact that this work is kind of a "stopgap" while the logic is moved to the bulb step logic more directly. So yeah, technically a >100 scroll is totally valid and so in a way, this would be ignoring "valid" events, but those >100 scrolls are not used by our current production logic.
Yeah I've tested all this and as far as the current use cases for the scroll, this is totally fine today, since past 100% there is no way the dimmable bulb would have anywhere more to go up, vice versa for down. However, |
|
Discussed offline for a bit. Clarified a typo in my original comment which should read "User scrolls down to 100%", and confirmed the originally postulation for the behavior was correct. Also confirmed that the behavior makes more sense having an arbitrary gate at 100%, where there might not be any tactile feedback on where that 100% is. |
Description of Change
Add global state to check for upper and lower bounds within a time frame for the ikea scroll. This should halt extra rotateAmount events from being processed after the threshold for "100%" has been reached.
Summary of Completed Tests
Tested on-device