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
handle alerts in audio cue service, add List Alerts
command and settings
#201833
Conversation
Thanks for integrating the AccessibleNotificationService into the AudioCueService! The PR is quite hard to review though, because it is a refactoring of the AccessibleNotificationService. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert the introduction of IAccessibleNotificationService in a separate PR and rebase this PR again, so that it only contains the changes for the feature.
Now it is very hard to review the changes needed for the feature.
@hediet that would require reverting all 4 of these PRS, which would complicate things quite a bit. I'm happy to walk through the changes with you if you want on a call. I initially created the Essentially, now I call the |
List Alerts
command and settings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments
I understand. I do think however that the complexity the Btw. thank you for all your work on audio cues! :) I really appreciate that you push this feature. |
I agree, which is why I made the change that you suggested :)
Sounds good. Do you think we should do this now or as new and future requirements arise? |
I'm fine with either, as you have motivation and time! |
I have other stuff going on this iteration, so maybe in February we should meet. |
still wip |
@@ -174,7 +174,7 @@ export class AudioCueService extends Disposable implements IAudioCueService { | |||
() => /** @description config: audioCues.enabled */ this.configurationService.getValue<'on' | 'off' | 'auto' | 'userGesture' | 'always' | 'never'>('audioCues.enabled') | |||
); | |||
|
|||
private readonly isCueEnabledCache = new Cache((event: IAudioCueEvent) => { | |||
private readonly isCueEnabledCache = new Cache((event: { readonly cue: AudioCue; readonly userGesture?: boolean }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now, you could shorten the type to
{ cue: AudioCue; userGesture?: boolean }
or even use a different type (and adjust callers to getValue
):
[AudioCue, userGesture?: boolean]
... but that is just icing on the cake.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried this to no avail 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, that looks much better now!
By just looking at the code, moving out JSON.stringify
from Cache
to the use-sides looks like a complication of the code, but it actually reduces complexity, as you need less assumptions to understand Cache
.
Thanks for all of the reviews 👍🏼 |
fixes #195282
fixes #201910