diff --git a/src/vs/workbench/contrib/accessibility/browser/accessibility.contribution.ts b/src/vs/workbench/contrib/accessibility/browser/accessibility.contribution.ts index ed9b66104008a..c55340d0f75b6 100644 --- a/src/vs/workbench/contrib/accessibility/browser/accessibility.contribution.ts +++ b/src/vs/workbench/contrib/accessibility/browser/accessibility.contribution.ts @@ -10,15 +10,17 @@ import { LifecyclePhase } from 'vs/workbench/services/lifecycle/common/lifecycle import { Registry } from 'vs/platform/registry/common/platform'; import { IAccessibleViewService, AccessibleViewService } from 'vs/workbench/contrib/accessibility/browser/accessibleView'; import { UnfocusedViewDimmingContribution } from 'vs/workbench/contrib/accessibility/browser/unfocusedViewDimmingContribution'; -import { HoverAccessibleViewContribution, InlineCompletionsAccessibleViewContribution, NotificationAccessibleViewContribution } from 'vs/workbench/contrib/accessibility/browser/accessibilityContributions'; +import { HoverAccessibleViewContribution, InlineCompletionsAccessibleViewContribution, NotificationAccessibleViewContribution } from 'vs/workbench/contrib/accessibility/browser/accessibleViewContributions'; import { AccessibilityStatus } from 'vs/workbench/contrib/accessibility/browser/accessibilityStatus'; import { EditorAccessibilityHelpContribution } from 'vs/workbench/contrib/accessibility/browser/editorAccessibilityHelp'; -import { SaveAccessibilitySignalContribution } from 'vs/workbench/contrib/accessibility/browser/saveAccessibilitySignal'; +import { SaveAccessibilitySignalContribution } from 'vs/workbench/contrib/accessibilitySignals/browser/saveAccessibilitySignal'; import { CommentsAccessibilityHelpContribution } from 'vs/workbench/contrib/comments/browser/commentsAccessibility'; -import { DiffEditorActiveAnnouncementContribution } from 'vs/workbench/contrib/accessibility/browser/openDiffEditorAnnouncement'; +import { DiffEditorActiveAnnouncementContribution } from 'vs/workbench/contrib/accessibilitySignals/browser/openDiffEditorAnnouncement'; import { SpeechAccessibilitySignalContribution } from 'vs/workbench/contrib/speech/browser/speechAccessibilitySignal'; +import { registerAudioCueConfiguration } from 'vs/workbench/contrib/accessibility/browser/audioCueConfiguration'; registerAccessibilityConfiguration(); +registerAudioCueConfiguration(); registerSingleton(IAccessibleViewService, AccessibleViewService, InstantiationType.Delayed); const workbenchRegistry = Registry.as(WorkbenchExtensions.Workbench); diff --git a/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.ts b/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.ts index e77762626b780..29495275ab227 100644 --- a/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.ts +++ b/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.ts @@ -13,7 +13,6 @@ import { ISpeechService, SPEECH_LANGUAGES, SPEECH_LANGUAGE_CONFIG } from 'vs/wor import { Disposable } from 'vs/base/common/lifecycle'; import { IWorkbenchContribution } from 'vs/workbench/common/contributions'; import { Event } from 'vs/base/common/event'; -import { soundFeatureBase } from 'vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution'; export const accessibilityHelpIsShown = new RawContextKey('accessibilityHelpIsShown', false, true); export const accessibleViewIsShown = new RawContextKey('accessibleViewIsShown', false, true); @@ -95,6 +94,17 @@ export const accessibilityConfigurationNodeBase = Object.freeze(ConfigurationExtensions.Configuration).registerConfiguration({ + scope: ConfigurationScope.RESOURCE, + 'properties': { + 'audioCues.enabled': { + markdownDeprecationMessage: 'Deprecated. Use the specific setting for each audio cue instead (`audioCues.*`).', + tags: ['accessibility'] + }, + 'audioCues.volume': { + markdownDeprecationMessage: 'Deprecated. Use `accessibility.signals.sounds.volume` instead.', + tags: ['accessibility'] + }, + 'audioCues.debouncePositionChanges': { + 'description': localize('audioCues.debouncePositionChanges', "Whether or not position changes should be debounced"), + 'type': 'boolean', + 'default': false, + tags: ['accessibility'], + 'markdownDeprecationMessage': localize('audioCues.debouncePositionChangesDeprecated', 'This setting is deprecated, instead use the `signals.debouncePositionChanges` setting.') + }, + 'audioCues.lineHasBreakpoint': { + 'description': localize('audioCues.lineHasBreakpoint', "Plays a sound when the active line has a breakpoint."), + ...soundDeprecatedFeatureBase + }, + 'audioCues.lineHasInlineSuggestion': { + 'description': localize('audioCues.lineHasInlineSuggestion', "Plays a sound when the active line has an inline suggestion."), + ...soundDeprecatedFeatureBase + }, + 'audioCues.lineHasError': { + 'description': localize('audioCues.lineHasError', "Plays a sound when the active line has an error."), + ...soundDeprecatedFeatureBase, + }, + 'audioCues.lineHasFoldedArea': { + 'description': localize('audioCues.lineHasFoldedArea', "Plays a sound when the active line has a folded area that can be unfolded."), + ...soundDeprecatedFeatureBase, + }, + 'audioCues.lineHasWarning': { + 'description': localize('audioCues.lineHasWarning', "Plays a sound when the active line has a warning."), + ...soundDeprecatedFeatureBase, + default: 'off', + }, + 'audioCues.onDebugBreak': { + 'description': localize('audioCues.onDebugBreak', "Plays a sound when the debugger stopped on a breakpoint."), + ...soundDeprecatedFeatureBase, + }, + 'audioCues.noInlayHints': { + 'description': localize('audioCues.noInlayHints', "Plays a sound when trying to read a line with inlay hints that has no inlay hints."), + ...soundDeprecatedFeatureBase, + }, + 'audioCues.taskCompleted': { + 'description': localize('audioCues.taskCompleted', "Plays a sound when a task is completed."), + ...soundDeprecatedFeatureBase, + }, + 'audioCues.taskFailed': { + 'description': localize('audioCues.taskFailed', "Plays a sound when a task fails (non-zero exit code)."), + ...soundDeprecatedFeatureBase, + }, + 'audioCues.terminalCommandFailed': { + 'description': localize('audioCues.terminalCommandFailed', "Plays a sound when a terminal command fails (non-zero exit code)."), + ...soundDeprecatedFeatureBase, + }, + 'audioCues.terminalQuickFix': { + 'description': localize('audioCues.terminalQuickFix', "Plays a sound when terminal Quick Fixes are available."), + ...soundDeprecatedFeatureBase, + }, + 'audioCues.terminalBell': { + 'description': localize('audioCues.terminalBell', "Plays a sound when the terminal bell is ringing."), + ...soundDeprecatedFeatureBase, + default: 'on' + }, + 'audioCues.diffLineInserted': { + 'description': localize('audioCues.diffLineInserted', "Plays a sound when the focus moves to an inserted line in Accessible Diff Viewer mode or to the next/previous change."), + ...soundDeprecatedFeatureBase, + }, + 'audioCues.diffLineDeleted': { + 'description': localize('audioCues.diffLineDeleted', "Plays a sound when the focus moves to a deleted line in Accessible Diff Viewer mode or to the next/previous change."), + ...soundDeprecatedFeatureBase, + }, + 'audioCues.diffLineModified': { + 'description': localize('audioCues.diffLineModified', "Plays a sound when the focus moves to a modified line in Accessible Diff Viewer mode or to the next/previous change."), + ...soundDeprecatedFeatureBase, + }, + 'audioCues.notebookCellCompleted': { + 'description': localize('audioCues.notebookCellCompleted', "Plays a sound when a notebook cell execution is successfully completed."), + ...soundDeprecatedFeatureBase, + }, + 'audioCues.notebookCellFailed': { + 'description': localize('audioCues.notebookCellFailed', "Plays a sound when a notebook cell execution fails."), + ...soundDeprecatedFeatureBase, + }, + 'audioCues.chatRequestSent': { + 'description': localize('audioCues.chatRequestSent', "Plays a sound when a chat request is made."), + ...soundDeprecatedFeatureBase, + default: 'off' + }, + 'audioCues.chatResponsePending': { + 'description': localize('audioCues.chatResponsePending', "Plays a sound on loop while the response is pending."), + ...soundDeprecatedFeatureBase, + default: 'auto' + }, + 'audioCues.chatResponseReceived': { + 'description': localize('audioCues.chatResponseReceived', "Plays a sound on loop while the response has been received."), + ...soundDeprecatedFeatureBase, + default: 'off' + }, + 'audioCues.clear': { + 'description': localize('audioCues.clear', "Plays a sound when a feature is cleared (for example, the terminal, Debug Console, or Output channel). When this is disabled, an ARIA alert will announce 'Cleared'."), + ...soundDeprecatedFeatureBase, + default: 'off' + }, + 'audioCues.save': { + 'markdownDescription': localize('audioCues.save', "Plays a sound when a file is saved. Also see {0}", '`#accessibility.alert.save#`'), + 'type': 'string', + 'enum': ['userGesture', 'always', 'never'], + 'default': 'never', + 'enumDescriptions': [ + localize('audioCues.save.userGesture', "Plays the audio cue when a user explicitly saves a file."), + localize('audioCues.save.always', "Plays the audio cue whenever a file is saved, including auto save."), + localize('audioCues.save.never', "Never plays the audio cue.") + ], + tags: ['accessibility'], + markdownDeprecationMessage + }, + 'audioCues.format': { + 'markdownDescription': localize('audioCues.format', "Plays a sound when a file or notebook is formatted. Also see {0}", '`#accessibility.alert.format#`'), + 'type': 'string', + 'enum': ['userGesture', 'always', 'never'], + 'default': 'never', + 'enumDescriptions': [ + localize('audioCues.format.userGesture', "Plays the audio cue when a user explicitly formats a file."), + localize('audioCues.format.always', "Plays the audio cue whenever a file is formatted, including if it is set to format on save, type, or, paste, or run of a cell."), + localize('audioCues.format.never', "Never plays the audio cue.") + ], + tags: ['accessibility'], + markdownDeprecationMessage + }, + }, + }); +} diff --git a/src/vs/workbench/contrib/accessibility/browser/editorAccessibilityHelp.ts b/src/vs/workbench/contrib/accessibility/browser/editorAccessibilityHelp.ts index a28f965e588ab..10f0392f38278 100644 --- a/src/vs/workbench/contrib/accessibility/browser/editorAccessibilityHelp.ts +++ b/src/vs/workbench/contrib/accessibility/browser/editorAccessibilityHelp.ts @@ -15,7 +15,7 @@ import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { AccessibleViewProviderId, AccessibilityVerbositySettingId } from 'vs/workbench/contrib/accessibility/browser/accessibilityConfiguration'; -import { descriptionForCommand } from 'vs/workbench/contrib/accessibility/browser/accessibilityContributions'; +import { descriptionForCommand } from 'vs/workbench/contrib/accessibility/browser/accessibleViewContributions'; import { IAccessibleViewService, IAccessibleContentProvider, IAccessibleViewOptions, AccessibleViewType } from 'vs/workbench/contrib/accessibility/browser/accessibleView'; import { AccessibilityHelpAction } from 'vs/workbench/contrib/accessibility/browser/accessibleViewActions'; import { CONTEXT_PROVIDER_EXISTS } from 'vs/workbench/contrib/chat/common/chatContextKeys'; diff --git a/src/vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution.ts b/src/vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution.ts index 92968ad511ad2..f0ce38c970e7b 100644 --- a/src/vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution.ts +++ b/src/vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution.ts @@ -4,9 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { ShowAccessibilityAnnouncementHelp, ShowSignalSoundHelp } from 'vs/workbench/contrib/accessibilitySignals/browser/commands'; -import { localize } from 'vs/nls'; import { registerAction2 } from 'vs/platform/actions/common/actions'; -import { Extensions as ConfigurationExtensions, ConfigurationScope, IConfigurationPropertySchema, IConfigurationRegistry } from 'vs/platform/configuration/common/configurationRegistry'; import { InstantiationType, registerSingleton } from 'vs/platform/instantiation/common/extensions'; import { Registry } from 'vs/platform/registry/common/platform'; import { Extensions as WorkbenchExtensions, IWorkbenchContributionsRegistry } from 'vs/workbench/common/contributions'; @@ -20,160 +18,6 @@ registerSingleton(IAccessibilitySignalService, AccessibilitySignalService, Insta Registry.as(WorkbenchExtensions.Workbench).registerWorkbenchContribution(SignalLineFeatureContribution, LifecyclePhase.Restored); Registry.as(WorkbenchExtensions.Workbench).registerWorkbenchContribution(AccessibilitySignalLineDebuggerContribution, LifecyclePhase.Restored); -export const soundFeatureBase: IConfigurationPropertySchema = { - 'type': 'string', - 'enum': ['auto', 'on', 'off'], - 'default': 'auto', - 'enumDescriptions': [ - localize('audioCues.enabled.auto', "Enable sound when a screen reader is attached."), - localize('audioCues.enabled.on', "Enable sound."), - localize('audioCues.enabled.off', "Disable sound.") - ], - tags: ['accessibility'], -}; -const markdownDeprecationMessage = localize('audioCues.enabled.deprecated', "This setting is deprecated. Use `signals` settings instead."); -const soundDeprecatedFeatureBase: IConfigurationPropertySchema = { - ...soundFeatureBase, - markdownDeprecationMessage -}; - -Registry.as(ConfigurationExtensions.Configuration).registerConfiguration({ - scope: ConfigurationScope.RESOURCE, - 'properties': { - 'audioCues.enabled': { - markdownDeprecationMessage: 'Deprecated. Use the specific setting for each audio cue instead (`audioCues.*`).', - tags: ['accessibility'] - }, - 'audioCues.volume': { - markdownDeprecationMessage: 'Deprecated. Use `accessibility.signals.sounds.volume` instead.', - tags: ['accessibility'] - }, - 'audioCues.debouncePositionChanges': { - 'description': localize('audioCues.debouncePositionChanges', "Whether or not position changes should be debounced"), - 'type': 'boolean', - 'default': false, - tags: ['accessibility'], - 'markdownDeprecationMessage': localize('audioCues.debouncePositionChangesDeprecated', 'This setting is deprecated, instead use the `signals.debouncePositionChanges` setting.') - }, - 'audioCues.lineHasBreakpoint': { - 'description': localize('audioCues.lineHasBreakpoint', "Plays a sound when the active line has a breakpoint."), - ...soundDeprecatedFeatureBase - }, - 'audioCues.lineHasInlineSuggestion': { - 'description': localize('audioCues.lineHasInlineSuggestion', "Plays a sound when the active line has an inline suggestion."), - ...soundDeprecatedFeatureBase - }, - 'audioCues.lineHasError': { - 'description': localize('audioCues.lineHasError', "Plays a sound when the active line has an error."), - ...soundDeprecatedFeatureBase, - }, - 'audioCues.lineHasFoldedArea': { - 'description': localize('audioCues.lineHasFoldedArea', "Plays a sound when the active line has a folded area that can be unfolded."), - ...soundDeprecatedFeatureBase, - }, - 'audioCues.lineHasWarning': { - 'description': localize('audioCues.lineHasWarning', "Plays a sound when the active line has a warning."), - ...soundDeprecatedFeatureBase, - default: 'off', - }, - 'audioCues.onDebugBreak': { - 'description': localize('audioCues.onDebugBreak', "Plays a sound when the debugger stopped on a breakpoint."), - ...soundDeprecatedFeatureBase, - }, - 'audioCues.noInlayHints': { - 'description': localize('audioCues.noInlayHints', "Plays a sound when trying to read a line with inlay hints that has no inlay hints."), - ...soundDeprecatedFeatureBase, - }, - 'audioCues.taskCompleted': { - 'description': localize('audioCues.taskCompleted', "Plays a sound when a task is completed."), - ...soundDeprecatedFeatureBase, - }, - 'audioCues.taskFailed': { - 'description': localize('audioCues.taskFailed', "Plays a sound when a task fails (non-zero exit code)."), - ...soundDeprecatedFeatureBase, - }, - 'audioCues.terminalCommandFailed': { - 'description': localize('audioCues.terminalCommandFailed', "Plays a sound when a terminal command fails (non-zero exit code)."), - ...soundDeprecatedFeatureBase, - }, - 'audioCues.terminalQuickFix': { - 'description': localize('audioCues.terminalQuickFix', "Plays a sound when terminal Quick Fixes are available."), - ...soundDeprecatedFeatureBase, - }, - 'audioCues.terminalBell': { - 'description': localize('audioCues.terminalBell', "Plays a sound when the terminal bell is ringing."), - ...soundDeprecatedFeatureBase, - default: 'on' - }, - 'audioCues.diffLineInserted': { - 'description': localize('audioCues.diffLineInserted', "Plays a sound when the focus moves to an inserted line in Accessible Diff Viewer mode or to the next/previous change."), - ...soundDeprecatedFeatureBase, - }, - 'audioCues.diffLineDeleted': { - 'description': localize('audioCues.diffLineDeleted', "Plays a sound when the focus moves to a deleted line in Accessible Diff Viewer mode or to the next/previous change."), - ...soundDeprecatedFeatureBase, - }, - 'audioCues.diffLineModified': { - 'description': localize('audioCues.diffLineModified', "Plays a sound when the focus moves to a modified line in Accessible Diff Viewer mode or to the next/previous change."), - ...soundDeprecatedFeatureBase, - }, - 'audioCues.notebookCellCompleted': { - 'description': localize('audioCues.notebookCellCompleted', "Plays a sound when a notebook cell execution is successfully completed."), - ...soundDeprecatedFeatureBase, - }, - 'audioCues.notebookCellFailed': { - 'description': localize('audioCues.notebookCellFailed', "Plays a sound when a notebook cell execution fails."), - ...soundDeprecatedFeatureBase, - }, - 'audioCues.chatRequestSent': { - 'description': localize('audioCues.chatRequestSent', "Plays a sound when a chat request is made."), - ...soundDeprecatedFeatureBase, - default: 'off' - }, - 'audioCues.chatResponsePending': { - 'description': localize('audioCues.chatResponsePending', "Plays a sound on loop while the response is pending."), - ...soundDeprecatedFeatureBase, - default: 'auto' - }, - 'audioCues.chatResponseReceived': { - 'description': localize('audioCues.chatResponseReceived', "Plays a sound on loop while the response has been received."), - ...soundDeprecatedFeatureBase, - default: 'off' - }, - 'audioCues.clear': { - 'description': localize('audioCues.clear', "Plays a sound when a feature is cleared (for example, the terminal, Debug Console, or Output channel). When this is disabled, an ARIA alert will announce 'Cleared'."), - ...soundDeprecatedFeatureBase, - default: 'off' - }, - 'audioCues.save': { - 'markdownDescription': localize('audioCues.save', "Plays a sound when a file is saved. Also see {0}", '`#accessibility.alert.save#`'), - 'type': 'string', - 'enum': ['userGesture', 'always', 'never'], - 'default': 'never', - 'enumDescriptions': [ - localize('audioCues.save.userGesture', "Plays the audio cue when a user explicitly saves a file."), - localize('audioCues.save.always', "Plays the audio cue whenever a file is saved, including auto save."), - localize('audioCues.save.never', "Never plays the audio cue.") - ], - tags: ['accessibility'], - markdownDeprecationMessage - }, - 'audioCues.format': { - 'markdownDescription': localize('audioCues.format', "Plays a sound when a file or notebook is formatted. Also see {0}", '`#accessibility.alert.format#`'), - 'type': 'string', - 'enum': ['userGesture', 'always', 'never'], - 'default': 'never', - 'enumDescriptions': [ - localize('audioCues.format.userGesture', "Plays the audio cue when a user explicitly formats a file."), - localize('audioCues.format.always', "Plays the audio cue whenever a file is formatted, including if it is set to format on save, type, or, paste, or run of a cell."), - localize('audioCues.format.never', "Never plays the audio cue.") - ], - tags: ['accessibility'], - markdownDeprecationMessage - }, - }, -}); - registerAction2(ShowSignalSoundHelp); registerAction2(ShowAccessibilityAnnouncementHelp); diff --git a/src/vs/workbench/contrib/accessibility/browser/openDiffEditorAnnouncement.ts b/src/vs/workbench/contrib/accessibilitySignals/browser/openDiffEditorAnnouncement.ts similarity index 100% rename from src/vs/workbench/contrib/accessibility/browser/openDiffEditorAnnouncement.ts rename to src/vs/workbench/contrib/accessibilitySignals/browser/openDiffEditorAnnouncement.ts diff --git a/src/vs/workbench/contrib/accessibility/browser/saveAccessibilitySignal.ts b/src/vs/workbench/contrib/accessibilitySignals/browser/saveAccessibilitySignal.ts similarity index 100% rename from src/vs/workbench/contrib/accessibility/browser/saveAccessibilitySignal.ts rename to src/vs/workbench/contrib/accessibilitySignals/browser/saveAccessibilitySignal.ts diff --git a/src/vs/workbench/contrib/chat/browser/chat.contribution.ts b/src/vs/workbench/contrib/chat/browser/chat.contribution.ts index f9b88620377cc..0aff29be67767 100644 --- a/src/vs/workbench/contrib/chat/browser/chat.contribution.ts +++ b/src/vs/workbench/contrib/chat/browser/chat.contribution.ts @@ -19,7 +19,7 @@ import { EditorPaneDescriptor, IEditorPaneRegistry } from 'vs/workbench/browser/ import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions, WorkbenchPhase, registerWorkbenchContribution2 } from 'vs/workbench/common/contributions'; import { EditorExtensions, IEditorFactoryRegistry } from 'vs/workbench/common/editor'; import { AccessibilityVerbositySettingId, AccessibleViewProviderId } from 'vs/workbench/contrib/accessibility/browser/accessibilityConfiguration'; -import { alertFocusChange } from 'vs/workbench/contrib/accessibility/browser/accessibilityContributions'; +import { alertFocusChange } from 'vs/workbench/contrib/accessibility/browser/accessibleViewContributions'; import { AccessibleViewType, IAccessibleViewService } from 'vs/workbench/contrib/accessibility/browser/accessibleView'; import { AccessibleViewAction } from 'vs/workbench/contrib/accessibility/browser/accessibleViewActions'; import { registerChatActions } from 'vs/workbench/contrib/chat/browser/actions/chatActions';