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: polish list item #10022

Merged
merged 1 commit into from
Aug 21, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/components/Envelope.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
:class="{ 'important-one-line': oneLineLayout, 'icon-important': !oneLineLayout }"
:data-starred="isImportant ? 'true' : 'false'"
@click.prevent="hasWriteAcl ? onToggleImportant() : false"
v-html="importantSvg" />

Check warning on line 38 in src/components/Envelope.vue

View workflow job for this annotation

GitHub Actions / NPM lint

'v-html' directive can lead to XSS attack
<JunkIcon v-if="data.flags.$junk"
:size="18"
class="app-content-list-item-star junk-icon-style"
Expand Down Expand Up @@ -937,7 +937,7 @@
// In message list, but not the one in the action menu
&.app-content-list-item-star {
background-image: none;
left: 5px;
left: 1px;
top: 8px;
opacity: 1;

Expand Down Expand Up @@ -977,7 +977,7 @@
.junk-icon-style {
opacity: .2;
display: flex;
top: 42px;
top: 32px;
left: 32px;
background-size: 16px;
height: 20px;
Expand Down Expand Up @@ -1011,6 +1011,7 @@
font-weight: bold;
padding-left: 2px;
padding-right: 2px;
white-space: nowrap;
}
.tag-group__bg {
position: absolute;
Expand All @@ -1026,6 +1027,7 @@
position: relative;
margin-right: 1px;
overflow: hidden;
text-overflow: ellipsis;
}
.list-item__wrapper:deep() {
list-style: none;
Expand All @@ -1035,14 +1037,14 @@
}
.icon-important.app-content-list-item-star:deep() {
position: absolute;
top: 8px;
top: 5px;
z-index: 1;
}
.app-content-list-item-star.favorite-icon-style {
display: inline-block;
position: absolute;
margin-bottom: 45px;
margin-left: 30px;
top: 3px;
left: 30px;
cursor: pointer;
stroke: var(--color-main-background);
stroke-width: 2;
Expand Down Expand Up @@ -1070,15 +1072,13 @@
margin-top: 6px;
margin-bottom: 6px;
}
:deep(.list-item) {
flex-wrap: wrap;
}
:deep(.line-two__subtitle) {
display: flex;
flex-basis: 100%;
padding-left: 40px;
width: 450px;
}

:deep(.line-one__title) {
flex-direction: row;
display: flex;
Expand Down
14 changes: 9 additions & 5 deletions src/components/EnvelopeSkeleton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -437,13 +437,13 @@ export default {
flex: 0 0 auto;
justify-content: flex-start;
// we need to make sure the elements are not cut off by the border
padding: var(--list-item-padding);
width: 100%;
border-radius: var(--border-radius-element, 32px);
cursor: pointer;
transition: background-color var(--animation-quick) ease-in-out;
list-style: none;
flex-wrap: nowrap !important;
padding: var(--default-grid-baseline);

&:hover,
&:has(:active),
Expand All @@ -468,7 +468,8 @@ export default {
min-width: 100px;
flex: 1 1 10%;
font-weight: 500;
max-width: 100%;
// we changed the time/date and actions to be alighned with the name
max-width: 78%;
line-height: var(--default-line-height);
}

Expand Down Expand Up @@ -509,6 +510,8 @@ export default {
align-items: end;
white-space: nowrap;
margin-left: calc(var(--default-grid-baseline) * 2);
// to align details on top instead of in the center. The right way to do it would be to change the template, but that breaks one-line layout
margin-top: -22px;

&__details {
margin: 0 9px !important;
Expand Down Expand Up @@ -602,16 +605,17 @@ export default {

&__actions {
flex: 0 0 auto;
align-self: center;
justify-content: center;
align-self: start;
margin-top: -4px;
}

}

// Force icon to be in line with the first two lines
:deep(.app-content-list-item-icon), :deep(.avatardiv), :deep(.avatardiv__initials-wrapper) {
height: calc(var(--default-line-height) * var(--default-font-size) * 2) !important;
width: calc(var(--default-line-height) * var(--default-font-size) * 2) !important;
height: calc(var(--header-menu-item-height) - 4px);
width: calc(var(--header-menu-item-height) - 4px);
}

:deep(.avatardiv__initials){
Expand Down
Loading