Skip to content

Commit 2d2eb31

Browse files
committed
Make action column sticky
1 parent c9e9a97 commit 2d2eb31

File tree

6 files changed

+41
-11
lines changed

6 files changed

+41
-11
lines changed

com.woltlab.wcf/templates/shared_gridView.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="section gridView">
1+
<div class="gridView">
22
{if $view->isFilterable()}
33
<div class="gridView__filterBar">
44
<div class="gridView__filters" id="{$view->getID()}_filters">
@@ -37,7 +37,7 @@
3737
</th>
3838
{/foreach}
3939
{if $view->hasActions()}
40-
<th></th>
40+
<th class="gridView__headerColumn gridView__actionColumn"></th>
4141
{/if}
4242
</td>
4343
</thead>

wcfsetup/install/files/acp/templates/cronjobLogList.tpl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
{/hascontent}
3232
</header>
3333

34-
{unsafe:$gridView->render()}
34+
<div class="section">
35+
{unsafe:$gridView->render()}
36+
</div>
3537

3638
{include file='footer'}

wcfsetup/install/files/acp/templates/exceptionLogView.tpl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
{/hascontent}
1515
</header>
1616

17-
{unsafe:$gridView->render()}
17+
<div class="section">
18+
{unsafe:$gridView->render()}
19+
</div>
1820

1921
<script data-relocate="true">
2022
require(['WoltLabSuite/Core/Acp/Controller/ExceptionLog/View'], ({ setup }) => {

wcfsetup/install/files/acp/templates/userOptionList.tpl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
</nav>
1515
</header>
1616

17-
{unsafe:$gridView->render()}
17+
<div class="section">
18+
{unsafe:$gridView->render()}
19+
</div>
1820

1921
{include file='footer'}

wcfsetup/install/files/acp/templates/userRankList.tpl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
</nav>
3333
</header>
3434

35-
{unsafe:$gridView->render()}
35+
<div class="section">
36+
{unsafe:$gridView->render()}
37+
</div>
3638

3739
{include file='footer'}

wcfsetup/install/files/style/ui/gridView.scss

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1+
.gridView {
2+
overflow: auto;
3+
}
4+
15
.gridView__table {
26
border-bottom: 1px solid var(--wcfContentBorder);
37
border-spacing: 0;
48
width: 100%;
9+
overflow-wrap: break-word;
510
}
611

712
.gridView__column,
@@ -48,11 +53,7 @@
4853
}
4954
}
5055

51-
.gridView__headerRow {
52-
box-shadow: inset 0 -1px 0 0 var(--wcfContentBorder);
53-
}
54-
55-
.gridView__row:not(:last-child) {
56+
.gridView__row:not(:last-child) .gridView__column {
5657
box-shadow: inset 0 -1px 0 0 var(--wcfContentBorderInner);
5758
}
5859

@@ -72,6 +73,8 @@
7273
}
7374

7475
.gridView__column {
76+
background-color: var(--wcfContentContainerBackground);
77+
7578
&.gridView__column--title {
7679
font-weight: 600;
7780
}
@@ -103,6 +106,9 @@
103106
}
104107

105108
.gridView__headerColumn {
109+
background-color: var(--wcfContentContainerBackground);
110+
box-shadow: inset 0 -1px 0 0 var(--wcfContentBorder);
111+
106112
&.gridView__column--digits,
107113
&.gridView__column--id,
108114
&.gridView__column--date {
@@ -115,6 +121,10 @@
115121
width: 1px;
116122
white-space: nowrap;
117123
word-wrap: normal;
124+
position: sticky;
125+
right: 0;
126+
animation: auto linear 0s 1 normal none running gridView__actionColumn__dropShadow;
127+
animation-timeline: scroll(inline);
118128
}
119129

120130
.gridView__filterBar {
@@ -145,3 +155,15 @@
145155
display: flex;
146156
gap: 10px;
147157
}
158+
159+
@keyframes gridView__actionColumn__dropShadow {
160+
0% {
161+
filter: drop-shadow(rgba(0, 0, 0, 0.08) -2px 10px 6px);
162+
}
163+
75% {
164+
filter: drop-shadow(rgba(0, 0, 0, 0.08) -2px 10px 6px);
165+
}
166+
99% {
167+
filter: none;
168+
}
169+
}

0 commit comments

Comments
 (0)