Skip to content

Commit 17193bb

Browse files
susnuxartonge
authored andcommitted
fix(files): Ensure actions never overflow filename
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent b7d1157 commit 17193bb

File tree

2 files changed

+20
-5
lines changed

2 files changed

+20
-5
lines changed

apps/files/src/components/FilesListVirtual.vue

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -872,8 +872,8 @@ export default defineComponent({
872872
.files-list--grid tbody.files-list__tbody {
873873
--item-padding: 16px;
874874
--icon-preview-size: 166px;
875-
--name-height: 32px;
876-
--mtime-height: 16px;
875+
--name-height: var(--default-clickable-area);
876+
--mtime-height: calc(var(--font-size-small) + var(--default-grid-baseline));
877877
--row-width: calc(var(--icon-preview-size) + var(--item-padding) * 2);
878878
--row-height: calc(var(--icon-preview-size) + var(--name-height) + var(--mtime-height) + var(--item-padding) * 2);
879879
--checkbox-padding: 0px;
@@ -955,7 +955,7 @@ export default defineComponent({
955955
.files-list__row-mtime {
956956
width: var(--icon-preview-size);
957957
height: var(--mtime-height);
958-
font-size: calc(var(--default-font-size) - 4px);
958+
font-size: var(--font-size-small);
959959
}
960960
961961
.files-list__row-actions {
@@ -966,4 +966,21 @@ export default defineComponent({
966966
height: var(--clickable-area);
967967
}
968968
}
969+
970+
@media screen and (max-width: 768px) {
971+
// there is no mtime
972+
.files-list--grid tbody.files-list__tbody {
973+
--mtime-height: 0px;
974+
975+
// so we move the action to the name
976+
.files-list__row-actions {
977+
inset-block-end: var(--item-padding);
978+
}
979+
980+
// and we need to keep space on the name for the actions
981+
.files-list__row-name-text {
982+
padding-inline-end: var(--clickable-area) !important;
983+
}
984+
}
985+
}
969986
</style>

cypress/e2e/files/scrolling.cy.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,7 @@ describe('files: Scrolling to selected file in file list (GRID MODE)', { testIso
228228
.and(beOverlappedByTableHeader)
229229
}
230230

231-
// see footer is only shown partly
232231
cy.get('tfoot')
233-
.should(notBeFullyInViewport)
234232
.contains('span', '12 files')
235233
.should('be.visible')
236234
})

0 commit comments

Comments
 (0)