Skip to content

Fix/stop button visibility#5783

Open
manvirsingh01 wants to merge 3 commits intosugarlabs:masterfrom
manvirsingh01:fix/stop-button-visibility
Open

Fix/stop button visibility#5783
manvirsingh01 wants to merge 3 commits intosugarlabs:masterfrom
manvirsingh01:fix/stop-button-visibility

Conversation

@manvirsingh01
Copy link

@manvirsingh01 manvirsingh01 commented Feb 18, 2026

Title: Only show Stop during active playback #5779

Description:
This PR fixes the confusing UI state where the Stop button appears on page load even though nothing is playing. Stop is now hidden by default, shown only while playback is active, and hidden again when playback ends or is stopped. This aligns the toolbar with actual playback state and prevents users from seeing an inert Stop control.

Changes:

  • Initialize the Stop button as hidden in the toolbar and markup to prevent first-paint flash.
  • Toggle Stop visibility via playback lifecycle hooks (onRunTurtle / onStopTurtle).
  • Update toolbar unit test expectations for the new default state.

Testing:

@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

❌ Some Jest tests failed. Please check the logs and fix the issues before merging.

Failed Tests:

loader.test.js

@vanshika2720
Copy link
Contributor

@manvirsingh01 please pull the latest master, rebase it into your branch, and push again.

- Add local toTitleCase() function in planet/js/GlobalTag.js since it
  runs inside the Planet iframe without access to the global from
  js/utils/utils.js.
- Remove orphaned doSearch() call from index.html that ran at
  $(document).ready() time before the Activity object was created.

Fixes: toTitleCase is not defined, doSearch is not defined
@manvirsingh01 manvirsingh01 force-pushed the fix/stop-button-visibility branch from 6af6cd5 to 94bef72 Compare February 19, 2026 06:44
@github-actions
Copy link
Contributor

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

@manvirsingh01
Copy link
Author

@vanshika2720 Thank you for your help earlier. I’ve pulled the latest master, rebased, resolved the issues, and pushed the updates. Could you please review the PR now?

Copy link
Contributor

@vanshika2720 vanshika2720 left a comment

Choose a reason for hiding this comment

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

stop fix @manvirsingh01 The Stop button fix works correctly and testing looks good.

However, the Node version update and GlobalTag changes are unrelated to this fix.
It would be cleaner to move those into separate PRs to keep changes scoped.
and also resolve merge conflicts.

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.

2 participants