Skip to content

Fix Show/hide filetree button on small displays #27881

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Use not mobile class for file-tree
  • Loading branch information
sebastian-sauer committed Nov 15, 2023
commit 6b2356fd49300801d01a3cff669088465aa4314e
4 changes: 2 additions & 2 deletions templates/repo/diff/box.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="diff-detail-box diff-box">
<div class="gt-df gt-ac gt-fw">
{{if $showFileTree}}
<button class="diff-toggle-file-tree-button hide-992 btn interact-fg" data-show-text="{{ctx.Locale.Tr "repo.diff.show_file_tree"}}" data-hide-text="{{ctx.Locale.Tr "repo.diff.hide_file_tree"}}">
<button class="diff-toggle-file-tree-button not-mobile btn interact-fg" data-show-text="{{ctx.Locale.Tr "repo.diff.show_file_tree"}}" data-hide-text="{{ctx.Locale.Tr "repo.diff.hide_file_tree"}}">
{{/* the icon meaning is reversed here, "octicon-sidebar-collapse" means show the file tree */}}
{{svg "octicon-sidebar-collapse" 20 "icon gt-hidden"}}
{{svg "octicon-sidebar-expand" 20 "icon gt-hidden"}}
Expand Down Expand Up @@ -89,7 +89,7 @@
{{end}}
<div id="diff-container">
{{if $showFileTree}}
<div id="diff-file-tree" class="gt-hidden hide-992"></div>
<div id="diff-file-tree" class="gt-hidden not-mobile"></div>
<script>
if (diffTreeVisible) document.getElementById('diff-file-tree').classList.remove('gt-hidden');
</script>
Expand Down
7 changes: 0 additions & 7 deletions web_src/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -1289,13 +1289,6 @@ img.ui.avatar,
}
}

@media (max-width: 991.98px) {
/* double selector so it wins over .gt-df etc */
.hide-992.hide-992 {
display: none !important;
}
}

.ui.menu.new-menu {
margin-bottom: 15px;
background: var(--color-header-wrapper);
Expand Down