Skip to content

[ENG-7876] Feature/file picker select root #2556

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

Conversation

bp-cos
Copy link
Contributor

@bp-cos bp-cos commented May 2, 2025

Purpose

Add a new flow to the google drive using the google file picker

Summary of Changes

Add a new component to handle the GFP
Updated the existing code to display the correct components when needed

Screenshot(s)

N/A

Side Effects

Uncertain and could be interesting on how it reacts to other add-ons

QA Notes

Still in the draft phase

@bp-cos bp-cos requested review from adlius and brianjgeiger May 2, 2025 17:52
@bp-cos bp-cos changed the base branch from develop to feature/pbs-25-09 May 2, 2025 17:53
Copy link
Contributor

@adlius adlius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can tidy this up a bit by wrapping most of the stuff in template script tabs int o the Ember component.js file. One you load the https://apis.google.com/js/api.js script via the script tag, you have access to window.gapi and google globally. That means you can do google.picker.DocsView(google.picker.ViewId.FOLDERS) in ember component.ts file and it would work. We can move all the scrip tag logic to component.ts file this way.

@bp-cos bp-cos changed the base branch from feature/pbs-25-09 to feature/pbs-25-10 May 20, 2025 19:14
@bp-cos bp-cos requested a review from futa-ikeda May 20, 2025 19:14
Copy link
Contributor

@futa-ikeda futa-ikeda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Only some super minor stuff for me, but it doesn't impact actual functionality, so totally fine if you forego those suggestions. Clever way to get all of the parts working together as well

@bp-cos bp-cos changed the title [DRAFT] Feature/file picker select root Feature/file picker select root May 28, 2025
Copy link
Contributor

@adlius adlius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small request.

Comment on lines 35 to 38
@belongsTo('external-storage-service')
externalStorageService!: AsyncBelongsTo<ExternalStorageServiceModel> & ExternalStorageServiceModel;


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not add this to the base model. We should put it back on the AuthorizedStorageAccount model.

@brianjgeiger brianjgeiger changed the title Feature/file picker select root [ENG-7924] Feature/file picker select root May 29, 2025
@brianjgeiger brianjgeiger changed the title [ENG-7924] Feature/file picker select root [ENG-7876] Feature/file picker select root May 29, 2025
@@ -1,4 +1,4 @@
import Model, { attr } from '@ember-data/model';
import Model, { attr} from '@ember-data/model';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import Model, { attr} from '@ember-data/model';
import Model, { attr } from '@ember-data/model';

@adlius adlius merged commit 73ab56c into CenterForOpenScience:feature/pbs-25-10 May 29, 2025
9 checks passed
adlius added a commit that referenced this pull request Jun 13, 2025
* fix: use compact IRIs to match the api

(yet todo: json-ld parsing that would handle either)

* fix: IRIs represented as {"@id": "..."}

* (partly) fix types

* [ENG-7876] Feature/file picker select root (#2556)

* Added the files

* Removed tokens

* Updates to display the selected root folder

* Added GFP to the files page

* Updates to add the root folder

* Added the manager to reload the wb once a new file or folder is selected

* Enabled the disabled button featuree again

* Fixed a test

* Updates to the flow for a token from the BE

* Added the final touches and removed pruned instructions

* Updates for the PR

* Updates to move all the google file picker code into the component

* Cleaned up comments and models

* Update for PR request

* do not send initiate_oauth after oauth flow is successful

* fix

* Removed a call to a function

* Added functionality so the GD menu item and select folder are not enabled until oauth token is loaded (#2571)

* Removed a call to a function

* Updates to disable the menu and select folder button until the token is loaded

* remove unnecessary group embed

* Fixed a css issue (#2577)

---------

Co-authored-by: abram axel booth <boothaa@gmail.com>
Co-authored-by: abram axel booth <aaxelb@users.noreply.github.com>
Co-authored-by: Lord Business <113387478+bp-cos@users.noreply.github.com>
Co-authored-by: Brian Pilati <brianpilati@cos.io>
Co-authored-by: John Tordoff <Johnetordoff@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants