Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/components/src/scrollbars/styles.less
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
}

.scrollbar-decoration-vertical {
position: fixed;
top: 0;
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 6px;
Expand All @@ -52,7 +52,7 @@
}

.scrollbar-decoration-horizontal {
position: fixed;
position: absolute;
top: 0;
left: 0;
height: 100%;
Expand Down
63 changes: 40 additions & 23 deletions packages/design/src/browser/style/design.module.less
Original file line number Diff line number Diff line change
Expand Up @@ -489,24 +489,10 @@

.design-item_container {
border: 0 none;

&:first-child::before {
display: none;
}

&::before {
content: '';
position: absolute;
left: 0;
top: 12px;
display: inline-block;
width: 1px;
height: 12px;
background-color: var(--kt-panelTab-border);
}
min-width: auto;

.design-item_info_name {
min-width: 110px;
min-width: 70px;
margin-right: 4px;
}

Expand Down Expand Up @@ -548,20 +534,51 @@
}
}

.design-tab_item_selected,
.design-tab_item_selected + div {
&::before,
&::after {
display: none;
.design-tabs {
margin-top: 2px;
:global(.kt-scrollbar) {
> div {
&:first-child {
bottom: -1px;
}
}
}
}

.design-tab_item_selected {
border-radius: 12px 12px 0 0;
position: relative;
height: 34px !important;
&:before {
content: '';
position: absolute;
bottom: 0;
right: auto;
left: -12px;
top: auto;
width: 12px;
height: 12px;
background: radial-gradient(circle at top left, transparent 70%, var(--panel-background) 72%);
}
&:after {
content: '';
position: absolute;
bottom: 0;
right: -12px;
left: auto;
top: auto;
width: 12px;
height: 12px;
background: radial-gradient(circle at top right, transparent 70%, var(--panel-background) 72%);
}
}

.design-tab_contents {
height: 35px;
height: 34px;

:first-child {
&.design-item_container {
border-left: 1px solid var(--editorGroup-border);
border-left: none;
}
}
}
Expand Down
9 changes: 6 additions & 3 deletions packages/terminal-next/src/browser/component/tab.view.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useCallback, useEffect, useRef, useState } from 'react';
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';

import { Scrollbars } from '@opensumi/ide-components';
import { KeybindingRegistry, useAutorun, useDesignStyles, useInjectable } from '@opensumi/ide-core-browser';
Expand All @@ -19,6 +19,7 @@ export default () => {
const tabContainer = useRef<HTMLDivElement | null>();
const [theme, setTheme] = useState<ThemeType>('dark');
const styles_tab_contents = useDesignStyles(styles.tab_contents, 'tab_contents');
const styles_tabs = useDesignStyles(styles.tabs, 'tabs');

const groups = useAutorun(view.groups);
const currentGroup = useAutorun(view.currentGroup);
Expand All @@ -39,12 +40,14 @@ export default () => {
};
}, []);

const visibleGroups = useMemo(() => groups.filter(Boolean), [groups]);

return (
<div className={styles.view_container}>
<div className={styles.tabs}>
<div className={styles_tabs}>
<Scrollbars forwardedRef={(el) => (el ? (tabContainer.current = el.ref) : null)}>
<div className={styles_tab_contents}>
{groups.filter(Boolean).map((group, index) => (
{visibleGroups.map((group, index) => (
<TabItem
draggable={true}
onDragStart={(e) => {
Expand Down
Loading