Skip to content

Commit a266756

Browse files
committed
make "Created By" sortable like others
for better UX such as finding the query authors
1 parent 0b6a53a commit a266756

File tree

4 files changed

+30
-10
lines changed

4 files changed

+30
-10
lines changed

client/app/assets/less/inc/base.less

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,24 @@ text.slicetext {
171171
border-radius: 100%;
172172
margin-right: 3px;
173173
margin-top: -2px;
174-
width: 20px;
175-
height: 20px;
174+
width: 30px;
175+
height: 30px;
176+
margin-top: auto;
177+
margin-bottom: auto;
178+
}
179+
180+
.profile__figure_thumb {
181+
display: flex;
182+
flex-flow: table;
183+
margin: auto;
184+
align-items: center;
185+
}
186+
187+
.profile__figcaption_thumb {
188+
text-align: center;
189+
padding-left: 5px;
190+
margin: auto;
191+
white-space: nowrap;
176192
}
177193

178194
// Error state

client/app/assets/less/inc/table.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101

102102
tbody > tr > td {
103103
padding-top: 5px !important;
104+
white-space: nowrap;
104105
}
105106

106107
.btn-favorite,

client/app/components/items-list/components/ItemsTable.jsx

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,16 @@ export const Columns = {
2828
formatTitle = isFunction(formatTitle) ? formatTitle : identity;
2929
return extend(
3030
{
31-
width: "1%",
3231
render: (user, item) => (
33-
<img
34-
src={item.user.profile_image_url}
35-
className="profile__image_thumb"
36-
alt={formatTitle(user.name, item)}
37-
title={formatTitle(user.name, item)}
38-
/>
32+
<figure className="profile__figure_thumb">
33+
<img
34+
src={item.user.profile_image_url}
35+
className="profile__image_thumb"
36+
alt={formatTitle(user.name, item)}
37+
title={formatTitle(user.name, item)}
38+
/>
39+
<figcaption className="profile__figcaption_thumb">{user.name}</figcaption>
40+
</figure>
3941
),
4042
},
4143
overrides
@@ -86,6 +88,7 @@ export const Columns = {
8688
};
8789

8890
Columns.date.sortable = sortable;
91+
Columns.avatar.sortable = sortable;
8992
Columns.dateTime.sortable = sortable;
9093
Columns.duration.sortable = sortable;
9194
Columns.timeAgo.sortable = sortable;

client/app/pages/queries-list/QueriesList.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ const listColumns = [
7272
width: null,
7373
}
7474
),
75-
Columns.custom((text, item) => item.user.name, { title: "Created By", width: "1%" }),
75+
Columns.avatar.sortable({ title: "Created By", field: "user", orderByField: "created_by", width: "1%" }),
7676
Columns.dateTime.sortable({ title: "Created At", field: "created_at", width: "1%" }),
7777
Columns.dateTime.sortable({
7878
title: "Last Executed At",

0 commit comments

Comments
 (0)