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

Shouldn't announceImmediately use canAlertUtterance? #25

Closed
zepumph opened this issue Aug 12, 2021 · 3 comments
Closed

Shouldn't announceImmediately use canAlertUtterance? #25

zepumph opened this issue Aug 12, 2021 · 3 comments
Assignees

Comments

@zepumph
Copy link
Member

zepumph commented Aug 12, 2021

Even though this function is meant to immediately announce an utterance, bypassing the queue, it still feels like we should be utilizing the same type of algorithm where we adhere to the Utterance's predicate. What do you think?

@zepumph
Copy link
Member Author

zepumph commented Aug 12, 2021

One reason I want this is so that in #22 we can use UtteranceQueue.canAlertUtterance as a central place to check if PhET-iO state is being set. Would that work?

@zepumph
Copy link
Member Author

zepumph commented Aug 12, 2021

I spoke with @jessegreenberg, we will add this support, and perhaps factor this out with the announce() call to another function in UtteranceQueue called both by immediately and not immediately announcings.

@zepumph
Copy link
Member Author

zepumph commented Aug 13, 2021

I ended up getting rid of canAlertUtterance, in exchange for a factored out function that checks the same conditions, and then announces (attemptToAnnounce). Closing

@zepumph zepumph closed this as completed Aug 13, 2021
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

No branches or pull requests

2 participants