-
Notifications
You must be signed in to change notification settings - Fork 59
[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
[ENG-7876] Feature/file picker select root #2556
Conversation
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 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.
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.
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
lib/osf-components/addon/components/addons-service/configured-addon-edit/component.ts
Outdated
Show resolved
Hide resolved
lib/osf-components/addon/components/addons-service/configured-addon-edit/component.ts
Show resolved
Hide resolved
lib/osf-components/addon/components/google-file-picker-widget/component.ts
Outdated
Show resolved
Hide resolved
lib/osf-components/addon/components/google-file-picker-widget/component.ts
Outdated
Show resolved
Hide resolved
lib/osf-components/addon/components/google-file-picker-widget/component.ts
Outdated
Show resolved
Hide resolved
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.
One small request.
app/models/authorized-account.ts
Outdated
@belongsTo('external-storage-service') | ||
externalStorageService!: AsyncBelongsTo<ExternalStorageServiceModel> & ExternalStorageServiceModel; | ||
|
||
|
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.
Let's not add this to the base model. We should put it back on the AuthorizedStorageAccount
model.
@@ -1,4 +1,4 @@ | |||
import Model, { attr } from '@ember-data/model'; | |||
import Model, { attr} from '@ember-data/model'; |
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 Model, { attr} from '@ember-data/model'; | |
import Model, { attr } from '@ember-data/model'; |
73ab56c
into
CenterForOpenScience:feature/pbs-25-10
* 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>
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