@opensumi/ide-main-layout 3.9.1-next-1749175927.0 → 3.9.1-next-1749196667.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -30
- package/lib/browser/accordion/accordion.service.d.ts +1 -9
- package/lib/browser/accordion/accordion.service.d.ts.map +1 -1
- package/lib/browser/accordion/accordion.service.js +33 -120
- package/lib/browser/accordion/accordion.service.js.map +1 -1
- package/lib/browser/accordion/accordion.view.d.ts.map +1 -1
- package/lib/browser/accordion/accordion.view.js +1 -4
- package/lib/browser/accordion/accordion.view.js.map +1 -1
- package/lib/browser/accordion/section.view.d.ts.map +1 -1
- package/lib/browser/accordion/section.view.js +1 -1
- package/lib/browser/accordion/section.view.js.map +1 -1
- package/lib/browser/accordion/styles.module.less +0 -61
- package/lib/browser/default-config.d.ts.map +1 -1
- package/lib/browser/default-config.js +6 -7
- package/lib/browser/default-config.js.map +1 -1
- package/lib/browser/drop-area/drop-area.d.ts +2 -3
- package/lib/browser/drop-area/drop-area.d.ts.map +1 -1
- package/lib/browser/drop-area/drop-area.js +5 -8
- package/lib/browser/drop-area/drop-area.js.map +1 -1
- package/lib/browser/index.d.ts.map +1 -1
- package/lib/browser/index.js.map +1 -1
- package/lib/browser/layout.service.d.ts +0 -4
- package/lib/browser/layout.service.d.ts.map +1 -1
- package/lib/browser/layout.service.js +79 -140
- package/lib/browser/layout.service.js.map +1 -1
- package/lib/browser/main-layout.contribution.d.ts +18 -2
- package/lib/browser/main-layout.contribution.d.ts.map +1 -1
- package/lib/browser/main-layout.contribution.js +131 -75
- package/lib/browser/main-layout.contribution.js.map +1 -1
- package/lib/browser/tabbar/bar.view.d.ts.map +1 -1
- package/lib/browser/tabbar/bar.view.js +10 -5
- package/lib/browser/tabbar/bar.view.js.map +1 -1
- package/lib/browser/tabbar/panel.view.js +2 -2
- package/lib/browser/tabbar/panel.view.js.map +1 -1
- package/lib/browser/tabbar/renderer.view.js +4 -4
- package/lib/browser/tabbar/renderer.view.js.map +1 -1
- package/lib/browser/tabbar/tabbar.service.d.ts +19 -8
- package/lib/browser/tabbar/tabbar.service.d.ts.map +1 -1
- package/lib/browser/tabbar/tabbar.service.js +148 -39
- package/lib/browser/tabbar/tabbar.service.js.map +1 -1
- package/lib/common/main-layout.definition.d.ts +3 -4
- package/lib/common/main-layout.definition.d.ts.map +1 -1
- package/lib/common/main-layout.definition.js +4 -5
- package/lib/common/main-layout.definition.js.map +1 -1
- package/package.json +8 -8
- package/src/browser/accordion/accordion.service.ts +35 -152
- package/src/browser/accordion/accordion.view.tsx +2 -4
- package/src/browser/accordion/section.view.tsx +1 -5
- package/src/browser/accordion/styles.module.less +0 -61
- package/src/browser/default-config.ts +7 -8
- package/src/browser/drop-area/drop-area.tsx +3 -6
- package/src/browser/index.ts +0 -1
- package/src/browser/layout.service.ts +67 -156
- package/src/browser/main-layout.contribution.ts +138 -93
- package/src/browser/tabbar/bar.view.tsx +14 -9
- package/src/browser/tabbar/panel.view.tsx +2 -2
- package/src/browser/tabbar/renderer.view.tsx +4 -4
- package/src/browser/tabbar/tabbar.service.ts +163 -54
- package/src/common/main-layout.definition.ts +4 -6
- package/lib/browser/command.d.ts +0 -29
- package/lib/browser/command.d.ts.map +0 -1
- package/lib/browser/command.js +0 -84
- package/lib/browser/command.js.map +0 -1
- package/lib/browser/tabbar/TABBAR_CONFIG_USAGE.md +0 -141
- package/lib/browser/tabbar/tabbar-behavior-handler.d.ts +0 -71
- package/lib/browser/tabbar/tabbar-behavior-handler.d.ts.map +0 -1
- package/lib/browser/tabbar/tabbar-behavior-handler.js +0 -210
- package/lib/browser/tabbar/tabbar-behavior-handler.js.map +0 -1
- package/src/browser/command.ts +0 -99
- package/src/browser/tabbar/TABBAR_CONFIG_USAGE.md +0 -141
- package/src/browser/tabbar/tabbar-behavior-handler.ts +0 -260
|
@@ -39,34 +39,85 @@ import {
|
|
|
39
39
|
MenuId,
|
|
40
40
|
} from '@opensumi/ide-core-browser/lib/menu/next';
|
|
41
41
|
import { ContributionProvider, Domain, IEventBus, WithEventBus, localize } from '@opensumi/ide-core-common';
|
|
42
|
-
import { CommandContribution, CommandRegistry, CommandService } from '@opensumi/ide-core-common/lib/command';
|
|
42
|
+
import { Command, CommandContribution, CommandRegistry, CommandService } from '@opensumi/ide-core-common/lib/command';
|
|
43
43
|
|
|
44
|
-
import {
|
|
44
|
+
import { DROP_BOTTOM_CONTAINER, DROP_RIGHT_CONTAINER, IMainLayoutService } from '../common';
|
|
45
45
|
|
|
46
|
-
import {
|
|
47
|
-
EXPAND_BOTTOM_PANEL,
|
|
48
|
-
EXPAND_PANEL_COMMAND,
|
|
49
|
-
IS_VISIBLE_BOTTOM_PANEL_COMMAND,
|
|
50
|
-
IS_VISIBLE_EXTEND_VIEW_COMMAND,
|
|
51
|
-
IS_VISIBLE_LEFT_PANEL_COMMAND,
|
|
52
|
-
IS_VISIBLE_PANEL_COMMAND,
|
|
53
|
-
IS_VISIBLE_RIGHT_PANEL_COMMAND,
|
|
54
|
-
IS_VISIBLE_VIEW_COMMAND,
|
|
55
|
-
RETRACT_BOTTOM_PANEL,
|
|
56
|
-
RETRACT_PANEL_COMMAND,
|
|
57
|
-
TOGGLE_BOTTOM_PANEL_COMMAND,
|
|
58
|
-
TOGGLE_EXTEND_VIEW_COMMAND,
|
|
59
|
-
TOGGLE_LEFT_PANEL_COMMAND,
|
|
60
|
-
TOGGLE_PANEL_COMMAND,
|
|
61
|
-
TOGGLE_RIGHT_PANEL_COMMAND,
|
|
62
|
-
TOGGLE_VIEW_COMMAND,
|
|
63
|
-
WORKBENCH_ACTION_CLOSEPANEL,
|
|
64
|
-
WORKBENCH_ACTION_CLOSESIDECAR,
|
|
65
|
-
} from './command';
|
|
66
|
-
import { ExtendViewDropArea, PanelDropArea, ViewDropArea } from './drop-area/drop-area';
|
|
46
|
+
import { BottomDropArea, RightDropArea } from './drop-area/drop-area';
|
|
67
47
|
import { ViewQuickOpenHandler } from './quick-open-view';
|
|
68
48
|
import { BottomTabRenderer, LeftTabRenderer, RightTabRenderer } from './tabbar/renderer.view';
|
|
69
49
|
|
|
50
|
+
// NOTE 左右侧面板的展开、折叠命令请使用组合命令 activity-bar.left.toggle,layout命令仅做折叠展开,不处理tab激活逻辑
|
|
51
|
+
export const HIDE_LEFT_PANEL_COMMAND: Command = {
|
|
52
|
+
id: 'main-layout.left-panel.hide',
|
|
53
|
+
label: '%main-layout.left-panel.hide%',
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export const WORKBENCH_ACTION_CLOSESIDECAR: Command = {
|
|
57
|
+
id: 'workbench.action.closeSidebar',
|
|
58
|
+
label: '%main-layout.sidebar.hide%',
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export const SHOW_LEFT_PANEL_COMMAND: Command = {
|
|
62
|
+
id: 'main-layout.left-panel.show',
|
|
63
|
+
label: '%main-layout.left-panel.show%',
|
|
64
|
+
};
|
|
65
|
+
export const TOGGLE_LEFT_PANEL_COMMAND: MenuCommandDesc = {
|
|
66
|
+
id: 'main-layout.left-panel.toggle',
|
|
67
|
+
label: '%main-layout.left-panel.toggle%',
|
|
68
|
+
};
|
|
69
|
+
export const HIDE_RIGHT_PANEL_COMMAND: Command = {
|
|
70
|
+
id: 'main-layout.right-panel.hide',
|
|
71
|
+
label: '%main-layout.right-panel.hide%',
|
|
72
|
+
};
|
|
73
|
+
export const SHOW_RIGHT_PANEL_COMMAND: Command = {
|
|
74
|
+
id: 'main-layout.right-panel.show',
|
|
75
|
+
label: '%main-layout.right-panel.show%',
|
|
76
|
+
};
|
|
77
|
+
export const TOGGLE_RIGHT_PANEL_COMMAND: MenuCommandDesc = {
|
|
78
|
+
id: 'main-layout.right-panel.toggle',
|
|
79
|
+
label: '%main-layout.right-panel.toggle%',
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export const HIDE_BOTTOM_PANEL_COMMAND: Command = {
|
|
83
|
+
id: 'main-layout.bottom-panel.hide',
|
|
84
|
+
label: '%main-layout.bottom-panel.hide%',
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export const WORKBENCH_ACTION_CLOSEPANEL: Command = {
|
|
88
|
+
id: 'workbench.action.closePanel',
|
|
89
|
+
delegate: HIDE_BOTTOM_PANEL_COMMAND.id,
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export const SHOW_BOTTOM_PANEL_COMMAND: Command = {
|
|
93
|
+
id: 'main-layout.bottom-panel.show',
|
|
94
|
+
label: '%main-layout.bottom-panel.show%',
|
|
95
|
+
};
|
|
96
|
+
export const TOGGLE_BOTTOM_PANEL_COMMAND: Command = {
|
|
97
|
+
id: 'main-layout.bottom-panel.toggle',
|
|
98
|
+
iconClass: getIcon('minus'),
|
|
99
|
+
label: '%layout.tabbar.toggle%',
|
|
100
|
+
};
|
|
101
|
+
export const IS_VISIBLE_BOTTOM_PANEL_COMMAND: Command = {
|
|
102
|
+
id: 'main-layout.bottom-panel.is-visible',
|
|
103
|
+
};
|
|
104
|
+
export const IS_VISIBLE_LEFT_PANEL_COMMAND: Command = {
|
|
105
|
+
id: 'main-layout.left-panel.is-visible',
|
|
106
|
+
};
|
|
107
|
+
export const IS_VISIBLE_RIGHT_PANEL_COMMAND: Command = {
|
|
108
|
+
id: 'main-layout.right-panel.is-visible',
|
|
109
|
+
};
|
|
110
|
+
export const EXPAND_BOTTOM_PANEL: Command = {
|
|
111
|
+
id: 'main-layout.bottom-panel.expand',
|
|
112
|
+
label: '%layout.tabbar.expand%',
|
|
113
|
+
iconClass: getIcon('expand'),
|
|
114
|
+
};
|
|
115
|
+
export const RETRACT_BOTTOM_PANEL: Command = {
|
|
116
|
+
id: 'main-layout.bottom-panel.retract',
|
|
117
|
+
label: '%layout.tabbar.retract%',
|
|
118
|
+
iconClass: getIcon('shrink'),
|
|
119
|
+
};
|
|
120
|
+
|
|
70
121
|
@Domain(
|
|
71
122
|
CommandContribution,
|
|
72
123
|
ClientAppContribution,
|
|
@@ -145,20 +196,15 @@ export class MainLayoutModuleContribution
|
|
|
145
196
|
}
|
|
146
197
|
|
|
147
198
|
registerComponent(registry: ComponentRegistry): void {
|
|
148
|
-
registry.register(
|
|
149
|
-
component:
|
|
150
|
-
hideTab: true,
|
|
151
|
-
containerId: DROP_EXTEND_VIEW_CONTAINER,
|
|
152
|
-
});
|
|
153
|
-
registry.register(DROP_PANEL_CONTAINER, [], {
|
|
154
|
-
component: PanelDropArea,
|
|
199
|
+
registry.register(DROP_RIGHT_CONTAINER, [], {
|
|
200
|
+
component: RightDropArea,
|
|
155
201
|
hideTab: true,
|
|
156
|
-
containerId:
|
|
202
|
+
containerId: DROP_RIGHT_CONTAINER,
|
|
157
203
|
});
|
|
158
|
-
registry.register(
|
|
159
|
-
component:
|
|
204
|
+
registry.register(DROP_BOTTOM_CONTAINER, [], {
|
|
205
|
+
component: BottomDropArea,
|
|
160
206
|
hideTab: true,
|
|
161
|
-
containerId:
|
|
207
|
+
containerId: DROP_BOTTOM_CONTAINER,
|
|
162
208
|
});
|
|
163
209
|
}
|
|
164
210
|
|
|
@@ -171,75 +217,78 @@ export class MainLayoutModuleContribution
|
|
|
171
217
|
}
|
|
172
218
|
|
|
173
219
|
registerRenderer(registry: SlotRendererRegistry) {
|
|
174
|
-
registry.registerSlotRenderer(SlotLocation.
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
220
|
+
registry.registerSlotRenderer(SlotLocation.right, RightTabRenderer);
|
|
221
|
+
registry.registerSlotRenderer(SlotLocation.left, LeftTabRenderer);
|
|
222
|
+
registry.registerSlotRenderer(SlotLocation.bottom, BottomTabRenderer);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
registerCommands(commands: CommandRegistry): void {
|
|
226
|
+
// @deprecated
|
|
227
|
+
commands.registerCommand(HIDE_LEFT_PANEL_COMMAND, {
|
|
228
|
+
execute: () => {
|
|
229
|
+
this.mainLayoutService.toggleSlot(SlotLocation.left, false);
|
|
178
230
|
},
|
|
179
231
|
});
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
232
|
+
// @deprecated
|
|
233
|
+
commands.registerCommand(SHOW_LEFT_PANEL_COMMAND, {
|
|
234
|
+
execute: (size?: number) => {
|
|
235
|
+
this.mainLayoutService.toggleSlot(SlotLocation.left, true, size);
|
|
183
236
|
},
|
|
184
237
|
});
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
expand: true,
|
|
189
|
-
toggle: true,
|
|
238
|
+
commands.registerCommand(TOGGLE_LEFT_PANEL_COMMAND, {
|
|
239
|
+
execute: (show?: boolean, size?: number) => {
|
|
240
|
+
this.mainLayoutService.toggleSlot(SlotLocation.left, show, size);
|
|
190
241
|
},
|
|
191
242
|
});
|
|
192
|
-
}
|
|
193
243
|
|
|
194
|
-
|
|
195
|
-
commands.registerCommand(
|
|
196
|
-
execute: (
|
|
197
|
-
this.mainLayoutService.toggleSlot(SlotLocation.
|
|
244
|
+
// @deprecated
|
|
245
|
+
commands.registerCommand(HIDE_RIGHT_PANEL_COMMAND, {
|
|
246
|
+
execute: () => {
|
|
247
|
+
this.mainLayoutService.toggleSlot(SlotLocation.right, false);
|
|
198
248
|
},
|
|
199
249
|
});
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
250
|
+
// @deprecated
|
|
251
|
+
commands.registerCommand(SHOW_RIGHT_PANEL_COMMAND, {
|
|
252
|
+
execute: (size?: number) => {
|
|
253
|
+
this.mainLayoutService.toggleSlot(SlotLocation.right, true, size);
|
|
203
254
|
},
|
|
204
255
|
});
|
|
205
|
-
commands.registerCommand(
|
|
256
|
+
commands.registerCommand(TOGGLE_RIGHT_PANEL_COMMAND, {
|
|
206
257
|
execute: (show?: boolean, size?: number) => {
|
|
207
|
-
this.mainLayoutService.toggleSlot(SlotLocation.
|
|
258
|
+
this.mainLayoutService.toggleSlot(SlotLocation.right, show, size);
|
|
208
259
|
},
|
|
209
260
|
});
|
|
210
|
-
commands.registerCommand(IS_VISIBLE_VIEW_COMMAND, {
|
|
211
|
-
execute: () => this.mainLayoutService.isVisible(SlotLocation.view),
|
|
212
|
-
});
|
|
213
|
-
commands.registerCommand(IS_VISIBLE_EXTEND_VIEW_COMMAND, {
|
|
214
|
-
execute: () => this.mainLayoutService.isVisible(SlotLocation.extendView),
|
|
215
|
-
});
|
|
216
|
-
commands.registerCommand(IS_VISIBLE_PANEL_COMMAND, {
|
|
217
|
-
execute: () => this.mainLayoutService.isVisible(SlotLocation.panel),
|
|
218
|
-
});
|
|
219
|
-
// TODO: 下个版本废弃掉
|
|
220
|
-
commands.registerCommand(TOGGLE_LEFT_PANEL_COMMAND);
|
|
221
|
-
commands.registerCommand(TOGGLE_RIGHT_PANEL_COMMAND);
|
|
222
|
-
commands.registerCommand(TOGGLE_BOTTOM_PANEL_COMMAND);
|
|
223
|
-
commands.registerCommand(EXPAND_BOTTOM_PANEL);
|
|
224
|
-
commands.registerCommand(RETRACT_BOTTOM_PANEL);
|
|
225
|
-
commands.registerCommand(IS_VISIBLE_LEFT_PANEL_COMMAND);
|
|
226
|
-
commands.registerCommand(IS_VISIBLE_RIGHT_PANEL_COMMAND);
|
|
227
|
-
commands.registerCommand(IS_VISIBLE_BOTTOM_PANEL_COMMAND);
|
|
228
261
|
|
|
229
262
|
commands.registerCommand(WORKBENCH_ACTION_CLOSESIDECAR, {
|
|
230
263
|
execute: () =>
|
|
231
264
|
Promise.all([
|
|
232
|
-
this.mainLayoutService.toggleSlot(SlotLocation.
|
|
233
|
-
this.mainLayoutService.toggleSlot(SlotLocation.
|
|
265
|
+
this.mainLayoutService.toggleSlot(SlotLocation.left, false),
|
|
266
|
+
this.mainLayoutService.toggleSlot(SlotLocation.right, false),
|
|
234
267
|
]),
|
|
235
268
|
});
|
|
236
269
|
|
|
237
|
-
commands.registerCommand(
|
|
270
|
+
commands.registerCommand(SHOW_BOTTOM_PANEL_COMMAND, {
|
|
238
271
|
execute: () => {
|
|
239
|
-
this.mainLayoutService.toggleSlot(SlotLocation.
|
|
272
|
+
this.mainLayoutService.toggleSlot(SlotLocation.bottom, true);
|
|
240
273
|
},
|
|
241
274
|
});
|
|
242
275
|
|
|
276
|
+
commands.registerCommand(HIDE_BOTTOM_PANEL_COMMAND, {
|
|
277
|
+
execute: () => {
|
|
278
|
+
this.mainLayoutService.toggleSlot(SlotLocation.bottom, false);
|
|
279
|
+
},
|
|
280
|
+
});
|
|
281
|
+
commands.registerCommand(WORKBENCH_ACTION_CLOSEPANEL);
|
|
282
|
+
commands.registerCommand(IS_VISIBLE_BOTTOM_PANEL_COMMAND, {
|
|
283
|
+
execute: () => this.mainLayoutService.getTabbarService('bottom').currentContainerId.get() !== '',
|
|
284
|
+
});
|
|
285
|
+
commands.registerCommand(IS_VISIBLE_LEFT_PANEL_COMMAND, {
|
|
286
|
+
execute: () => this.mainLayoutService.isVisible(SlotLocation.left),
|
|
287
|
+
});
|
|
288
|
+
commands.registerCommand(IS_VISIBLE_RIGHT_PANEL_COMMAND, {
|
|
289
|
+
execute: () => this.mainLayoutService.isVisible(SlotLocation.left),
|
|
290
|
+
});
|
|
291
|
+
|
|
243
292
|
commands.registerCommand(
|
|
244
293
|
{
|
|
245
294
|
id: 'view.outward.right-panel.hide',
|
|
@@ -310,14 +359,14 @@ export class MainLayoutModuleContribution
|
|
|
310
359
|
});
|
|
311
360
|
|
|
312
361
|
Object.entries({
|
|
313
|
-
[SlotLocation.
|
|
362
|
+
[SlotLocation.left]: [
|
|
314
363
|
EXPLORER_CONTAINER_ID,
|
|
315
364
|
SEARCH_CONTAINER_ID,
|
|
316
365
|
SCM_CONTAINER_ID,
|
|
317
366
|
DEBUG_CONTAINER_ID,
|
|
318
367
|
EXTENSION_CONTAINER_ID,
|
|
319
368
|
],
|
|
320
|
-
[SlotLocation.
|
|
369
|
+
[SlotLocation.bottom]: [
|
|
321
370
|
MARKER_CONTAINER_ID,
|
|
322
371
|
OUTPUT_CONTAINER_ID,
|
|
323
372
|
DEBUG_CONSOLE_CONTAINER_ID,
|
|
@@ -347,24 +396,24 @@ export class MainLayoutModuleContribution
|
|
|
347
396
|
});
|
|
348
397
|
|
|
349
398
|
menus.registerMenuItem(MenuId.MenubarViewMenu, {
|
|
350
|
-
command:
|
|
399
|
+
command: TOGGLE_LEFT_PANEL_COMMAND,
|
|
351
400
|
group: '5_panel',
|
|
352
401
|
});
|
|
353
402
|
menus.registerMenuItem(MenuId.MenubarViewMenu, {
|
|
354
|
-
command:
|
|
403
|
+
command: TOGGLE_RIGHT_PANEL_COMMAND,
|
|
355
404
|
group: '5_panel',
|
|
356
405
|
});
|
|
357
406
|
menus.registerMenuItem(MenuId.MenubarViewMenu, {
|
|
358
|
-
command:
|
|
407
|
+
command: TOGGLE_BOTTOM_PANEL_COMMAND as MenuCommandDesc,
|
|
359
408
|
group: '5_panel',
|
|
360
409
|
});
|
|
361
410
|
menus.registerMenuItem(MenuId.MenubarViewMenu, {
|
|
362
|
-
command:
|
|
411
|
+
command: EXPAND_BOTTOM_PANEL as MenuCommandDesc,
|
|
363
412
|
group: '5_panel',
|
|
364
413
|
when: '!bottomFullExpanded',
|
|
365
414
|
});
|
|
366
415
|
menus.registerMenuItem(MenuId.MenubarViewMenu, {
|
|
367
|
-
command:
|
|
416
|
+
command: RETRACT_BOTTOM_PANEL as MenuCommandDesc,
|
|
368
417
|
group: '5_panel',
|
|
369
418
|
when: 'bottomFullExpanded',
|
|
370
419
|
});
|
|
@@ -382,24 +431,20 @@ export class MainLayoutModuleContribution
|
|
|
382
431
|
protected registerSideToggleKey() {
|
|
383
432
|
this.keybindingRegistry.registerKeybinding({
|
|
384
433
|
keybinding: 'ctrlcmd+b',
|
|
385
|
-
command:
|
|
386
|
-
});
|
|
387
|
-
this.keybindingRegistry.registerKeybinding({
|
|
388
|
-
keybinding: 'ctrlcmd+alt+b',
|
|
389
|
-
command: TOGGLE_EXTEND_VIEW_COMMAND.id,
|
|
434
|
+
command: TOGGLE_LEFT_PANEL_COMMAND.id,
|
|
390
435
|
});
|
|
391
436
|
this.keybindingRegistry.registerKeybinding({
|
|
392
437
|
keybinding: 'ctrlcmd+j',
|
|
393
|
-
command:
|
|
438
|
+
command: TOGGLE_BOTTOM_PANEL_COMMAND.id,
|
|
394
439
|
});
|
|
395
440
|
this.keybindingRegistry.registerKeybinding({
|
|
396
441
|
keybinding: 'ctrlcmd+shift+j',
|
|
397
|
-
command:
|
|
442
|
+
command: EXPAND_BOTTOM_PANEL.id,
|
|
398
443
|
when: '!bottomFullExpanded',
|
|
399
444
|
});
|
|
400
445
|
this.keybindingRegistry.registerKeybinding({
|
|
401
446
|
keybinding: 'ctrlcmd+shift+j',
|
|
402
|
-
command:
|
|
447
|
+
command: RETRACT_BOTTOM_PANEL.id,
|
|
403
448
|
when: 'bottomFullExpanded',
|
|
404
449
|
});
|
|
405
450
|
}
|
|
@@ -5,7 +5,6 @@ import { Badge, Icon } from '@opensumi/ide-components';
|
|
|
5
5
|
import {
|
|
6
6
|
ComponentRegistryInfo,
|
|
7
7
|
ComponentRegistryProvider,
|
|
8
|
-
Event,
|
|
9
8
|
KeybindingRegistry,
|
|
10
9
|
addClassName,
|
|
11
10
|
getIcon,
|
|
@@ -110,20 +109,20 @@ export const TabbarViewBase: FC<ITabbarViewProps> = (props) => {
|
|
|
110
109
|
}, []);
|
|
111
110
|
|
|
112
111
|
useEffect(() => {
|
|
113
|
-
|
|
112
|
+
setContainers(
|
|
113
|
+
splitVisibleTabs(
|
|
114
|
+
tabbarService.visibleContainers.filter((container) => !container.options?.hideTab),
|
|
115
|
+
visibleCount,
|
|
116
|
+
),
|
|
117
|
+
);
|
|
118
|
+
const disposable = tabbarService.onStateChange(() => {
|
|
114
119
|
setContainers(
|
|
115
120
|
splitVisibleTabs(
|
|
116
121
|
tabbarService.visibleContainers.filter((container) => !container.options?.hideTab),
|
|
117
122
|
visibleCount,
|
|
118
123
|
),
|
|
119
124
|
);
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
updateContainers();
|
|
123
|
-
const disposable = Event.any<any>(
|
|
124
|
-
tabbarService.onDidRegisterContainer,
|
|
125
|
-
tabbarService.onStateChange,
|
|
126
|
-
)(updateContainers);
|
|
125
|
+
});
|
|
127
126
|
return () => {
|
|
128
127
|
disposable.dispose();
|
|
129
128
|
};
|
|
@@ -154,6 +153,9 @@ export const TabbarViewBase: FC<ITabbarViewProps> = (props) => {
|
|
|
154
153
|
if (!containerId) {
|
|
155
154
|
return null;
|
|
156
155
|
}
|
|
156
|
+
if (side && component.options?.hideLocationTab?.includes(side)) {
|
|
157
|
+
return null;
|
|
158
|
+
}
|
|
157
159
|
|
|
158
160
|
tabbarService.updateTabInMoreKey(containerId, false);
|
|
159
161
|
let ref: HTMLLIElement | null;
|
|
@@ -421,6 +423,9 @@ export const ChatTabbarRenderer2: FC<{ barSize?: number; style?: CSSProperties }
|
|
|
421
423
|
const { barSize = 32, style } = props;
|
|
422
424
|
const { side } = useContext(TabbarConfig);
|
|
423
425
|
const tabbarService: TabbarService = useInjectable(TabbarServiceFactory)(side);
|
|
426
|
+
useEffect(() => {
|
|
427
|
+
tabbarService.setIsLatter(true);
|
|
428
|
+
}, [tabbarService]);
|
|
424
429
|
const styles_right_tab_bar = useDesignStyles(styles.ai_right_tab_bar, 'ai_right_tab_bar');
|
|
425
430
|
const styles_right_tab = useDesignStyles(styles.ai_right_tab, 'ai_right_tab');
|
|
426
431
|
|
|
@@ -224,7 +224,7 @@ const BottomPanelView: React.FC<{
|
|
|
224
224
|
</div>
|
|
225
225
|
<div className={styles_panel_toolbar_container}>
|
|
226
226
|
{titleMenu && <InlineActionBar menus={titleMenu} />}
|
|
227
|
-
|
|
227
|
+
<InlineMenuBar menus={tabbarService.commonTitleMenu} moreAtFirst />
|
|
228
228
|
</div>
|
|
229
229
|
</div>
|
|
230
230
|
<div className={styles.container_wrap} ref={(ele) => (ref.current = ele)}>
|
|
@@ -240,7 +240,7 @@ const BottomPanelView: React.FC<{
|
|
|
240
240
|
<AccordionContainer
|
|
241
241
|
views={component.views}
|
|
242
242
|
alignment='horizontal'
|
|
243
|
-
minSize={component.options!.miniSize
|
|
243
|
+
minSize={component.options!.miniSize}
|
|
244
244
|
containerId={component.options!.containerId}
|
|
245
245
|
/>
|
|
246
246
|
)}
|
|
@@ -34,7 +34,7 @@ export const TabbarConfig = createContext<{
|
|
|
34
34
|
direction: Layout.direction;
|
|
35
35
|
fullSize: number;
|
|
36
36
|
}>({
|
|
37
|
-
side: SlotLocation.
|
|
37
|
+
side: SlotLocation.left,
|
|
38
38
|
direction: EDirection.LeftToRight,
|
|
39
39
|
fullSize: 0,
|
|
40
40
|
});
|
|
@@ -114,7 +114,7 @@ export const RightTabRenderer = ({
|
|
|
114
114
|
tabpanelView?: FC<{}>;
|
|
115
115
|
}) => (
|
|
116
116
|
<TabRendererBase
|
|
117
|
-
side={SlotLocation.
|
|
117
|
+
side={SlotLocation.right}
|
|
118
118
|
direction={EDirection.RightToLeft}
|
|
119
119
|
id={VIEW_CONTAINERS.RIGHT_TABBAR_PANEL}
|
|
120
120
|
className={cls(className, 'right-slot')}
|
|
@@ -134,7 +134,7 @@ export const LeftTabRenderer = ({
|
|
|
134
134
|
tabbarView?: FC<{}>;
|
|
135
135
|
}) => (
|
|
136
136
|
<TabRendererBase
|
|
137
|
-
side={SlotLocation.
|
|
137
|
+
side={SlotLocation.left}
|
|
138
138
|
direction={EDirection.LeftToRight}
|
|
139
139
|
id={VIEW_CONTAINERS.LEFT_TABBAR_PANEL}
|
|
140
140
|
className={cls(className, 'left-slot')}
|
|
@@ -154,7 +154,7 @@ export const BottomTabRenderer = ({
|
|
|
154
154
|
tabbarView?: FC<{}>;
|
|
155
155
|
}) => (
|
|
156
156
|
<TabRendererBase
|
|
157
|
-
side={SlotLocation.
|
|
157
|
+
side={SlotLocation.bottom}
|
|
158
158
|
id={VIEW_CONTAINERS.BOTTOM_TABBAR_PANEL}
|
|
159
159
|
direction={EDirection.BottomToTop}
|
|
160
160
|
className={cls(className, 'bottom-slot')}
|