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] Resource ids in urls #7725

Merged
merged 68 commits into from
Oct 10, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
de1ef26
feat: add options type to configurationManager
kulmann Sep 30, 2022
554f73c
feat: whitelist fileId query param
kulmann Sep 30, 2022
dda20fe
refactor: move disabled prop from Resource to SpaceResource
kulmann Sep 30, 2022
ffdbfa7
feat: add util for route options with fileId
kulmann Sep 30, 2022
817b23b
feat: add fileId to url query in DriveRedirect
kulmann Sep 30, 2022
40363db
feat: add fileId to url query in Projects overview
kulmann Sep 30, 2022
2fd8218
feat: resolve spaces by their ids
kulmann Sep 30, 2022
6413ad5
feat: build folder links with file ids
kulmann Sep 30, 2022
d002ee0
feat: add space id to space trash navigate
kulmann Oct 4, 2022
e16805d
feat: add space id to navigate back to space (from e.g. trash)
kulmann Oct 4, 2022
86a995c
feat: add file id to Open folder action
kulmann Oct 4, 2022
48bb088
feat: add fileId to search preview component
kulmann Oct 4, 2022
2517a09
feat: add fileId to editor route queries
kulmann Oct 4, 2022
128791f
fix: wrong set of params from editor create mode
kulmann Oct 4, 2022
9be4b2c
feat: add file id to route after deleting current folder
kulmann Oct 4, 2022
fc9012d
feat: add fileId to not found message component
kulmann Oct 4, 2022
ec50e09
feat: add fileId to share root nav in details panel
kulmann Oct 4, 2022
bd81bb2
feat: add fileId to via link in sidebar sharing panel
kulmann Oct 4, 2022
bc6b56e
feat: add fileId to sidebar links panel
kulmann Oct 4, 2022
951dcf0
fix: use fileId instead of id when calling editor handler
kulmann Oct 4, 2022
e98fe19
refactor: simplify creating route to parent folder when deleting
kulmann Oct 4, 2022
1d8b0c7
feat: use fileId when renaming current folder
kulmann Oct 4, 2022
780e86e
Add itemId to useDriveResolver composable
JammingBen Oct 5, 2022
9a95bd2
Return itemId as Ref<string> from useDriveResolver composable
dschmidt Oct 5, 2022
e9995c7
Add id resolving to upload logic
JammingBen Oct 5, 2022
c1c86e4
feat: use meta request to resolve correct path by file id
kulmann Oct 5, 2022
21163bc
Add fileId to url when advancing to previous/next file in preview app
dschmidt Oct 5, 2022
37d0334
Fix parent folder fileId in upload modal
JammingBen Oct 5, 2022
a17644e
Add parentFolderId to the built resource objects
JammingBen Oct 6, 2022
e31369e
refactor: merge space related folder loaders into one
kulmann Oct 6, 2022
b69854a
refactor: rename shareIndicators option to loadShares
kulmann Oct 6, 2022
c3c710b
WIP: add reproducer for weird 'ReferenceError: Cannot access 'createL…
dschmidt Oct 6, 2022
a8d4edb
Implement validateRoute helper
dschmidt Oct 6, 2022
6b000cc
tests: fix deleted files unit test
kulmann Oct 6, 2022
1105305
tests: fix NotFoundMessage tests
kulmann Oct 6, 2022
2fd7db5
chore: fix linting
kulmann Oct 6, 2022
23ba110
Fix unit tests for CreateAndUpload.spec.js
JammingBen Oct 6, 2022
fd22a03
Fix unit tests for navigate.spec.js
JammingBen Oct 6, 2022
e7f344e
Fix unit tests for UploadInfo.spec.ts
JammingBen Oct 6, 2022
95ed3fe
feat: replace route on wrong path
kulmann Oct 6, 2022
18d3371
feat: introduce file route replacing composable
kulmann Oct 6, 2022
00e88b5
tests: adjust config.json for nightwatch tests
kulmann Oct 6, 2022
3b20558
Enable rename on shared resource
Oct 6, 2022
620b3ea
Remove shareJailId option
Oct 6, 2022
7e9e42f
feat: web-app-draw-io: fix urls based on FileId
dschmidt Oct 6, 2022
51a96b0
feat: web-app-draw-io: fix redirect to another file (e.g. from search)
dschmidt Oct 6, 2022
5662aad
feat: web-app-pdf-viewer: fix urls based on FileId
dschmidt Oct 6, 2022
f8b4461
fix: web-app-text-editor: fix urls based on FileId
dschmidt Oct 6, 2022
e8a657d
feat: web-app-preview: fix urls based on FileId
dschmidt Oct 6, 2022
e643774
Add changelog item
Oct 7, 2022
770c766
Rename useAppNavidation.validateRoute to useAppNavigation.replaceInva…
dschmidt Oct 7, 2022
9fea74c
fixup! Rename useAppNavidation.validateRoute to useAppNavigation.repl…
dschmidt Oct 7, 2022
78ea056
fix: omit fileId in route query copy on breadcrumbs
kulmann Oct 7, 2022
7277158
Fix opening single file public link share opening in apps
dschmidt Oct 7, 2022
d60ef4b
Fix lint
dschmidt Oct 7, 2022
3078c7e
fix: renaming shares via share jail
kulmann Oct 7, 2022
e6ab74c
fixup! fix: renaming shares via share jail
kulmann Oct 7, 2022
9c1a531
fix: share root breadcrumb item
kulmann Oct 7, 2022
e75a4c7
tests: fix unit tests
kulmann Oct 7, 2022
424b1ec
docs: add changelog item and documentation
kulmann Oct 7, 2022
4a2fb73
DRY: move merging of options into a route into a function
dschmidt Oct 7, 2022
43988f1
fix: use fileId for virtual personal space
kulmann Oct 10, 2022
0e5c52d
fix: use basename of shareRoot in search result list
kulmann Oct 10, 2022
bdea9e5
fix: use fileId in driveResolver composable
kulmann Oct 10, 2022
9120532
fix: various file loading oc10 issues
kulmann Oct 10, 2022
c19a25d
test: fix unit test for Preview component
kulmann Oct 10, 2022
6b227df
docs: add issue links to changelog item
kulmann Oct 10, 2022
44bb64e
refactor: simplify code structure in drawio app
kulmann Oct 10, 2022
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: 0 additions & 1 deletion packages/web-client/src/webdav/listFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ export const ListFilesFactory = ({ sdk }: WebDavOptions) => {
)
const resources = webDavResources.map(buildResource)
if (fileId && fileId !== resources[0].fileId) {
console.log('nono', path, fileId, resources[0].fileId)
return listFilesCorrectedPath()
}
return resources
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import { FileContext } from './types'
import { authService } from 'web-runtime/src/services/auth'
import { Route } from 'vue-router'
import { useAppFileHandling } from './useAppFileHandling'
import { DavProperty } from '../../constants'
import { useFileRouteReplace } from '../router/useFileRouteReplace'
import { DavProperty } from '../../constants'

