-
Notifications
You must be signed in to change notification settings - Fork 3
Public Folders #236
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
base: master
Are you sure you want to change the base?
Public Folders #236
Conversation
831acf4 to
3c5197a
Compare
|
Release e686295 deployed at https://bcbox-dev-pr-236.apps.silver.devops.gov.bc.ca |
| // @ts-ignore: bucketId will always be provided | ||
| const currBucketPath = getBucketPath(bucketStore.getBucket(props.bucketId)); | ||
| const parentPath = currBucketPath.substring(0, currBucketPath.lastIndexOf('/')); | ||
| const parentBucket = bucketStore.getBucketByFullPath(parentPath); |
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.
i think using the store is ok for now..
but i think it requires that the user has visited the 'my files' page already to load any parent folders into the store.
| <InputSwitch | ||
| v-model="isPublic" | ||
| aria-label="Toggle to make public" | ||
| :disabled="!isToggleEnabled" |
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.
maybe not a requirement now.. but at some point would be good to add a tooltip indicating why it's disabled.
| export { default as ObjectUploadBasic } from './ObjectUploadBasic.vue'; | ||
| export { default as ObjectUploadFile } from './ObjectUploadFile.vue'; | ||
| export { default as ObjectVersion } from './ObjectVersion.vue'; | ||
| export { default as PublicObjectList } from './PublicObjectList.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.
dont forget to remove files PublicObjectList.vue PublicObjectTable.vue
if youre not using them
| aria-label="Toggle to make public" | ||
| :disabled=" | ||
| !( | ||
| !bucketPublic && |
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.
my 2cts: i dont see why we wouldnt just hide the toggle if not authenticated, people wont be expecting it.
rather than passing bucketPublic down through a lot of props.
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.
I think my train of thought is that bucket.public is already being passed down through multiple components/layers deep (all the way from <ListObjectsView> at the top), since each of the intermediate components need that boolean for themselves as well. Like, save on API calls by making just one to figure out of a bucket is public.
That being said, it does seem a bit odd to have both COMS API calls and depending on props side by side 🤔
| order: lazyParams.value.sortOrder === 1 ? 'asc' : 'desc', | ||
| tagset: lazyParams.value?.filters?.tags.value | ||
| public: !getIsAuthenticated.value ? true : undefined, | ||
| tagset: getIsAuthenticated.value ? lazyParams.value?.filters?.tags.value : undefined |
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.
the kind of fine-grained code changes i wanted to avoid by having an alternate view
| component: () => import('@/views/list/ListDeletedObjectsView.vue'), | ||
| meta: { requiresAuth: true, breadcrumb: '__listDeletedObjectsDynamic', title: 'My Deleted Objects' }, | ||
| props: createProps | ||
| }, |
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.
guess we dont need this anymore
| // } | ||
| // } | ||
|
|
||
| async function fetchBucket(bucketId: string) { |
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.
do we need this? i think youre using bucket search endpoint
| } | ||
| } | ||
|
|
||
| // /** |
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.
do we need this?
| @@ -0,0 +1,67 @@ | |||
| <script setup lang="ts"> | |||
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.
dont thin we need this file
Description
MVP implementation of public folders that can be accessed without login:
The following items have been skipped over for now:
SHOWCASE-3959
SHOWCASE-3960
Types of changes
New feature (non-breaking change which adds functionality)
Checklist
Further comments