Closed
Conversation
- Changed module.exports to export { StatsWindow } for proper require() destructuring
- Added comprehensive unit test for displayInfo() method in statistics.test.js
- All tests pass locally and ESLint checks pass
…GitHub issue documentation
…shooting documentation
Contributor
|
✅ All Jest tests passed! This PR is ready to merge. |
Contributor
|
❌ Some Jest tests failed. Please check the logs and fix the issues before merging. Failed Tests: |
0b86fb4 to
e77439c
Compare
Contributor
|
✅ All Jest tests passed! This PR is ready to merge. |
Contributor
|
✅ All Jest tests passed! This PR is ready to merge. |
Contributor
|
✅ All Jest tests passed! This PR is ready to merge. |
Contributor
|
✅ All Jest tests passed! This PR is ready to merge. |
…nd defer non-critical initialization
Contributor
|
❌ Some Jest tests failed. Please check the logs and fix the issues before merging. Failed Tests: |
Contributor
|
❌ Some Jest tests failed. Please check the logs and fix the issues before merging. Failed Tests: |
vanshika2720
pushed a commit
to vanshika2720/musicblocks
that referenced
this pull request
Jan 23, 2026
The application was experiencing a 5-second delay before becoming interactive due to a hardcoded setTimeout(5000) wrapping the critical initialization logic (setupDependencies() and domReady()). The domReady! AMD module already ensures the DOM is fully loaded before executing the callback, making the additional 5-second delay redundant and harmful to user experience. Changes: - Removed setTimeout(5000) wrapper from require(['domReady!']) callback - setupDependencies() and domReady() now execute immediately when DOM is ready - All existing Jest tests pass (94 suites, 2532 tests) Impact: - UI becomes interactive within 1-2 seconds instead of 5+ seconds - Improved perceived performance and user experience - No breaking changes or functionality loss AI Assistance Disclosure: This fix was developed with assistance from Claude AI (Gemini/Antigravity). Full conversation history and prompts are available upon request as per Sugar Labs AI contribution guidelines.
vanshika2720
pushed a commit
to vanshika2720/musicblocks
that referenced
this pull request
Jan 23, 2026
Removed the setTimeout(5000) that was delaying UI initialization. The domReady callback already ensures DOM is loaded, so the extra delay was causing poor UX with 5+ second wait times. Now the app initializes immediately when DOM is ready. Tested with npm test - all suites pass.
11 tasks
Contributor
|
@Pankajyadav919 PR #5298 solves this and merged.So now you can close this ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
###Summary of changes
Fixes undefined language usage by introducing a safe language resolver (getLanguage()).
Prevents potential race conditions by initializing i18n before loading the rest of the application.
Improves language change handling by updating translated content only after i18next is ready.
Cleans up RequireJS configuration by removing unused paths.
###Performance improvements
Avoids unnecessary re-initialization and redundant listeners.
Lays groundwork for enabling proper caching of translation files.
Ensures translated DOM content updates consistently and safely.
###Why this change is needed
The previous implementation could reference an undefined language variable, leading to runtime errors or silent failures.
Additionally, forced cache-busting and repeated DOM queries could negatively impact page load time and performance.