interface AppFolderHandlingOptions {
store: Store<any>
Expand Down Expand Up @@ -51,7 +51,9 @@ export function useAppFolderHandling({
context = unref(context)
const space = unref(context.space)

const pathResource = await getFileInfo(context, { davProperties: [DavProperty.Name] })
const pathResource = await getFileInfo(context, {
davProperties: [DavProperty.FileId]
})
dschmidt marked this conversation as resolved.
Show resolved Hide resolved
replaceInvalidFileRoute({
space,
resource: pathResource,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { useSpacesLoading } from './useSpacesLoading'
import { queryItemAsString } from '../appDefaults'
import { configurationManager } from '../../configuration'
import { urlJoin } from 'web-pkg/src/utils'
import { useCapabilitySpacesEnabled } from '../capability'

interface DriveResolverOptions {
store?: Store<any>
Expand All @@ -23,6 +24,7 @@ export const useDriveResolver = (options: DriveResolverOptions = {}) => {
const fileId = computed(() => {
return queryItemAsString(unref(fileIdQueryItem))
})
const hasSpaces = useCapabilitySpacesEnabled(store)

const { graphClient } = useGraphClient({ store })
const spaces = computed<SpaceResource[]>(() => store.getters['runtime/spaces/spaces'])
Expand Down Expand Up @@ -63,7 +65,7 @@ export const useDriveResolver = (options: DriveResolverOptions = {}) => {
})
path = item.join('/')
} else {
if (unref(fileId)) {
if (unref(hasSpaces) && unref(fileId)) {
matchingSpace = unref(spaces).find((s) => {
return unref(fileId).startsWith(`${s.fileId}`)
})
Expand Down
11 changes: 8 additions & 3 deletions packages/web-runtime/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import {
Resource
} from 'web-client/src/helpers'
import { WebDAV } from 'web-client/src/webdav'
import { DavProperty } from 'web-pkg/src/constants'

export const bootstrap = async (configurationPath: string): Promise<void> => {
const runtimeConfiguration = await announceConfiguration(configurationPath)
Expand Down Expand Up @@ -114,9 +115,13 @@ export const renderSuccess = (): void => {
webDavPath: `/files/${user.id}`,
serverUrl: configurationManager.serverUrl
})
const personalHomeInfo = await (clientService.webdav as WebDAV).getFileInfo(space, {
path: ''
})
const personalHomeInfo = await (clientService.webdav as WebDAV).getFileInfo(
space,
{
path: ''
},
{ davProperties: [DavProperty.FileId] }
)
space.fileId = personalHomeInfo.fileId
store.commit('runtime/spaces/ADD_SPACES', [space])
store.commit('runtime/spaces/SET_SPACES_INITIALIZED', true)
Expand Down