Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐞 [Website] Add some debugging UI #78

Merged
merged 27 commits into from
Jan 27, 2024
Merged

🐞 [Website] Add some debugging UI #78

merged 27 commits into from
Jan 27, 2024

Conversation

beefchimi
Copy link
Owner

@beefchimi beefchimi commented Jan 22, 2024

This PR originally set out to just add some debugging UI to the app > website... but I made a decision about auto-suspension along the way and changed some Earwurm behaviour.

Added in this PR

  • New .resume() and .suspend() methods exposed on the Earwurm instance.
    • Allows consumers more control over their Earwurm state.
  • New Earwurm > play event listener.
    • You can use this to get a boolean update whenever the Earwurm toggles between any sound playing and nothing playing.
    • Example: manager.on('play', (active) => console.log('is playing:', active.toString())).
  • Added some debug UI + logic to the app > website.
    • Now, if you visit the website (in any environment), you can append the ?mode=debug param to the end of the url.
    • Example: http://localhost:5173/earwurm/?mode=debug

Changed in this PR

  • Removed the “timed auto-suspend” behaviour.
    • With the new play event, it is now easy for consumers to specify this behaviour themselves.
  • While there is no more “timed auto-suspend”, the Earwurm will attempt to optimistically suspend whenever:
    • All Stacks have been removed from the Earwurm. instance.
    • .stop() has been called on the Earwurn instance.
  • Will now auto-resume a suspended state when .play() is called on a Sound.
  • Now emitting an error in the case a .suspend() fails.

@beefchimi beefchimi self-assigned this Jan 22, 2024
Copy link

changeset-bot bot commented Jan 22, 2024

🦋 Changeset detected

Latest commit: c47319b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
earwurm Minor
website Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added 🧪 Testing Relating to testing of this code 📚 Documentation Improvements or additions to documentation labels Jan 22, 2024
@beefchimi beefchimi marked this pull request as ready for review January 27, 2024 23:22
@github-actions github-actions bot added 🧰 Dependency Any dependency change (add / remove / downgrade / update) 🛠️ Tooling Relating to build tooling or deployment labels Jan 27, 2024
@beefchimi beefchimi merged commit 272c601 into main Jan 27, 2024
3 checks passed
@beefchimi beefchimi deleted the debug branch January 27, 2024 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧰 Dependency Any dependency change (add / remove / downgrade / update) 📚 Documentation Improvements or additions to documentation 🧪 Testing Relating to testing of this code 🛠️ Tooling Relating to build tooling or deployment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant