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

Quality of life improvements #170

Open
wants to merge 28 commits into
base: upstream
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
3a7df38
fix: filter chip design
JammingBen Aug 4, 2023
6bca0b2
[tx] updated from transifex
ownclouders Aug 8, 2023
d021151
Merge pull request #9543 from owncloud/fix-filter-chip-design
JammingBen Aug 8, 2023
3053edf
Enable passing e2e test (#9550)
SwikritiT Aug 8, 2023
0e761d9
add e2e tests for searching renamed and reshared resources (#9549)
SwikritiT Aug 8, 2023
5cb7499
Fix faulty import
Aug 9, 2023
474c177
Merge pull request #9560 from owncloud/fix-faulty-import
JammingBen Aug 9, 2023
c712af9
fixed tag not showing up after removal when using "x" button (#9563)
grimmoc Aug 9, 2023
4eed7b4
Automated changelog update [skip ci]
grimmoc Aug 9, 2023
0da2ebb
Keyboard shortcuts - Admin Settings (#9498)
jacob-nv Aug 10, 2023
65831b6
keyboardActions: Use event.preventDefault only when an action has bee…
dschmidt Aug 10, 2023
55ab7e8
branch to cernbox
johafr Jul 18, 2023
bb5e2f0
feat: image styles
johafr Jul 24, 2023
79f4fda
fix: rename styles
johafr Jul 24, 2023
5465edd
cropping tools
johafr Jul 28, 2023
ffac053
gallery init
johafr Aug 1, 2023
a4181aa
rework image-gallery
johafr Aug 2, 2023
11531e5
bug fixes
johafr Aug 2, 2023
26be0da
feat: duplicate image on save
johafr Aug 3, 2023
ff7e5e9
latest refetch changes
johafr Aug 4, 2023
230b976
fix: quality of life improvements
johafr Aug 7, 2023
299eed9
feat/image-gallery
johafr Aug 7, 2023
2c8f5a3
fix: added gettext
johafr Aug 7, 2023
f505a8f
saving bug
johafr Aug 7, 2023
8b66c3d
feat: last changes
johafr Aug 10, 2023
3f4b00f
fix: more final changes
johafr Aug 11, 2023
85f1dd3
feat: added persistent rotation
johafr Aug 11, 2023
cffd796
fix: added fixme comment
johafr Aug 11, 2023
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,7 @@ Details
https://github.com/owncloud/web/issues/9362
https://github.com/owncloud/web/issues/9416
https://github.com/owncloud/web/pull/9525
https://github.com/owncloud/web/pull/9563

* Enhancement - Don't display confirmation dialog on file deletion: [#9527](https://github.com/owncloud/web/pull/9527)

Expand Down
2 changes: 2 additions & 0 deletions changelog/unreleased/enhancement-tags-form
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ Enhancement: Tags form improved
We've improved the tags form in various ways, including visual appearance as well as usability. Auto save, remove tags on backspace, and contextual helper (and more, see issues)

https://github.com/owncloud/web/pull/9525
https://github.com/owncloud/web/pull/9563
https://github.com/owncloud/web/issues/9363
https://github.com/owncloud/web/issues/9356
https://github.com/owncloud/web/issues/9360
https://github.com/owncloud/web/issues/9362
https://github.com/owncloud/web/issues/9416

23 changes: 11 additions & 12 deletions packages/design-system/src/components/OcFilterChip/OcFilterChip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export default defineComponent({

<style lang="scss">
.oc-filter-chip {
&-button {
&-button.oc-pill {
align-items: center;
background-color: var(--oc-color-background-default) !important;
color: var(--oc-color-text-muted) !important;
Expand All @@ -129,17 +129,16 @@ export default defineComponent({
max-width: 150px;
height: 24px;
padding: var(--oc-space-xsmall) var(--oc-space-small) !important;

&-selected,
&-selected:hover {
background-color: var(--oc-color-swatch-primary-default) !important;
color: var(--oc-color-text-inverse) !important;
border-top-left-radius: 99px !important;
border-bottom-left-radius: 99px !important;
border-top-right-radius: 0px !important;
border-bottom-right-radius: 0px !important;
border: 0;
}
}
&-button-selected.oc-pill,
&-button-selected.oc-pill:hover {
background-color: var(--oc-color-swatch-primary-default) !important;
color: var(--oc-color-text-inverse) !important;
border-top-left-radius: 99px !important;
border-bottom-left-radius: 99px !important;
border-top-right-radius: 0px !important;
border-bottom-right-radius: 0px !important;
border: 0;
}
&-clear,
&-clear:hover {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ import {
} from 'vue'
import { useGettext } from 'vue3-gettext'
import 'vue-select/dist/vue-select.css'
import { ContextualHelper } from 'design-system/src/helpers'
import { ContextualHelper } from '../../helpers'

/**
* Select component with a trigger and dropdown based on [Vue Select](https://vue-select.org/)
Expand Down
2 changes: 1 addition & 1 deletion packages/web-app-admin-settings/l10n/translations.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div>
<div id="group-list">
<oc-text-input
id="groups-filter"
v-model="filterTerm"
Expand Down Expand Up @@ -41,8 +41,8 @@
:option="rowData.item"
:label="getSelectGroupLabel(rowData.item)"
hide-label
@update:model-value="$emit('toggleSelectGroup', rowData.item)"
@click.stop
@update:model-value="toggleGroup(rowData.item)"
@click.stop="rowClicked([rowData.item, $event])"
/>
</template>
<template #avatar="rowData">
Expand Down Expand Up @@ -126,6 +126,12 @@ import { defaultFuseOptions } from 'web-pkg/src/helpers'
import { useFileListHeaderPosition, usePagination } from 'web-pkg/src/composables'
import Pagination from 'web-pkg/src/components/Pagination.vue'
import { perPageDefault, perPageStoragePrefix } from 'web-app-admin-settings/src/defaults'
import { useKeyboardActions } from 'web-pkg/src/composables/keyboardActions'
import {
useKeyboardTableMouseActions,
useKeyboardTableNavigation
} from 'web-app-admin-settings/src/composables/keyboardActions'
import { findIndex } from 'lodash-es'

export default defineComponent({
name: 'GroupsList',
Expand All @@ -149,6 +155,9 @@ export default defineComponent({
const sortDir = ref<string>(SortDir.Asc)
const filterTerm = ref<string>('')

const lastSelectedGroupIndex = ref(0)
const lastSelectedGroupId = ref(null)

const isGroupSelected = (group) => {
return props.selectedGroups.some((s) => s.id === group.id)
}
Expand All @@ -164,10 +173,28 @@ export default defineComponent({
eventBus.publish(SideBarEventTopics.open)
}
const rowClicked = (data) => {
const group = data[0]
if (!isGroupSelected(group)) {
selectGroup(group)
const resource = data[0]
const eventData = data[1]
const isCheckboxClicked = eventData?.target.getAttribute('type') === 'checkbox'

const contextActionClicked = eventData?.target?.closest('div')?.id === 'oc-files-context-menu'
if (contextActionClicked) {
return
}

if (eventData?.metaKey) {
return eventBus.publish('app.resources.list.clicked.meta', resource)
}
if (eventData?.shiftKey) {
return eventBus.publish('app.resources.list.clicked.shift', {
resource,
skipTargetSelection: isCheckboxClicked
})
}
if (isCheckboxClicked) {
return
}
toggleGroup(resource, true)
}
const showContextMenuOnBtnClick = (data, group) => {
const { dropdown, event } = data
Expand Down Expand Up @@ -230,6 +257,29 @@ export default defineComponent({
total: totalPages
} = usePagination({ items, perPageDefault, perPageStoragePrefix })

const keyActions = useKeyboardActions('group-list')
useKeyboardTableNavigation(
keyActions,
paginatedItems,
props.selectedGroups,
lastSelectedGroupIndex,
lastSelectedGroupId
)
useKeyboardTableMouseActions(
keyActions,
paginatedItems,
props.selectedGroups,
lastSelectedGroupIndex,
lastSelectedGroupId
)

const toggleGroup = (group, deselect = false) => {
lastSelectedGroupIndex.value = findIndex(props.groups, (u) => u.id === group.id)
lastSelectedGroupId.value = group.id
keyActions.resetSelectionCursor()
emit('toggleSelectGroup', group, deselect)
}

watch(currentPage, () => {
emit('unSelectAllGroups')
})
Expand All @@ -240,6 +290,7 @@ export default defineComponent({
isGroupSelected,
showContextMenuOnBtnClick,
showContextMenuOnRightClick,
toggleGroup,
fileListHeaderY,
contextMenuButtonRef,
showEditPanel,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div>
<div id="space-list">
<oc-text-input
id="spaces-filter"
v-model="filterTerm"
Expand Down Expand Up @@ -42,8 +42,8 @@
:option="item"
:label="getSelectSpaceLabel(item)"
hide-label
@update:model-value="$emit('toggleSelectSpace', item)"
@click.stop
@update:model-value="toggleSpace(item)"
@click.stop="fileClicked([item, $event])"
/>
</template>
<template #icon>
Expand Down Expand Up @@ -142,6 +142,12 @@ import {
} from 'web-pkg/src/composables'
import Pagination from 'web-pkg/src/components/Pagination.vue'
import { perPageDefault, perPageStoragePrefix } from 'web-app-admin-settings/src/defaults'
import { useKeyboardActions } from 'web-pkg/src/composables/keyboardActions'
import {
useKeyboardTableMouseActions,
useKeyboardTableNavigation
} from 'web-app-admin-settings/src/composables/keyboardActions'
import { findIndex } from 'lodash-es'

export default defineComponent({
name: 'SpacesList',
Expand Down Expand Up @@ -170,6 +176,9 @@ export default defineComponent({
const markInstance = ref(undefined)
const tableRef = ref(undefined)

const lastSelectedSpaceIndex = ref(0)
const lastSelectedSpaceId = ref(null)

const highlighted = computed(() => props.selectedSpaces.map((s) => s.id))
const footerTextTotal = computed(() => {
return $gettext('%{spaceCount} spaces in total', {
Expand Down Expand Up @@ -392,10 +401,28 @@ export default defineComponent({
})

const fileClicked = (data) => {
const space = data[0]
if (!isSpaceSelected(space)) {
selectSpace(space)
const resource = data[0]
const eventData = data[1]
const isCheckboxClicked = eventData?.target.getAttribute('type') === 'checkbox'

const contextActionClicked = eventData?.target?.closest('div')?.id === 'oc-files-context-menu'
if (contextActionClicked) {
return
}

if (eventData?.metaKey) {
return eventBus.publish('app.resources.list.clicked.meta', resource)
}
if (eventData?.shiftKey) {
return eventBus.publish('app.resources.list.clicked.shift', {
resource,
skipTargetSelection: isCheckboxClicked
})
}
if (isCheckboxClicked) {
return
}
toggleSpace(resource, true)
}

const showContextMenuOnBtnClick = (data, space) => {
Expand Down Expand Up @@ -428,6 +455,29 @@ export default defineComponent({
eventBus.publish(SideBarEventTopics.open)
}

const keyActions = useKeyboardActions('space-list')
useKeyboardTableNavigation(
keyActions,
paginatedItems,
props.selectedSpaces,
lastSelectedSpaceIndex,
lastSelectedSpaceId
)
useKeyboardTableMouseActions(
keyActions,
paginatedItems,
props.selectedSpaces,
lastSelectedSpaceIndex,
lastSelectedSpaceId
)

const toggleSpace = (space, deselect = false) => {
lastSelectedSpaceIndex.value = findIndex(props.spaces, (u) => u.id === space.id)
lastSelectedSpaceId.value = space.id
keyActions.resetSelectionCursor()
emit('toggleSelectSpace', space, deselect)
}

return {
allSpacesSelected,
sortBy,
Expand All @@ -448,6 +498,7 @@ export default defineComponent({
getMemberCount,
getSelectSpaceLabel,
handleSort,
toggleSpace,
fileClicked,
isSpaceSelected,
contextMenuButtonRef,
Expand Down
Loading