Attribute view support sticky layout (#9617)

* 🎨 Frozen the first col of the attribute view

* 🎨 Optimized the add row

* 🎨 Fixed the style of the first and last rows to misalign in attribute view

the height of the breadcrumbs caused the first and last rows to misalign in attribute view

* 🎨 Improve attribute view row gutter

* Update _av.scss
This commit is contained in:
Yingyi / 颖逸 2023-11-10 08:41:47 +08:00 committed by GitHub
parent 4190c7bf8d
commit 433f4d5541
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 372 additions and 80 deletions

View file

@ -72,6 +72,10 @@
opacity: 0;
display: flex;
&[draggable=true] {
cursor: grab;
}
svg {
height: 25px;
}
@ -90,6 +94,10 @@
cursor: pointer;
}
&__body {
float: left;
}
&__row {
display: flex;
border-bottom: 1px solid var(--b3-theme-surface-lighter);
@ -113,6 +121,10 @@
.av__gutters {
opacity: 1;
}
.av__firstcol svg {
opacity: 1;
}
}
&--select {
@ -136,11 +148,23 @@
}
}
&--add {
.av__firstcol svg {
opacity: 1;
}
&:hover {
background-color: var(--b3-list-icon-hover);
}
}
&--header,
&--footer {
background-color: var(--b3-theme-background);
position: relative;
}
&--add,
&--footer {
display: flex;
border-top: 1px solid var(--b3-theme-surface-lighter);
@ -184,27 +208,6 @@
}
}
}
&--add {
color: var(--b3-theme-on-surface);
padding: 5px 5px 5px 7px;
display: flex;
align-items: center;
transition: background 20ms ease-in 0s;
font-size: 87.5%;
svg {
height: 12px;
width: 12px;
color: var(--b3-theme-on-surface);
margin-right: 5px;
flex-shrink: 0;
}
&:hover {
background-color: var(--b3-list-icon-hover);
}
}
}
&__cell {
@ -234,6 +237,13 @@
border-radius: var(--b3-border-radius);
}
&--add {
position: sticky;
left: 25px;
font-size: 87.5%;
padding: 0 0.5em;
}
.block__icon {
position: absolute;
right: 5px;
@ -265,6 +275,7 @@
&__celltext {
overflow: hidden;
line-height: normal;
.b3-chip {
margin: 1px 2px;
@ -283,6 +294,14 @@
}
&__firstcol {
background-color: var(--b3-theme-background);
border-right: 1px solid var(--b3-theme-surface-lighter);
position: sticky;
left: 0;
width: 24px;
z-index: 1;
svg {
color: var(--b3-theme-on-surface);
height: 33px;
@ -292,10 +311,6 @@
box-sizing: border-box;
float: left;
}
&:hover svg {
opacity: 1;
}
}
&__widthdrag {
@ -380,6 +395,7 @@
.protyle-wysiwyg--select,
.protyle-wysiwyg--hl {
.av__row--header,
.av__firstcol,
.av__row--footer {
background-color: transparent;
}