Skip to content

Commit d1cdbe1

Browse files
authored
fix: fix lost open animation of collapse (#827)
1 parent 0b71d12 commit d1cdbe1

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

src/components/collapse/index.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export function Collapse({
8282
const adjustedSize = useRef<number[]>([]);
8383
const first = useRef(true);
8484

85-
const isUndefined = (key): boolean => {
85+
const isUndefined = (key: UniqueId): boolean => {
8686
return key === undefined;
8787
};
8888

@@ -125,7 +125,7 @@ export function Collapse({
125125
return null;
126126
};
127127

128-
const handleChangeCallback = (key: UniqueId, index) => {
128+
const handleChangeCallback = (key: UniqueId, index: number) => {
129129
const currentKeys = [...activePanelKeys];
130130
if (!isUndefined(currentKeys[index])) {
131131
delete currentKeys[index];

src/components/collapse/style.scss

+6-10
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,10 @@ $split_pane_visible: #{$split}__pane__item--visible;
1515
}
1616

1717
&__pane {
18-
&--collapsing {
19-
transition: top ease-in-out 0.2s, height ease-in-out 0.2s;
20-
}
18+
transition: top ease-out 0.15s, height ease-out 0.15s;
2119

22-
&:not(#{$split_pane_visible} ~ #{$split_pane_visible}) {
23-
#{$collapse}__header {
24-
border-top: 0;
25-
}
20+
&:first-child #{$collapse}__header {
21+
border-top-color: transparent;
2622
}
2723
}
2824

@@ -43,14 +39,14 @@ $split_pane_visible: #{$split}__pane__item--visible;
4339

4440
&__header {
4541
align-items: center;
46-
border-top: 1px solid var(--sideBarSectionHeader-border);
42+
border-bottom: 1px solid transparent;
43+
border-top: 1px solid var(--sideBarSectionHeader-border, transparent);
4744
box-sizing: border-box;
4845
cursor: pointer;
4946
display: flex;
5047
font-size: 11px;
5148
font-weight: bold;
52-
height: 25px;
53-
outline: none;
49+
height: 26px;
5450
outline: 1px solid transparent;
5551
outline-offset: -1px;
5652
padding: 1px 2px;

src/extensions/github-plus-theme-master/themes/github-plus-theme.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@
3939
"scrollbar.shadow": "#00000000",
4040
"quickInputList.focusBackground": "#e7e6e5",
4141
"quickInputList.focusForeground": "#24292e",
42+
"list.focusOutline": "#ffffff",
4243
"list.highlightForeground": "#0066BF",
4344
"list.focusHighlightForeground": "#0066BF",
44-
4545
"terminal.background": "#ffffff",
4646
"terminal.foreground": "#333333",
4747
"terminal.ansiBlack": "#414141",

0 commit comments

Comments
 (0)