From 5d1cc1d048eb6e798df49f82569fd5e0382cbeb2 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Tue, 12 Sep 2023 16:30:39 +0200 Subject: [PATCH] fix(FilePicker): Align table header for "name" with the file name (previously the preview icon) Signed-off-by: Ferdinand Thiessen --- lib/components/FilePicker/FileList.scss | 10 ++++- lib/components/FilePicker/FileList.vue | 37 +++++++++++++------ .../FilePicker/FileListIcon.module.scss | 15 ++++++++ lib/components/FilePicker/FilePreview.vue | 21 +++-------- lib/components/FilePicker/LoadingTableRow.vue | 15 +++++++- 5 files changed, 68 insertions(+), 30 deletions(-) create mode 100644 lib/components/FilePicker/FileListIcon.module.scss diff --git a/lib/components/FilePicker/FileList.scss b/lib/components/FilePicker/FileList.scss index f65188a9..787057e6 100644 --- a/lib/components/FilePicker/FileList.scss +++ b/lib/components/FilePicker/FileList.scss @@ -5,13 +5,21 @@ tr.file-picker__row { cursor: pointer; overflow: hidden; text-overflow: ellipsis; - padding-inline: 14px 0; border-bottom: none; // remove lines between elements + // checkbox is always fully left aligned + &:not(.row-checkbox) { + padding-inline: 14px 0; + } + // Make column "size" end aligned &.row-size { text-align: end; padding-inline: 0 14px; // align with header } + // column "name" already has the padding (the preview icon) + &.row-name { + padding-inline: 2px 0; + } } } \ No newline at end of file diff --git a/lib/components/FilePicker/FileList.vue b/lib/components/FilePicker/FileList.vue index 2758933e..8ed50280 100644 --- a/lib/components/FilePicker/FileList.vue +++ b/lib/components/FilePicker/FileList.vue @@ -14,18 +14,21 @@ @update:checked="onSelectAll" /> - - - {{ t('Name') }} - +
+ + + + {{ t('Name') }} + +
@@ -214,6 +217,12 @@ const fileContainer = ref() diff --git a/lib/components/FilePicker/LoadingTableRow.vue b/lib/components/FilePicker/LoadingTableRow.vue index a16b7feb..c627ab1c 100644 --- a/lib/components/FilePicker/LoadingTableRow.vue +++ b/lib/components/FilePicker/LoadingTableRow.vue @@ -5,7 +5,10 @@ - +
+ + +
@@ -17,6 +20,8 @@