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

fix: Moved expires_in field after scope in OAuth2 DatasourceForm #31059 #31863

Conversation

theAravinthM
Copy link

@theAravinthM theAravinthM commented Mar 18, 2024

Moved the expires_in field after scope field while configuring OAuth2 datasource - for better user experience

PR for the issue: #31059

Description

While configuring the OAuth2 Datasource, when the Grant_type field is selected as Authorization Code, the authorization_expires_in is placed right after the scope field.
This is to help users find all the related fields at one place. This improves User Experience.

  • fixes #31059
  • Number of files modified: 1
  • Name of the file modified: appsmith/app/client/src/pages/Editor/DataSourceEditor/RestAPIDatasourceForm.tsx

The image representing the change: the issue

Automation

/ok-to-test tags="@tag.All"

🔍 Cypress test results

Caution

If you modify the content in this section, you are likely to disrupt the CI result for your PR.

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features
    • Enhanced OAuth2 authorization code flow in the DataSource Editor by introducing specific rendering improvements for a more intuitive user experience.

…guring oauth2 datasource

Updated RestAPIDatasourceForm.tsx
Copy link

welcome bot commented Mar 18, 2024

Welcome to the Appsmith community! Thank you for your first pull request and making this project better. 🤗 Please make sure that you raise a review request so your code change does not go unnoticed.

Copy link
Contributor

coderabbitai bot commented Mar 18, 2024

Walkthrough

Walkthrough

The update involves refining the OAuth2 authorization code flow within a specific application's datasource configuration UI. A new method, renderOauth2CommonForAuthorizationCode, has been introduced to specifically handle the rendering of form inputs pertinent to the OAuth2 authorization code flow. This adjustment segregates common OAuth2 settings from those exclusive to the authorization code flow, enhancing the organization and user experience. Furthermore, the position of the expires_in field has been adjusted to follow immediately after the scope field, aligning with the objective to make authentication fields more discoverable and logically grouped for the end-users.

Changes

File Change Summary
.../DataSourceEditor/RestAPIDatasourceForm.tsx Introduced renderOauth2CommonForAuthorizationCode for specific OAuth2 authorization code flow rendering. Moved related form inputs from renderOauth2Common and adjusted logic in renderOauth2AuthorizationCode.

Assessment against linked issues

Objective Addressed Explanation
Move expires_in field after scope while configuring OAuth2 datasource (#31059)

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected.

@github-actions github-actions bot added the Stale label Mar 25, 2024
@sneha122 sneha122 added the ok-to-test Required label for CI label Apr 1, 2024
@sneha122
Copy link
Contributor

sneha122 commented Apr 1, 2024

/build-deploy-preview skip-tests=true

Copy link

github-actions bot commented Apr 1, 2024

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/8504946084.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 31863.
recreate: .

@sneha122 sneha122 added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels Apr 1, 2024
Copy link

github-actions bot commented Apr 1, 2024

Deploy-Preview-URL: https://ce-31863.dp.appsmith.com

@sneha122
Copy link
Contributor

sneha122 commented Apr 1, 2024

@theAravinthM Hi I tested the PR using this link https://ce-31863.dp.appsmith.com/ I don't see the expires_in field at all even when I select Authorization code as grant type. Please check

@AmanAgarwal041 AmanAgarwal041 added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels Apr 1, 2024
@theAravinthM
Copy link
Author

@sneha122 Hi ! That was by mistake, since I could not test my code like the link that you provided. I have modified a little chunk of my code from the previous commits.
Thanks for the review and now I hope my code would fit in!

@sneha122
Copy link
Contributor

sneha122 commented Apr 1, 2024

Hi @theAravinthM

On client side as well there is a linting failure in file src/pages/Editor/DataSourceEditor/RestAPIDatasourceForm.tsx, can you please format this file using prettier formatter?

These should fix all of your linting errors and we can merge the PR as quickly as we can

@AmanAgarwal041 AmanAgarwal041 removed the ok-to-test Required label for CI label Apr 1, 2024
@AmanAgarwal041 AmanAgarwal041 added the ok-to-test Required label for CI label Apr 1, 2024
@theAravinthM
Copy link
Author

Hi @sneha122

Thanks for the review! I have formatted the code with Prettier code formatter.

@sneha122 sneha122 added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels Apr 1, 2024
@sneha122
Copy link
Contributor

sneha122 commented Apr 1, 2024

/build-deploy-preview skip-tests=true

Copy link

github-actions bot commented Apr 1, 2024

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/8510071936.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 31863.
recreate: .

Copy link

github-actions bot commented Apr 1, 2024

Deploy-Preview-URL: https://ce-31863.dp.appsmith.com

@github-actions github-actions bot removed the Stale label Apr 1, 2024
@sneha122 sneha122 added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels Apr 2, 2024
@theAravinthM
Copy link
Author

Hi @sneha122
Happy that many tests have been passed on this PR and there is one more test named perform-test / ci-test-result is in the Waiting status. I went through several online blogs which asks to make a blank commit. Just asking if I need to do that.
Thanks!

@sneha122
Copy link
Contributor

sneha122 commented Apr 4, 2024

Hi @theAravinthM Thanks for checking back, but there is some issue in running automated tests on this PR, let me investigate this and get back to you

@sneha122
Copy link
Contributor

sneha122 commented Apr 8, 2024

Hi @theAravinthM The original repo of appsmith is a little ahead of your forked repo, hence I would request you to kindly sync the forked repo and then merge latest release into the branch, with this we can further proceed ahead with the PR.

@theAravinthM
Copy link
Author

Hi @sneha122
Thanks for checking back & for the guidance. I have synced the forked repo now. I think its good to go and let me know if anything else need to be done.

@sneha122
Copy link
Contributor

sneha122 commented Apr 8, 2024

@theAravinthM Can you please pull latest release branch in your forked repo and merge it into this branch?

@sneha122
Copy link
Contributor

sneha122 commented Apr 8, 2024

Screenshot 2024-04-08 at 2 10 54 PM It looks like sync has not been successful, I still see forked repo behind the original one, please sync it first and then merge latest release into it, Thanks!

@theAravinthM
Copy link
Author

Oh my bad! I just mistakenly synced the release branch of my forked repo before.
Now I have synced this branch. Sorry for the inconvenience caused! Thanks!

@sneha122 sneha122 added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels Apr 8, 2024
Copy link

This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected.

@github-actions github-actions bot added the Stale label Apr 15, 2024
@theAravinthM
Copy link
Author

Hi @sneha122 I am really unsure why that perform-test / ci-test-result test is still in the waiting status. Is there a way that could be resolved? Thanks!

@github-actions github-actions bot removed the Stale label Apr 19, 2024
Copy link

This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected.

@github-actions github-actions bot added the Stale label Apr 27, 2024
Copy link

This PR has been closed because of inactivity.

@github-actions github-actions bot closed this May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-test Required label for CI Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants