Skip to content

Commit 7198e55

Browse files
authored
Merge pull request #60784 from nextcloud/backport/60757/stable34
[stable34] fix(core): Hide current-app label at narrower viewports
2 parents 19c3193 + fe44a5c commit 7198e55

3 files changed

Lines changed: 22 additions & 16 deletions

File tree

core/src/components/AppMenu.vue

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,8 @@ export default defineComponent({
426426
box-shadow: inset 0 0 0 2px var(--color-background-plain-text) !important;
427427
}
428428
429-
// Inner text slot needs min-width: 0 so the label can ellipsize.
429+
// Lets the inner label shrink to its max-width and ellipsize instead of
430+
// pushing the button wider than the inline-flex text slot.
430431
:deep(.button-vue__text) {
431432
min-width: 0;
432433
}
@@ -451,18 +452,23 @@ export default defineComponent({
451452
}
452453
453454
&__current-app-name {
454-
// inline-block: inline elements ignore max-width + overflow.
455-
display: inline-block;
456-
vertical-align: middle;
457-
font-size: var(--default-font-size);
458-
font-weight: 500;
459-
white-space: nowrap;
460-
letter-spacing: -0.5px;
461-
overflow: hidden;
462-
text-overflow: ellipsis;
463-
// Cap width so long titles ellipsize instead of pushing the header
464-
// icons off-screen (.header-start doesn't shrink).
465-
max-width: clamp(80px, 22vw, 320px);
455+
// Hidden by default so the icon-only trigger fits alongside the
456+
// centered search input. The button's aria-label still announces the
457+
// section name. At wide viewports we restore the label with a
458+
// truncation cap as a safety net for long localized names.
459+
display: none;
460+
461+
@media only screen and (min-width: 1400px) {
462+
display: inline-block;
463+
vertical-align: middle;
464+
font-size: var(--default-font-size);
465+
font-weight: 500;
466+
white-space: nowrap;
467+
letter-spacing: -0.5px;
468+
overflow: hidden;
469+
text-overflow: ellipsis;
470+
max-width: clamp(160px, 18vw, 360px);
471+
}
466472
}
467473
468474
&__popover {

dist/core-main.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/core-main.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)