Skip to content

Improve UX: sortable Created-by column + avatars #7425

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
20 changes: 18 additions & 2 deletions client/app/assets/less/inc/base.less
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,24 @@ text.slicetext {
border-radius: 100%;
margin-right: 3px;
margin-top: -2px;
width: 20px;
height: 20px;
width: 30px;
height: 30px;
margin-top: auto;
margin-bottom: auto;
}

.profile__figure_thumb {
display: flex;
flex-flow: table;
margin: auto;
align-items: center;
}

.profile__figcaption_thumb {
text-align: center;
padding-left: 5px;
margin: auto;
white-space: nowrap;
}

// Error state
Expand Down
1 change: 1 addition & 0 deletions client/app/assets/less/inc/table.less
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@

tbody > tr > td {
padding-top: 5px !important;
white-space: nowrap;
}

.btn-favorite,
Expand Down
17 changes: 10 additions & 7 deletions client/app/components/items-list/components/ItemsTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,16 @@ export const Columns = {
formatTitle = isFunction(formatTitle) ? formatTitle : identity;
return extend(
{
width: "1%",
render: (user, item) => (
<img
src={item.user.profile_image_url}
className="profile__image_thumb"
alt={formatTitle(user.name, item)}
title={formatTitle(user.name, item)}
/>
<figure className="profile__figure_thumb">
<img
src={item.user.profile_image_url}
className="profile__image_thumb"
alt={formatTitle(user.name, item)}
title={formatTitle(user.name, item)}
/>
<figcaption className="profile__figcaption_thumb">{user.name}</figcaption>
</figure>
),
},
overrides
Expand Down Expand Up @@ -86,6 +88,7 @@ export const Columns = {
};

Columns.date.sortable = sortable;
Columns.avatar.sortable = sortable;
Columns.dateTime.sortable = sortable;
Columns.duration.sortable = sortable;
Columns.timeAgo.sortable = sortable;
Expand Down
2 changes: 1 addition & 1 deletion client/app/pages/queries-list/QueriesList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const listColumns = [
width: null,
}
),
Columns.custom((text, item) => item.user.name, { title: "Created By", width: "1%" }),
Columns.avatar.sortable({ title: "Created By", field: "user", orderByField: "created_by", width: "1%" }),
Columns.dateTime.sortable({ title: "Created At", field: "created_at", width: "1%" }),
Columns.dateTime.sortable({
title: "Last Executed At",
Expand Down
Loading