Skip to content

made mouse move throttle configurable - #763

Open
johanneszelger wants to merge 4 commits into
lightning-js:devfrom
johanneszelger:feature/configurable-mouse-throttle
Open

johanneszelger wants to merge 4 commits into
lightning-js:devfrom
johanneszelger:feature/configurable-mouse-throttle

Conversation

@johanneszelger

Copy link
Copy Markdown

mouse move throttle was a fixed 100ms, can now be configurate.

motivation: for some screens such as a login screen with a custom keyboard, 100ms can feel unresponsive.

@CLAassistant

CLAassistant commented Sep 18, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@johanneszelger
johanneszelger force-pushed the feature/configurable-mouse-throttle branch from 89a8832 to 4ef934c Compare September 18, 2026 10:43
@michielvandergeest
michielvandergeest changed the base branch from master to dev September 18, 2026 12:54
@michielvandergeest
michielvandergeest changed the base branch from dev to master September 18, 2026 13:03
@michielvandergeest
michielvandergeest changed the base branch from master to dev September 18, 2026 13:03
@github-actions

Copy link
Copy Markdown

Linting errors found

These linting errors must be fixed before this PR can be merged:

src/application.mouse.test.js
  Line 312:46: Delete `,` (prettier/prettier)

Run npm run lint:fix to automatically fix some of these issues.

@github-actions

Copy link
Copy Markdown

Test Results: ✅ PASSED

Run at: 2026-09-18T13:05:14.240Z

Summary:
passed: 1389 failed: 0 of 1389 tests

@michielvandergeest michielvandergeest left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @johanneszelger, thanks for this PR! ❤️

Looks good, I left a small comment.

Also, we'll need the contributor licence agreement to be signed to move this one along. Thx

Comment thread src/application.js
// limit the amount of move events per time frame
mouseMoveHandler = (e) => {
if (e.timeStamp - lastMoved < 100) return
if (e.timeStamp - lastMoved < Settings.get('mouseMoveThrottle', 100)) return

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we move the Settings.get() method outside of this callback function, so we don't get the static session on every execution?

@johanneszelger

Copy link
Copy Markdown
Author

HI @michielvandergeest

i did sign it, and i did add my github accounts email to the commits (that was the earlier force push). not sure why its not working?

@johanneszelger

Copy link
Copy Markdown
Author

ok signed again, i think it worked now

@github-actions

Copy link
Copy Markdown

Linting errors found

These linting errors must be fixed before this PR can be merged:

src/application.mouse.test.js
  Line 318:46: Delete `,` (prettier/prettier)

Run npm run lint:fix to automatically fix some of these issues.

@github-actions

Copy link
Copy Markdown

Test Results: ✅ PASSED

Run at: 2026-09-18T14:25:00.071Z

Summary:
passed: 1405 failed: 0 of 1405 tests

@michielvandergeest

Copy link
Copy Markdown
Collaborator

nice! yeah CLA seems to be okay now 👍

would be great if you could address this comment here: #763

@johanneszelger

johanneszelger commented Sep 18, 2026

Copy link
Copy Markdown
Author

Hi Michiel,

i fixed the linting and added another improvement that allows consumers to change the trottling at runtime, for example during a fullscreen animation. Not sure if this is something you are happy to do, if not, i can revert the commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants