-
Notifications
You must be signed in to change notification settings - Fork 159
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
migrating resourceTiles to web-pkg #10330
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
@JammingBen Could you please check this part of test? I can't seem to figure out how to fix this.
|
@@ -11,7 +11,7 @@ import { | |||
useStore | |||
} from '@ownclouders/web-pkg' | |||
import { determineSortFields as determineResourceTableSortFields } from '@ownclouders/web-pkg' | |||
import { determineSortFields as determineResourceTilesSortFields } from '../../helpers/ui/resourceTiles' | |||
import { determineSortFields as determineResourceTilesSortFields } from '@ownclouders/web-pkg/src/helpers/ui/resourceTiles' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When importing from web-pkg
from any other package than web-pkg
itself, please use @ownclouders/web-pkg
.
import { determineSortFields as determineResourceTilesSortFields } from '@ownclouders/web-pkg/src/helpers/ui/resourceTiles' | |
import { determineSortFields as determineResourceTilesSortFields } from '@ownclouders/web-pkg' |
For this to work you need to export determineSortFields
in web-pkg
via the index file in packages/web-pkg/src/helpers/ui/index.ts
. Since you will get a naming conflict then (because there's 2 exported methods named determineSortFields
), I'd suggesting renaming the actual functions to determineResourceTableSortFields
and determineResourceTilesSortFields
.
@@ -206,7 +206,7 @@ import ListInfo from '../../components/FilesList/ListInfo.vue' | |||
import NotFoundMessage from '../../components/FilesList/NotFoundMessage.vue' | |||
import QuickActions from '../../components/FilesList/QuickActions.vue' | |||
import ResourceDetails from '../../components/FilesList/ResourceDetails.vue' | |||
import ResourceTiles from '../../components/FilesList/ResourceTiles.vue' | |||
import ResourceTiles from '@ownclouders/web-pkg/src/components/FilesList/ResourceTiles.vue' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import ResourceTiles from '@ownclouders/web-pkg/src/components/FilesList/ResourceTiles.vue' | |
import { ResourceTiles } from '@ownclouders/web-pkg' |
You need to export ResourceTiles
properly in web-pkg
as well here.
@@ -206,14 +206,14 @@ import { | |||
SpaceResource | |||
} from '@ownclouders/web-client/src/helpers' | |||
import FilesViewWrapper from '../../components/FilesViewWrapper.vue' | |||
import ResourceTiles from '../../components/FilesList/ResourceTiles.vue' | |||
import ResourceTiles from '@ownclouders/web-pkg/src/components/FilesList/ResourceTiles.vue' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import ResourceTiles from '@ownclouders/web-pkg/src/components/FilesList/ResourceTiles.vue' | |
import { ResourceTiles } from '@ownclouders/web-pkg' |
import { ResourceTable } from '@ownclouders/web-pkg' | ||
import { eventBus } from '@ownclouders/web-pkg' | ||
import { SideBarEventTopics, useSideBar } from '@ownclouders/web-pkg' | ||
import { WebDAV } from '@ownclouders/web-client/src/webdav' | ||
import { useScrollTo } from '@ownclouders/web-pkg' | ||
import { useSelectedResources } from '@ownclouders/web-pkg' | ||
import { sortFields as availableSortFields } from '../../helpers/ui/resourceTiles' | ||
import { sortFields as availableSortFields } from '@ownclouders/web-pkg/src/helpers/ui/resourceTiles' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, please use ownclouders/web-pkg
as import and make the sort fields available in web-pkg
via exports.
# Conflicts: # packages/web-app-files/src/composables/resourcesViewDefaults/useResourcesViewDefaults.ts # packages/web-pkg/src/components/FilesList/ResourceTiles.vue # packages/web-pkg/tests/unit/components/FilesList/ResourceTiles.spec.ts
@JammingBen packages/web-pkg/tests/unit/components/FilesList/ResourceTable.spec.ts test is still failing, I have no idea why |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 👍
Quality Gate failedFailed conditions 47.74% Condition Coverage on New Code (required ≥ 50%) |
Description
Moving ResourceTiles from web-app-files to web-pkg
Related Issue
Types of changes