Skip to content

Commit

Permalink
Revert "[full-ci] Merge master into experimental (#7460)"
Browse files Browse the repository at this point in the history
This reverts commit 83bc21c.
  • Loading branch information
fschade authored Aug 16, 2022
1 parent 0a39522 commit 3a9fdb6
Show file tree
Hide file tree
Showing 19 changed files with 35 additions and 397 deletions.
4 changes: 2 additions & 2 deletions .drone.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# The version of OCIS to use in pipelines that test against OCIS
OCIS_COMMITID=f99a2072d33debc7fda43f9b27ba48c01014a83b
OCIS_BRANCH=experimental
OCIS_COMMITID=8bb2ebcf4bcecd0ddfb3ce8f2cb4ba3d51be19b5
OCIS_BRANCH=master
10 changes: 0 additions & 10 deletions changelog/unreleased/enhancement-tags-support

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import Rename from '../../mixins/actions/rename'
import Restore from '../../mixins/actions/restore'
import ShowActions from '../../mixins/actions/showActions'
import ShowDetails from '../../mixins/actions/showDetails'
import ShowEditTags from '../../mixins/actions/showEditTags'
import ShowShares from '../../mixins/actions/showShares'
import SetSpaceImage from '../../mixins/spaces/actions/setImage'
import SetSpaceReadme from '../../mixins/spaces/actions/setReadme'
Expand Down Expand Up @@ -51,7 +50,6 @@ export default {
Restore,
ShowActions,
ShowDetails,
ShowEditTags,
ShowShares,
SetSpaceImage,
SetSpaceReadme,
Expand Down Expand Up @@ -154,7 +152,6 @@ export default {
...this.$_copy_items,
...this.$_paste_items,
...this.$_rename_items,
...this.$_showEditTags_items,
...this.$_restore_items,
...this.$_acceptShare_items,
...this.$_declineShare_items,
Expand Down
45 changes: 2 additions & 43 deletions packages/web-app-files/src/components/FilesList/ResourceTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,22 +81,6 @@
<template #size="{ item }">
<oc-resource-size :size="item.size || Number.NaN" />
</template>
<template #tags="{ item }">
<router-link v-for="tag in item.tags.slice(0, 2)" :key="tag" :to="getTagLink(tag)">
<oc-tag class="resource-table-tag oc-ml-xs" :rounded="true" size="small">
<oc-icon name="price-tag-3" size="small" />
<span class="oc-text-truncate">{{ tag }}</span>
</oc-tag>
</router-link>
<oc-tag
v-if="item.tags.length > 2"
size="small"
class="resource-table-tag-more"
@click="openTagsSidebar"
>
+ {{ item.tags.length - 2 }}
</oc-tag>
</template>
<template #mdate="{ item }">
<span
v-oc-tooltip="formatDate(item.mdate)"
Expand Down Expand Up @@ -204,7 +188,7 @@ import { extractDomSelector } from 'web-client/src/helpers/resource'
import { Resource } from 'web-client'
import { ClipboardActions } from '../../helpers/clipboardActions'
import { ShareTypes } from 'web-client/src/helpers/share'
import { createLocationSpaces, createLocationCommon } from '../../router'
import { createLocationSpaces } from '../../router'
import { formatDateFromJSDate, formatRelativeDateFromJSDate } from 'web-pkg/src/helpers'
const mapResourceFields = (resource: Resource, mapping = {}) => {
Expand Down Expand Up @@ -417,7 +401,7 @@ export default defineComponent({
}
},
computed: {
...mapGetters(['configuration', 'capabilities']),
...mapGetters(['configuration']),
...mapState('Files', [
'areFileExtensionsShown',
'latestSelectedId',
Expand Down Expand Up @@ -489,15 +473,6 @@ export default defineComponent({
alignH: 'right',
wrap: 'nowrap'
},
this.capabilities?.files?.tags
? {
name: 'tags',
title: this.$gettext('Tags'),
type: 'slot',
alignH: 'right',
wrap: 'nowrap'
}
: {},
{
name: 'owner',
title: this.$gettext('Shared by'),
Expand Down Expand Up @@ -589,15 +564,9 @@ export default defineComponent({
},
methods: {
...mapActions('Files/sidebar', ['openWithPanel']),
...mapActions('Files/sidebar', { openSidebar: 'open' }),
isResourceSelected(item) {
return this.selectedIds.includes(item.id)
},
getTagLink(tag) {
return createLocationCommon('files-common-search', {
query: { term: `Tags:${tag}`, provider: 'files.sdk' }
})
},
isResourceCut(resource) {
if (this.clipboardAction !== ClipboardActions.Cut) return false
return this.clipboardResources.some((r) => r.id === resource.id)
Expand All @@ -612,9 +581,6 @@ export default defineComponent({
openRenameDialog(item) {
this.$_rename_trigger({ resources: [item] })
},
openTagsSidebar() {
this.openSidebar()
},
openSharingSidebar(file) {
if (file.share?.shareType === ShareTypes.link.value) {
this.openWithPanel('sharing-item#linkShares')
Expand Down Expand Up @@ -855,13 +821,6 @@ export default defineComponent({
}
}
}
&-tag {
max-width: 80px;
}
&-tag-more {
cursor: pointer;
border: 0 !important;
}
&-edit-name {
display: inline-flex;
vertical-align: super;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,17 +140,6 @@
</div>
</td>
</tr>
<tr v-if="showTags" data-testid="tags">
<th scope="col" class="oc-pr-s" v-text="tagsLabel" />
<td>
<router-link v-for="(tag, index) in file.tags" :key="tag" :to="getTagLink(tag)">
<span>
<span v-if="index + 1 < file.tags.length" class="oc-mr-xs">{{ tag }},</span>
<span v-else v-text="tag" />
</span>
</router-link>
</td>
</tr>
</table>
</div>
<p v-else data-testid="noContentText" v-text="noContentText" />
Expand All @@ -163,9 +152,8 @@ import { ImageDimension } from '../../../constants'
import { loadPreview } from 'web-pkg/src/helpers/preview'
import upperFirst from 'lodash-es/upperFirst'
import path from 'path'
import { createLocationSpaces, isLocationSpacesActive, createLocationCommon } from '../../../router'
import { createLocationSpaces, isLocationSpacesActive } from '../../../router'
import { ShareTypes } from 'web-client/src/helpers/share'
import {
useAccessToken,
usePublicLinkContext,
Expand Down Expand Up @@ -221,7 +209,7 @@ export default defineComponent({
}),
computed: {
...mapGetters('Files', ['versions', 'sharesTree', 'sharesTreeLoading']),
...mapGetters(['user', 'configuration', 'capabilities']),
...mapGetters(['user', 'configuration']),
file() {
return this.displayedItem.value
Expand Down Expand Up @@ -346,12 +334,6 @@ export default defineComponent({
const displayDate = formatDateFromHTTP(this.file.mdate, this.$language.current)
return upperFirst(displayDate)
},
showTags() {
return this.capabilities?.files.tags && this.file.tags?.length
},
tagsLabel() {
return this.$gettext('Tags')
},
hasAnyShares() {
return (
this.file.shareTypes?.length > 0 ||
Expand Down Expand Up @@ -480,11 +462,6 @@ export default defineComponent({
this.copiedDirect = false
this.copiedEos = false
}, 550)
},
getTagLink(tag) {
return createLocationCommon('files-common-search', {
query: { term: `Tags:${tag}`, provider: 'files.sdk' }
})
}
}
})
Expand All @@ -499,7 +476,6 @@ export default defineComponent({
td {
max-width: 0;
width: 100%;
overflow-wrap: break-word;
div {
min-width: 0;
Expand Down
146 changes: 0 additions & 146 deletions packages/web-app-files/src/components/SideBar/TagsPanel.vue

This file was deleted.

19 changes: 0 additions & 19 deletions packages/web-app-files/src/fileSideBars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import FileDetailsMultiple from './components/SideBar/Details/FileDetailsMultipl
import FileActions from './components/SideBar/Actions/FileActions.vue'
import FileVersions from './components/SideBar/Versions/FileVersions.vue'
import SharesPanel from './components/SideBar/Shares/SharesPanel.vue'
import TagsPanel from './components/SideBar/TagsPanel.vue'
import NoSelection from './components/SideBar/NoSelection.vue'
import SpaceActions from './components/SideBar/Actions/SpaceActions.vue'
import SpaceDetails from './components/SideBar/Details/SpaceDetails.vue'
Expand Down Expand Up @@ -141,24 +140,6 @@ const panelGenerators: (({
return false
}
}),
({ capabilities, highlightedFile, router, multipleSelection, rootFolder }) => ({
app: 'tags-item',
icon: 'price-tag-3',
iconFillType: 'line',
title: $gettext('Tags'),
component: TagsPanel,
componentAttrs: {},
get enabled() {
if (!capabilities?.files?.tags || multipleSelection || rootFolder) return false
if (typeof highlightedFile.canEditTags !== 'function' || !highlightedFile.canEditTags())
return false
return !(
isLocationTrashActive(router, 'files-trash-personal') ||
isLocationTrashActive(router, 'files-trash-spaces-project') ||
isLocationPublicActive(router, 'files-public-files')
)
}
}),
({ highlightedFile, capabilities }) => ({
app: 'space-share-item',
icon: 'group',
Expand Down
2 changes: 1 addition & 1 deletion packages/web-app-files/src/helpers/resource/filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const filterResources = (resources: unknown[], term: string, limit?: numb
includeScore: true,
useExtendedSearch: true,
threshold: 0.3,
keys: ['name', 'type', 'icon', 'extension', 'tags']
keys: ['name', 'type', 'icon', 'extension']
})

return (engine.search(term, { limit }) as any[]).map((result: any) => result.item)
Expand Down
Loading

0 comments on commit 3a9fdb6

Please sign in to comment.