Skip to content

Sync-in · Sovereign platform for file storage, sharing, synchronization, and collaboration.

fix(frontend): prevent sidebar title actions overflow and mobile breadcrumb shift

johaven536364e11d15
diff --git a/frontend/src/app/applications/files/components/sidebar/files-tasks.component.html b/frontend/src/app/applications/files/components/sidebar/files-tasks.component.html
index d746fb69..e1e918cd 100644
--- a/frontend/src/app/applications/files/components/sidebar/files-tasks.component.html
+++ b/frontend/src/app/applications/files/components/sidebar/files-tasks.component.html
@@ -1,6 +1,6 @@
<div class="sidebar-component-title app-top-menu-tool-bar justify-content-between">
- <div style="width: 25px"></div>
- <div>
+ <div class="sidebar-component-title-side"></div>
+ <div class="sidebar-component-title-label">
@switch (nbActiveTasks) {
@case (0) {
<span>{{ (nbTotalTasks === 0 ? 'no_task' : nbTotalTasks > 1 ? 'nb_tasks' : 'one_task') | translate:locale.language:{ nb: nbTotalTasks } }}</span>
@@ -16,8 +16,8 @@
}
}
</div>
- @if (nbTotalTasks) {
- <div class="d-flex gap-1">
+ <div class="sidebar-component-title-side gap-1">
+ @if (nbTotalTasks) {
@if (hasCancellableTasks) {
<button type="button"
(click)="cancelTasks()"
@@ -32,10 +32,8 @@
class="btn btn-default">
<svg [lucideIcon]="icons.LucideX"></svg>
</button>
- </div>
- } @else {
- <div style="width: 35px"></div>
- }
+ }
+ </div>
</div>
<!-- Inner menu: contains the tasks -->
<div appAutoResize>
diff --git a/frontend/src/app/layout/navbar/navbar.component.html b/frontend/src/app/layout/navbar/navbar.component.html
index 69cdee15..bc6135d0 100644
--- a/frontend/src/app/layout/navbar/navbar.component.html
+++ b/frontend/src/app/layout/navbar/navbar.component.html
@@ -1,12 +1,14 @@
<header class="main-header">
<nav class="navbar navbar-content" [class.navbar-content--search]="navbarSearch.searchRouteActive()">
- @if (!leftSideBarIsOpen) {
- <a (click)="toggleLeftSideBar()" class="navbar-button navbar-logo-button navbar-logo-button--delayed" role="button">
- <span class="logo-container">
- <span aria-hidden="true" class="sync-in-favicon logo-spin-in"></span>
- </span>
- </a>
- }
+ <a (click)="toggleLeftSideBar()"
+ [class.navbar-logo-button--delayed]="!leftSideBarIsOpen"
+ [class.navbar-logo-button--placeholder]="leftSideBarIsOpen"
+ class="navbar-button navbar-logo-button"
+ role="button">
+ <span class="logo-container">
+ <span aria-hidden="true" class="sync-in-favicon logo-spin-in"></span>
+ </span>
+ </a>
@if (!navbarSearch.searchRouteActive()) {
<div class="navbar-breadcrumb">
<app-breadcrumb></app-breadcrumb>
diff --git a/frontend/src/styles/components/_header.scss b/frontend/src/styles/components/_header.scss
index be6b63ca..951c3673 100644
--- a/frontend/src/styles/components/_header.scss
+++ b/frontend/src/styles/components/_header.scss
@@ -37,6 +37,17 @@
padding: 0 .5rem;
flex-shrink: 0;
+ &.navbar-logo-button--placeholder {
+ @include media-breakpoint-up(md) {
+ display: none;
+ }
+
+ @include media-breakpoint-down(md) {
+ visibility: hidden;
+ pointer-events: none;
+ }
+ }
+
&:hover,
&:focus,
&:active {
diff --git a/frontend/src/styles/components/_sidebar_right.scss b/frontend/src/styles/components/_sidebar_right.scss
index a01fee65..3a579599 100755
--- a/frontend/src/styles/components/_sidebar_right.scss
+++ b/frontend/src/styles/components/_sidebar_right.scss
@@ -31,7 +31,11 @@
}
.sidebar-component-title {
+ min-width: 0;
+
&.app-top-menu-tool-bar {
+ flex-wrap: nowrap !important;
+
.btn {
min-width: auto;
min-height: calc(#{$btn-line-height * 1em} + var(--bs-btn-padding-y) + var(--bs-btn-padding-y) + var(--bs-btn-border-width) + var(--bs-btn-border-width));
@@ -50,17 +54,17 @@
}
> .sidebar-component-title-label {
- position: absolute;
- left: 50%;
- max-width: calc(100% - 90px);
+ flex: 1 1 auto;
+ min-width: 0;
overflow: hidden;
+ text-align: center;
text-overflow: ellipsis;
- transform: translateX(-50%);
white-space: nowrap;
}
> .sidebar-component-title-side {
display: flex;
+ flex: 0 0 auto;
align-items: center;
min-width: 35px;