PromucFlow_constructor/app/client
sneha122 0f838535c3
feat: file picker added and access token generation (#20778)
## Description

This PR includes following changes:

- In case of limiting google sheet access project, when user selects specific sheets as an option, they should be shown file picker UI once the authorisation is complete, In this file picker UI, users can select the google sheet files that they want to use with appsmith application and allow access to only those files.
- This PR contains the changes for file picker UI and updating datasource auth state based on the files selected by user.


TL;DR
Steps to test this PR:

- Create Google Sheet datasource
- In the datasource config form, select specific sheets as an option from the scope dropdown.
- Click on save and authorise
- This will take you to google oauth process

<img width="467" alt="Screenshot 2023-02-20 at 1 24 24 PM" src="https://user-images.githubusercontent.com/30018882/220045493-57b0ca6c-3f08-4963-af55-d603cf79bc43.png">

- Select the google account
- This will take you to google oauth2 consent screen

<img width="451" alt="Screenshot 2023-02-20 at 1 24 55 PM" src="https://user-images.githubusercontent.com/30018882/220045641-9f70dd29-6664-489a-b77b-df65445491df.png">

- Click on allow for all requested permissions
- This will take you back to appsmith's datasource config page in view mode and load the file picker UI
<img width="425" alt="Screenshot 2023-02-20 at 1 25 47 PM" src="https://user-images.githubusercontent.com/30018882/220045828-8b3e3e46-4ddc-4e30-b2f8-f12865395817.png">
- Select the files that you want to share with appsmith app
- Click on select
- You should see the new query button in enabled state, as datasource authorisation is complete

<img width="800" alt="Screenshot 2023-02-20 at 1 27 28 PM" src="https://user-images.githubusercontent.com/30018882/220046131-6ce99a85-cddc-4529-ae45-f9833aefd71b.png">

- In case you select cancel on google oauth2 consent screen, you should error message on datasource config page with new query button being disabled

<img width="810" alt="Screenshot 2023-02-20 at 1 28 49 PM" src="https://user-images.githubusercontent.com/30018882/220046385-6b8d636c-b517-44c3-a596-b52bc0084b94.png">

- In case you do give all the permissions but do not select any files in google file picker, then also you should see error message on datasource config page with new query button disabled.

Fixes #20163, #20290, #20160, #20162


Media
> A video or a GIF is preferred. when using Loom, don’t embed because it looks like it’s a GIF. instead, just link to the video


## Type of change

> Please delete options that are not relevant.

- New feature (non-breaking change which adds functionality)


## How Has This Been Tested?

- Manual

### Test Plan
> Add Testsmith test cases links that relate to this PR

### Issues raised during DP testing
> Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR)


## Checklist:
### Dev activity
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [x] PR is being merged under a feature flag


### QA activity:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or manual QA
- [ ] Organized project review call with relevant stakeholders after Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test

Co-authored-by: “sneha122” <“sneha@appsmith.com”>
2023-03-08 10:55:17 +05:30
..
cypress feat: file picker added and access token generation (#20778) 2023-03-08 10:55:17 +05:30
docker fix: Fix container-internal communication when using IPv6 (#20981) 2023-02-27 19:51:54 +05:30
generators feat: Auto height instant update (#19082) 2023-02-03 11:17:40 +05:30
packages fix: Not able to merge latest release (#21162) 2023-03-06 06:07:05 +01:00
patches
perf ci: run fat container docker inside perf tests and update setup-perf-test workflow to use localhost for accessing dev environment (#20280) 2023-02-07 15:56:41 +05:30
public feat: file picker added and access token generation (#20778) 2023-03-08 10:55:17 +05:30
src feat: file picker added and access token generation (#20778) 2023-03-08 10:55:17 +05:30
test feat: Auto layout appsmith editor and mobile responsiveness (#21151) 2023-03-04 12:55:54 +05:30
typings feat: peek overlay (#20053) 2023-02-17 21:33:34 +05:30
.babelrc chore: Yarn workspaces + Storybook + WDS (#20776) 2023-03-03 12:17:35 +05:30
.dockerignore
.editorconfig
.eslintrc.json chore: Yarn workspaces + Storybook + WDS (#20776) 2023-03-03 12:17:35 +05:30
.flowconfig
.gitignore chore: Yarn workspaces + Storybook + WDS (#20776) 2023-03-03 12:17:35 +05:30
.huskyrc
.lintstagedrc
.nvmrc
.prettierignore
.prettierrc
.sentryclirc
build.sh chore: Yarn workspaces + Storybook + WDS (#20776) 2023-03-03 12:17:35 +05:30
craco.build.config.js
craco.common.config.js chore: Yarn workspaces + Storybook + WDS (#20776) 2023-03-03 12:17:35 +05:30
craco.dev.config.js chore: updated dependencies removed unused dependencies. (#19441) 2023-01-06 19:12:03 +05:30
cypress_ci.json test: Cypress Flaky fixes + Mock api update + PgAdminspec fix (#20032) 2023-02-02 13:29:24 +05:30
cypress.env.json feat: [Context Switching] Complex widgets and other Phase 2 items (#17046) 2022-12-08 12:51:58 +05:30
cypress.json test: Cypress Flaky fixes + Mock api update + PgAdminspec fix (#20032) 2023-02-02 13:29:24 +05:30
Dockerfile
index.tsx
jest.config.js fix: Remove extra event and old disable var (#20624) 2023-02-15 19:16:04 +05:30
package.json fix: UI inconsistency in log tab (#21037) 2023-03-03 18:14:41 +05:30
postcss.config.js
README.md
README.old.md
start-https.sh fix: Fix container-internal communication when using IPv6 (#20981) 2023-02-27 19:51:54 +05:30
stats.json
tailwind.config.js
tsconfig.json chore: Yarn workspaces + Storybook + WDS (#20776) 2023-03-03 12:17:35 +05:30
tsconfig.path.json
vercel.json
yarn.lock fix: UI inconsistency in log tab (#21037) 2023-03-03 18:14:41 +05:30

Appsmith Client

This project was bootstrapped with Create React App.

For details on setting up your development machine, please refer to the Setup Guide