Skip to content

Commit b9eef42

Browse files
committed
fix
1 parent 7db2e20 commit b9eef42

File tree

4 files changed

+11
-33
lines changed

4 files changed

+11
-33
lines changed

templates/repo/home_content.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<div class="repo-button-row-left">
77
{{if not $isTreePathRoot}}
88
<button class="show-tree-sidebar-button ui compact basic button icon not-mobile {{if .RepoPreferences.ShowFileViewTreeSidebar}}tw-hidden{{end}}" title="{{ctx.Locale.Tr "repo.diff.show_file_tree"}}">
9-
{{svg "octicon-sidebar-collapse" 20 "icon"}}
9+
{{svg "octicon-sidebar-collapse"}}
1010
</button>
1111
{{end}}
1212
{{template "repo/home_branch_dropdown" (dict "ctxData" .)}}

templates/repo/view_file_tree_sidebar.tmpl

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
<div class="view-file-tree-sidebar-top">
2-
<div class="sidebar-header">
3-
<button class="hide-tree-sidebar-button ui compact basic button icon" title="{{ctx.Locale.Tr "repo.diff.hide_file_tree"}}">
4-
{{svg "octicon-sidebar-expand" 20 "icon"}}
5-
</button>
6-
<b> Files</b>
7-
</div>
8-
<!--// TODO: Dynamically move components such as refSelector and createPR here-->
1+
<div class="flex-text-block">
2+
<button class="hide-tree-sidebar-button ui compact tiny icon button" data-tooltip-content="{{ctx.Locale.Tr "repo.diff.hide_file_tree"}}">
3+
{{svg "octicon-sidebar-expand"}}
4+
</button>
5+
<b>Files</b>
96
</div>
10-
<div class="view-file-tree-sidebar-bottom">
7+
8+
<!--// TODO: Dynamically move components such as refSelector and createPR here-->
9+
<div class="view-file-tree-sidebar-bottom tw-overflow-auto">
1110
<div id="view-file-tree" class="is-loading"
1211
data-api-base-url="{{.RepoLink}}"
1312
data-tree-path="{{$.TreePath}}"

web_src/css/repo/home.css

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -77,29 +77,6 @@
7777
z-index: 8;
7878
}
7979

80-
.repo-grid-tree-sidebar .view-file-tree-sidebar-top {
81-
display: flex;
82-
flex-direction: column;
83-
gap: 0.25em;
84-
}
85-
86-
.repo-grid-tree-sidebar .view-file-tree-sidebar-top .button {
87-
padding: 6px 10px !important;
88-
height: 30px;
89-
flex-shrink: 0;
90-
margin: 0;
91-
}
92-
93-
.repo-grid-tree-sidebar .view-file-tree-sidebar-top .sidebar-ref {
94-
display: flex;
95-
gap: 0.25em;
96-
}
97-
98-
.repo-grid-tree-sidebar .view-file-tree-sidebar-bottom {
99-
flex: 1;
100-
overflow: auto;
101-
}
102-
10380
.repo-grid-tree-sidebar .repo-button-row {
10481
margin-top: 0 !important;
10582
}

web_src/js/features/repo-view-file-tree-sidebar.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ async function toggleSidebar(sidebarEl: HTMLElement, visibility: boolean) {
1212
toggleElem(sidebarEl, visibility);
1313
toggleElem(showBtnEl, !visibility);
1414

15+
// FIXME: need to remove "full height" style from parent element
16+
1517
if (!sidebarEl.hasAttribute('data-is-signed')) return;
1618

1719
// save to session

0 commit comments

Comments
 (0)