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

GoogleDrive: reenable shared drive checkboxes + remove team drive checkboxes #5254

Closed
wants to merge 1 commit into from
Closed
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
18 changes: 0 additions & 18 deletions packages/@uppy/google-drive/src/DriveProviderViews.ts

This file was deleted.

3 changes: 1 addition & 2 deletions packages/@uppy/google-drive/src/GoogleDrive.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { h, type ComponentChild } from 'preact'

import type { UppyFile, Body, Meta } from '@uppy/utils/lib/UppyFile'
import type { UnknownProviderPluginState } from '@uppy/core/lib/Uppy'
import DriveProviderViews from './DriveProviderViews.ts'
import locale from './locale.ts'
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore We don't want TS to generate types for the package.json
Expand Down Expand Up @@ -102,7 +101,7 @@ export default class GoogleDrive<
}

install(): void {
this.view = new DriveProviderViews(this, {
this.view = new ProviderViews(this, {
provider: this.provider,
loadAllFiles: true,
})
Expand Down
6 changes: 3 additions & 3 deletions packages/@uppy/provider-views/src/Browser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ import SearchFilterInput from './SearchFilterInput.tsx'
import FooterActions from './FooterActions.tsx'
import Item from './Item/index.tsx'

const VIRTUAL_SHARED_DIR = 'shared-with-me'

type ListItemProps<M extends Meta, B extends Body> = {
currentSelection: any[]
uppyFiles: UppyFile<M, B>[]
Expand Down Expand Up @@ -60,7 +58,9 @@ function ListItem<M extends Meta, B extends Body>(props: ListItemProps<M, B>) {
type: 'folder',
// TODO: when was this supposed to be true?
isDisabled: false,
isCheckboxDisabled: f.id === VIRTUAL_SHARED_DIR,
// Disable checkboxes for GoogleDrive's team drives
// (github.com/transloadit/uppy/issues/5232)
isCheckboxDisabled: !!f.custom?.isSharedDrive,
// getNextFolder always exists when f.isFolder is true
handleFolderClick: () => getNextFolder!(f),
})
Expand Down