Skip to content

Commit

Permalink
Improve users table layout on small screens (#7476)
Browse files Browse the repository at this point in the history
  • Loading branch information
JammingBen authored Aug 18, 2022
1 parent cea7077 commit e24c1e3
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 8 deletions.
6 changes: 6 additions & 0 deletions changelog/unreleased/enhancement-users-table-small-screens
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Enhancement: Users table on small screen

We've improved the layout of the users table on small screens.

https://github.com/owncloud/web/pull/7476
https://github.com/owncloud/web/issues/7439
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<template>
<oc-table
ref="table"
class="users-table"
:sort-by="sortBy"
:sort-dir="sortDir"
:fields="fields"
Expand Down Expand Up @@ -44,17 +45,15 @@
class="oc-mr-xs quick-action-button oc-p-xs"
@click="$emit('showPanel', { user: item, panel: 'DetailsPanel' })"
>
<oc-icon name="information" fill-type="line" />
</oc-button>
<oc-button
<oc-icon name="information" fill-type="line" /></oc-button
><oc-button
v-oc-tooltip="$gettext('Group assignments')"
appearance="raw"
class="oc-mr-xs quick-action-button oc-p-xs"
@click="$emit('showPanel', { user: item, panel: 'GroupAssignmentsPanel' })"
>
<oc-icon name="group-2" fill-type="line" />
</oc-button>
<oc-button
<oc-icon name="group-2" fill-type="line" /></oc-button
><oc-button
v-oc-tooltip="$gettext('Edit')"
appearance="raw"
class="oc-mr-xs quick-action-button oc-p-xs"
Expand Down Expand Up @@ -235,4 +234,58 @@ export default {
background: yellow;
color: var(--oc-color-text-muted);
}
.users-table {
.oc-table-header-cell-actions,
.oc-table-data-cell-actions {
white-space: nowrap;
}
.oc-table-header-cell-role,
.oc-table-data-cell-role {
display: none;
@media only screen and (min-width: 1200px) {
display: table-cell;
}
}
.oc-table-header-cell-displayName,
.oc-table-data-cell-displayName {
display: none;
@media only screen and (min-width: 1000px) {
display: table-cell;
}
}
&-squashed {
.oc-table-header-cell-role,
.oc-table-data-cell-role {
display: none;
@media only screen and (min-width: 1600px) {
display: table-cell;
}
}
.oc-table-header-cell-displayName,
.oc-table-data-cell-displayName {
display: none;
@media only screen and (min-width: 1400px) {
display: table-cell;
}
}
.oc-table-header-cell-mail,
.oc-table-data-cell-mail {
display: none;
@media only screen and (min-width: 1200px) {
display: table-cell;
}
}
}
}
</style>
10 changes: 8 additions & 2 deletions packages/web-app-user-management/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,18 @@ const routes = [
{
path: '/users',
name: 'user-management-users',
component: Users
component: Users,
meta: {
title: $gettext('Users')
}
},
{
path: '/groups',
name: 'user-management-groups',
component: Groups
component: Groups,
meta: {
title: $gettext('Groups')
}
}
]

Expand Down
1 change: 1 addition & 0 deletions packages/web-app-user-management/src/views/Users.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
<div v-else>
<UsersList
:users="users"
:class="{ 'users-table-squashed': sideBarOpen }"
:selected-users="selectedUsers"
:header-position="listHeaderPosition"
@toggleSelectUser="toggleSelectUser"
Expand Down

0 comments on commit e24c1e3

Please sign in to comment.