Skip to content
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

UI improvements #7966

Merged
merged 3 commits into from
Dec 5, 2022
Merged
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
6 changes: 6 additions & 0 deletions changelog/unreleased/bugfix-ui-sorting-quickactions
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: UI fixes for sorting and quickactions

Ensure the sorting of "shared with" in "shared with me" view is correct when they have been shared simultaneously with users and groups.
Prevent the context actions to disappear when `hoverableQuickActions` is set to true.

https://github.com/owncloud/web/pull/7966
Original file line number Diff line number Diff line change
Expand Up @@ -882,13 +882,13 @@ export default defineComponent({

.hoverable-quick-actions.files-table {
@media (pointer: fine) {
tr {
tr:not([class*='oc-table-highlighted']) {
.resource-table-edit-name,
.resource-table-actions div:first-child {
visibility: hidden;
}
}
tr:hover {
tr:not([class*='oc-table-highlighted']):hover {
.resource-table-edit-name,
.resource-table-actions div:first-child {
visibility: visible;
Expand Down
14 changes: 13 additions & 1 deletion packages/web-app-files/src/helpers/ui/resourceTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,19 @@ export const determineSortFields = (firstResource): SortField[] => {
name: 'sharedWith',
sortable: (sharedWith) => {
if (sharedWith.length > 0) {
return sharedWith[0].displayName
// Ensure the sharees are always sorted and that users
// take precedence over groups. Then return a string with
// all elements to ensure shares with multiple shares do
// not appear mixed within others with a single one
return sharedWith
.sort((a, b) => {
if (a.shareType !== b.shareType) {
return a.shareType < b.shareType ? -1 : 1
}
return a.displayName < b.displayName ? -1 : 1
})
.map((e) => e.displayName)
.join()
}
return false
},
Expand Down