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

[full-ci] Remove the upload progress bar and its related states #6825

Merged
merged 6 commits into from
May 4, 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Enhancement: Remove the upload progress component

We've removed the upload progress component because the implementation of Uppy made it obsolete.

https://github.com/owncloud/web/pull/6825
https://github.com/owncloud/web/issues/6819
4 changes: 0 additions & 4 deletions packages/web-app-files/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,4 @@ main {
grid-area: main;
z-index: 0;
}

#files-upload-progress {
grid-area: upload;
}
</style>
50 changes: 0 additions & 50 deletions packages/web-app-files/src/components/Upload/DetailsWidget.vue

This file was deleted.

177 changes: 0 additions & 177 deletions packages/web-app-files/src/components/Upload/ProgressBar.vue

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { ref, nextTick, onMounted, Ref, watch } from '@vue/composition-api'
import { useStore } from 'web-pkg/src/composables/store'
import { ref, nextTick, onMounted, Ref } from '@vue/composition-api'

export const useFileListHeaderPosition = (): { y: Ref; refresh: () => void } => {
const store = useStore()
const y = ref(0)
const refresh = async (): Promise<void> => {
await nextTick()
Expand All @@ -18,7 +16,6 @@ export const useFileListHeaderPosition = (): { y: Ref; refresh: () => void } =>

window.onresize = refresh
onMounted(refresh)
watch(() => store.getters['Files/inProgress'].length > 0, refresh)
JammingBen marked this conversation as resolved.
Show resolved Hide resolved

return { y, refresh }
}
3 changes: 0 additions & 3 deletions packages/web-app-files/src/store/getters.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import { ShareTypes } from '../helpers/share'

export default {
inProgress: (state) => {
return state.inProgress
},
selectedFiles: (state, getters) => {
return getters.filesAll.filter((f) => state.selectedIds.includes(f.id))
},
Expand Down
2 changes: 0 additions & 2 deletions packages/web-app-files/src/store/state.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ export default {
files: [],
filesSearched: null,
selectedIds: [],
inProgress: [],
shareOpen: null,
versions: [],

/**
Expand Down
7 changes: 0 additions & 7 deletions packages/web-app-files/src/views/Personal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
</app-bar>
<app-loading-spinner v-if="loadResourcesTask.isRunning" />
<template v-else>
<progress-bar v-show="$_uploadProgressVisible" id="files-upload-progress" class="oc-p-s" />
<not-found-message v-if="folderNotFound" class="files-not-found oc-height-1-1" />
<no-content-message
v-else-if="isEmpty"
Expand Down Expand Up @@ -88,7 +87,6 @@ import { bus } from 'web-pkg/src/instance'
import { breadcrumbsFromPath, concatBreadcrumbs } from '../helpers/breadcrumbs'

import AppBar from '../components/AppBar/AppBar.vue'
import ProgressBar from '../components/Upload/ProgressBar.vue'
import CreateAndUpload from '../components/AppBar/CreateAndUpload.vue'
import ResourceTable from '../components/FilesList/ResourceTable.vue'
import QuickActions from '../components/FilesList/QuickActions.vue'
Expand All @@ -112,7 +110,6 @@ const visibilityObserver = new VisibilityObserver()
export default defineComponent({
components: {
AppBar,
ProgressBar,
CreateAndUpload,
ResourceTable,
QuickActions,
Expand Down Expand Up @@ -146,15 +143,11 @@ export default defineComponent({
...mapGetters('Files', [
'highlightedFile',
'currentFolder',
'inProgress',
'totalFilesCount',
'totalFilesSize'
]),
...mapGetters(['user', 'homeFolder', 'configuration']),

$_uploadProgressVisible() {
return this.inProgress.length > 0
},
isEmpty() {
return this.paginatedResources.length < 1
},
Expand Down
8 changes: 0 additions & 8 deletions packages/web-app-files/src/views/PublicFiles.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
</app-bar>
<app-loading-spinner v-if="loadResourcesTask.isRunning" />
<template v-else>
<progress-bar v-show="$_uploadProgressVisible" id="files-upload-progress" class="oc-p-s" />
<not-found-message v-if="folderNotFound" class="files-not-found oc-height-1-1" />
<no-content-message
v-else-if="isEmpty"
Expand Down Expand Up @@ -79,7 +78,6 @@ import { bus } from 'web-pkg/src/instance'
import AppLoadingSpinner from 'web-pkg/src/components/AppLoadingSpinner.vue'
import NoContentMessage from 'web-pkg/src/components/NoContentMessage.vue'
import AppBar from '../components/AppBar/AppBar.vue'
import ProgressBar from '../components/Upload/ProgressBar.vue'
import CreateAndUpload from '../components/AppBar/CreateAndUpload.vue'
import NotFoundMessage from '../components/FilesList/NotFoundMessage.vue'
import ListInfo from '../components/FilesList/ListInfo.vue'
Expand All @@ -95,7 +93,6 @@ const visibilityObserver = new VisibilityObserver()
export default defineComponent({
components: {
AppBar,
ProgressBar,
CreateAndUpload,
ResourceTable,
ListInfo,
Expand All @@ -119,17 +116,12 @@ export default defineComponent({
'publicLinkPassword',
'currentFolder',
'highlightedFile',
'inProgress',
'totalFilesCount',
'totalFilesSize'
]),
...mapGetters(['configuration']),
...mapState('Files/sidebar', { sidebarClosed: 'closed' }),

$_uploadProgressVisible() {
return this.inProgress.length > 0
},

breadcrumbs() {
const breadcrumbs = breadcrumbsFromPath(this.$route.path, this.$route.params.item)
const rootRoute = breadcrumbs.shift()
Expand Down
Loading