Skip to content
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

fix(FilePicker): Fix design review comments about column alignment #881

Merged
merged 1 commit into from Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/components/FilePicker/FileList.scss
Expand Up @@ -8,8 +8,8 @@ tr.file-picker__row {
padding-inline: 14px 0;
border-bottom: none; // remove lines between elements

// Make "size" and "modified" rows end aligned
&:not(:nth-of-type(2)) {
// Make column "size" end aligned
&.row-size {
text-align: end;
padding-inline: 0 14px; // align with header
}
Expand Down
6 changes: 3 additions & 3 deletions lib/components/FilePicker/FileList.vue
Expand Up @@ -186,7 +186,7 @@ function onChangeDirectory(dir: Node) {
width: 44px;
}
&.row-name {
width: 150px;
width: 230px;
}
&.row-size {
width: 100px;
Expand All @@ -198,7 +198,7 @@ function onChangeDirectory(dir: Node) {

// >> begin of hacks for table header sorting buttons
// TODO: Remove this hack after ... is available
th:nth-of-type(2) {
th:not(.row-size) {
:deep(.button-vue__wrapper) {
justify-content: start;
flex-direction: row-reverse;
Expand All @@ -207,7 +207,7 @@ function onChangeDirectory(dir: Node) {
padding-inline: 16px 4px;
}
}
th:not(:nth-of-type(2)) :deep(.button-vue__wrapper) {
th.row-size :deep(.button-vue__wrapper) {
justify-content: end;
}
th :deep(.button-vue__wrapper) {
Expand Down
5 changes: 4 additions & 1 deletion lib/components/FilePicker/FileListRow.vue
Expand Up @@ -11,7 +11,7 @@
<td class="row-name" @click="handleClick">
<div class="file-picker__name-container">
<div class="file-picker__file-icon" :style="{ backgroundImage }" />
<div class="file-picker__file-name" v-text="displayName" />
<div class="file-picker__file-name" :title="displayName" v-text="displayName" />
</div>
</td>
<td class="row-size">
Expand Down Expand Up @@ -112,6 +112,9 @@ function handleKeyDown(event: KeyboardEvent) {

&__file-name {
padding-inline-start: 6px;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
}
}
</style>