Skip to content

Fix delayed UI update by handling state cleanup on click#5107

Closed
021nirav-blip wants to merge 70 commits intosugarlabs:masterfrom
021nirav-blip:fix-mouse-responce-issue
Closed

Fix delayed UI update by handling state cleanup on click#5107
021nirav-blip wants to merge 70 commits intosugarlabs:masterfrom
021nirav-blip:fix-mouse-responce-issue

Conversation

@021nirav-blip
Copy link
Copy Markdown
Contributor

What this does

Moves block interaction state cleanup from mouseout to click,
fixing delayed sidebar expansion and contraction.

Why this is needed

Previously, UI state updates were triggered on mouseout, which only
fires when the cursor moves away. This caused the sidebar to update late.
Handling the cleanup on click makes the UI respond immediately.

How to test

  1. Click note-value or instrument blocks
  2. Do not move the mouse
  3. Sidebar updates immediately

Fixes #3499

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 9, 2026

✅ All Jest tests passed! This PR is ready to merge.

@walterbender
Copy link
Copy Markdown
Member

This seems to resolve the issue but you need to fix some linting issues.

@github-actions
Copy link
Copy Markdown
Contributor

✅ All Jest tests passed! This PR is ready to merge.

Comment thread js/activity.js Outdated
@github-actions
Copy link
Copy Markdown
Contributor

✅ All Jest tests passed! This PR is ready to merge.

1 similar comment
@github-actions
Copy link
Copy Markdown
Contributor

✅ All Jest tests passed! This PR is ready to merge.

varruunnn and others added 21 commits January 28, 2026 22:18
* feat: Upgrade Horizontal Scrolling to Omnidirectional Scrolling

- Replaces 'Horizontal Scrolling' with 'Omnidirectional Scrolling'
- Enables simultaneous X and Y scrolling (diagonal panning) when enabled in Advanced Mode
- Restricts scrolling to Vertical-only in Beginner Mode or when disabled
- Updates UI strings, tooltips, and Pie Menu labels to reflect the new functionality

* style: Remove redundant JSDoc comment in activity.js

* Linitng changes

* Keeping the Horizontal name intact

* Linting changes
…abs#5138)

* Fix i18n: Add missing Telugu translation and localize confirm and cancel buttons

* Add Telugu translation for 'Clear Workspace'
* Fix broken Music Blocks Guide link (404)

* Format turtledefs.js with Prettier

* Update guide link to Docs/guide after docs refactor

* fixed(turtle) link:

---------

Co-authored-by: Walter Bender <walter@sugarlabs.org>
* Added a Pie menu for Rhythm Maker

* Remove accidentally committed .DS_Store files

* Enable Type Functionality for Rhythm Maker

* Moved the Piemenu code to piemenus.js

* Ignore macOS .DS_Store files
* Fix auxiliary menu crash in non-English locales

* Fix ESLint/Prettier formatting in js/activity.js
…abs#5018)

* refactor: extract responsive breakpoint widths into constants

- Add BREAKPOINT_TABLET (768px) and BREAKPOINT_MOBILE (600px) constants
- Replace 5 hardcoded breakpoint values with named constants
- Improves code maintainability and prevents magic numbers

Affected lines: 769, 776, 787, 794, 856 in js/activity.js

* changing to a much verbose variable name
Update Babel toolchain dependencies:
- @babel/core: 7.11.1 → 7.28.5
- @babel/eslint-parser: 7.26.10 → 7.28.5
- @babel/preset-env: 7.11.0 → 7.28.5
- Remove deprecated babel-eslint package

Fixes sugarlabs#5148
Part of sugarlabs#4668
- Remove unused variables in SaveInterface.js (savedNotationOutput, savedNotationNotes)
- Remove legacy ES5 Object.keys fallback with const reassignment bug in logo.js
- Fix superfluous arguments passed to __clear() function

Follow-up to sugarlabs#4942 addressing Copilot code review suggestions.
All changes verified with lint and full test suite (2275/2275 tests passed).
…5070)

* Improve Tremolo block tooltip with parameter explanations

* Improve Tremolo block tooltip for translation-friendliness
* fix: instant theme switching without page reload

* Fix canvas background not updating on theme switch

* Refactor theme application to use arrow functions

* Refactor themebox test for consistency and clarity

* Refactor getItem mock implementation in tests

Refactor jest.spyOn for getItem to improve readability.

* Refactor themebox test for improved readability

* prettier

---------

Co-authored-by: Walter Bender <walter@sorceo.com>
…ject helper (sugarlabs#4995)

* refactor: replace unsafe eval with resolveObject helper in utils.js

* refactor: replace safeEval's eval() with new Function()

* revert: keep original eval in safeEval, focus PR on resolveObject only

* refactor: move resolveObject to module scope

* fix(utils): improve resolveObject error handling and environment support

* fix(utils): add fallback resolution for nested class properties

The resolveObject helper failed to resolve certain nested static class
properties (e.g. Turtles.TurtlesView), resulting in missing methods
such as doScale during initialization.

This change adds a narrow fallback for cases where safe property
resolution returns undefined, restoring previous behavior while
keeping the primary resolution path intact.

Addresses initialization failure reported during review.

* style: apply prettier formatting to utils.js
…s#5165)

* Fixed text color in light mode

* fix: help widget in dark mode and overall text coloring

* fix prettier formatting
Nikhita-14 and others added 19 commits January 28, 2026 22:18
* Update PO, POT, and JSON files to standardize 'Media' and 'Sensors' labels

* Fix 'media' and 'sensors' labels and inconsistencies
* pitch comparison for tied chords

* chore: retrigger CI

* chore: retrigger CI

* chore: format js/turtle-singer.js with CI Prettier
- cssnano: 6.0.1 → 6.1.2 (minor update)
- Remove clean-css: unused direct dependency (gulp-clean-css bundles its own)

Part of sugarlabs#4668
…ugarlabs#4990)

* Fix: Resolve p5/Tone.js conflict using adapter pattern

* style: apply prettier formatting to adapter files
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.21 to 4.17.23.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](lodash/lodash@4.17.21...4.17.23)

---
updated-dependencies:
- dependency-name: lodash
  dependency-version: 4.17.23
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Optimizes the _testConnectionType method in js/blocks.js by replacing a linear series of string comparisons with a constant-time Set lookup. This reduces complexity and improves maintainability.
- Remove global doSearch() call from index.html that was causing race condition
- Add proper activity.doSearch() initialization in RequireJS domReady flow
- Fix 2 failing Jest tests in abc.test.js by correcting expected string values
- All 26 tests now pass (was 24 passing, 2 failing)
Moves block interaction state cleanup from mouseout to click,
fixing delayed sidebar expansion and contraction.

Previously, UI state updates were triggered on mouseout, which only
fires when the cursor moves away. This caused the sidebar to update
late. Handling the cleanup on click makes the UI respond immediately.

Fixes sugarlabs#3499
@021nirav-blip 021nirav-blip force-pushed the fix-mouse-responce-issue branch from 6867db7 to bcaabc0 Compare January 28, 2026 18:45
@github-actions
Copy link
Copy Markdown
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@github-actions
Copy link
Copy Markdown
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@021nirav-blip
Copy link
Copy Markdown
Contributor Author

@walterbender please review this PR

@github-actions
Copy link
Copy Markdown
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@walterbender
Copy link
Copy Markdown
Member

Please make a clean PR with just the relevant changes.

@021nirav-blip 021nirav-blip deleted the fix-mouse-responce-issue branch February 2, 2026 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Late expansion and contraction of setInstrument and start sidebar when note value blocks are expanded or contracted