Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
896fb669
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
896fb669
编写于
9月 23, 2020
作者:
R
Rob Lourens
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Clean up dead aria-label code #106897
上级
392ea6dc
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
2 addition
and
29 deletion
+2
-29
src/vs/workbench/contrib/preferences/browser/settingsEditor2.ts
.../workbench/contrib/preferences/browser/settingsEditor2.ts
+2
-29
未找到文件。
src/vs/workbench/contrib/preferences/browser/settingsEditor2.ts
浏览文件 @
896fb669
...
...
@@ -28,7 +28,6 @@ import { ConfigurationTarget, IConfigurationOverrides, IConfigurationService } f
import
{
IContextKey
,
IContextKeyService
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
IEditorModel
}
from
'
vs/platform/editor/common/editor
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IKeybindingService
}
from
'
vs/platform/keybinding/common/keybinding
'
;
import
{
ILogService
}
from
'
vs/platform/log/common/log
'
;
import
{
INotificationService
}
from
'
vs/platform/notification/common/notification
'
;
import
{
IStorageService
,
StorageScope
}
from
'
vs/platform/storage/common/storage
'
;
...
...
@@ -47,7 +46,7 @@ import { AbstractSettingRenderer, ISettingLinkClickEvent, ISettingOverrideClickE
import
{
ISettingsEditorViewState
,
parseQuery
,
SearchResultIdx
,
SearchResultModel
,
SettingsTreeElement
,
SettingsTreeGroupChild
,
SettingsTreeGroupElement
,
SettingsTreeModel
,
SettingsTreeSettingElement
}
from
'
vs/workbench/contrib/preferences/browser/settingsTreeModels
'
;
import
{
settingsTextInputBorder
}
from
'
vs/workbench/contrib/preferences/browser/settingsWidgets
'
;
import
{
createTOCIterator
,
TOCTree
,
TOCTreeModel
}
from
'
vs/workbench/contrib/preferences/browser/tocTree
'
;
import
{
CONTEXT_SETTINGS_EDITOR
,
CONTEXT_SETTINGS_SEARCH_FOCUS
,
CONTEXT_TOC_ROW_FOCUS
,
EXTENSION_SETTING_TAG
,
IPreferencesSearchService
,
ISearchProvider
,
MODIFIED_SETTING_TAG
,
SETTINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS
,
SETTINGS_EDITOR_COMMAND_SHOW_CONTEXT_MENU
}
from
'
vs/workbench/contrib/preferences/common/preferences
'
;
import
{
CONTEXT_SETTINGS_EDITOR
,
CONTEXT_SETTINGS_SEARCH_FOCUS
,
CONTEXT_TOC_ROW_FOCUS
,
EXTENSION_SETTING_TAG
,
IPreferencesSearchService
,
ISearchProvider
,
MODIFIED_SETTING_TAG
,
SETTINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS
}
from
'
vs/workbench/contrib/preferences/common/preferences
'
;
import
{
IEditorGroup
,
IEditorGroupsService
}
from
'
vs/workbench/services/editor/common/editorGroupsService
'
;
import
{
IPreferencesService
,
ISearchResult
,
ISettingsEditorModel
,
ISettingsEditorOptions
,
SettingsEditorOptions
,
SettingValueType
}
from
'
vs/workbench/services/preferences/common/preferences
'
;
import
{
SettingsEditor2Input
}
from
'
vs/workbench/services/preferences/common/preferencesEditorInput
'
;
...
...
@@ -120,8 +119,6 @@ export class SettingsEditor2 extends EditorPane {
private
tocTreeContainer
!
:
HTMLElement
;
private
tocTree
!
:
TOCTree
;
private
settingsAriaExtraLabelsContainer
!
:
HTMLElement
;
private
delayedFilterLogging
:
Delayer
<
void
>
;
private
localSearchDelayer
:
Delayer
<
void
>
;
private
remoteSearchThrottle
:
ThrottledDelayer
<
void
>
;
...
...
@@ -165,7 +162,6 @@ export class SettingsEditor2 extends EditorPane {
@
IStorageService
private
readonly
storageService
:
IStorageService
,
@
INotificationService
private
readonly
notificationService
:
INotificationService
,
@
IEditorGroupsService
protected
editorGroupService
:
IEditorGroupsService
,
@
IKeybindingService
private
readonly
keybindingService
:
IKeybindingService
,
@
IStorageKeysSyncRegistryService
storageKeysSyncRegistryService
:
IStorageKeysSyncRegistryService
,
@
IUserDataSyncWorkbenchService
private
readonly
userDataSyncWorkbenchService
:
IUserDataSyncWorkbenchService
,
@
IUserDataAutoSyncService
private
readonly
userDataAutoSyncService
:
IUserDataAutoSyncService
...
...
@@ -216,12 +212,7 @@ export class SettingsEditor2 extends EditorPane {
private
set
searchResultModel
(
value
:
SearchResultModel
|
null
)
{
this
.
_searchResultModel
=
value
;
DOM
.
toggleClass
(
this
.
rootElement
,
'
search-mode
'
,
!!
this
.
_searchResultModel
);
}
private
get
currentSettingsContextMenuKeyBindingLabel
():
string
{
const
keybinding
=
this
.
keybindingService
.
lookupKeybinding
(
SETTINGS_EDITOR_COMMAND_SHOW_CONTEXT_MENU
);
return
(
keybinding
&&
keybinding
.
getAriaLabel
())
||
''
;
this
.
rootElement
.
classList
.
toggle
(
'
search-mode
'
,
!!
this
.
_searchResultModel
);
}
createEditor
(
parent
:
HTMLElement
):
void
{
...
...
@@ -351,16 +342,6 @@ export class SettingsEditor2 extends EditorPane {
}
focusSettings
(
focusSettingInput
=
false
):
void
{
// TODO@roblourens is this in the right place?
// Update ARIA global labels
const
labelElement
=
this
.
settingsAriaExtraLabelsContainer
.
querySelector
(
'
#settings_aria_more_actions_shortcut_label
'
);
if
(
labelElement
)
{
const
settingsContextMenuShortcut
=
this
.
currentSettingsContextMenuKeyBindingLabel
;
if
(
settingsContextMenuShortcut
)
{
labelElement
.
setAttribute
(
'
aria-label
'
,
localize
(
'
settingsContextMenuAriaShortcut
'
,
"
For more actions, Press {0}.
"
,
settingsContextMenuShortcut
));
}
}
const
focused
=
this
.
settingsTree
.
getFocus
();
if
(
!
focused
.
length
)
{
this
.
settingsTree
.
focusFirst
();
...
...
@@ -648,14 +629,6 @@ export class SettingsEditor2 extends EditorPane {
private
createSettingsTree
(
parent
:
HTMLElement
):
void
{
this
.
settingsTreeContainer
=
DOM
.
append
(
parent
,
$
(
'
.settings-tree-container
'
));
// Add ARIA extra labels div
this
.
settingsAriaExtraLabelsContainer
=
DOM
.
append
(
this
.
settingsTreeContainer
,
$
(
'
.settings-aria-extra-labels
'
));
this
.
settingsAriaExtraLabelsContainer
.
id
=
'
settings_aria_extra_labels
'
;
// Add global labels here
const
labelDiv
=
DOM
.
append
(
this
.
settingsAriaExtraLabelsContainer
,
$
(
'
.settings-aria-extra-label
'
));
labelDiv
.
id
=
'
settings_aria_more_actions_shortcut_label
'
;
labelDiv
.
setAttribute
(
'
aria-label
'
,
''
);
this
.
settingRenderers
=
this
.
instantiationService
.
createInstance
(
SettingTreeRenderers
);
this
.
_register
(
this
.
settingRenderers
.
onDidChangeSetting
(
e
=>
this
.
onDidChangeSetting
(
e
.
key
,
e
.
value
,
e
.
type
)));
this
.
_register
(
this
.
settingRenderers
.
onDidOpenSettings
(
settingKey
=>
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录