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

#6269 Auto-configure Google Drive PKCE integrations #6734

Merged
merged 16 commits into from Oct 30, 2023

Conversation

BLoe
Copy link
Collaborator

@BLoe BLoe commented Oct 27, 2023

d## What does this PR do?

Reviewer Tips

  • The vast bulk of the changes are in IntegrationsPage and IntegrationConfigEditorModal

Discussion

  • The paginated table behavior was not working properly, that's why I changed it. The problem is that it's still not working for the auto-configure use-case, only the normal integration config flows.

Remaining work

  • Pull out the auto-configure logic to use in AuthWidget as well

Demo

https://www.loom.com/share/0b3dec922cda447c959099b2a6442e69

Checklist

  • Add tests - 😢 IntegrationsPage could probably use a full test suite but that's a lot of work right now and blows up the scope of this ticket too much
  • New files added to src/tsconfig.strictNullChecks.json (if possible)
  • Designate a primary reviewer - @grahamlangford

*/
initialRecord?: Row | ((x: Row) => boolean);
forceShowRecord?: Row | ((x: Row) => boolean);
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the purpose the change to initialRecord?

It looks like this change (and the change the useEffect dependency) changes the behavior of the prop. Instead defaulting the initial value, it now locks to that record even when the row data changes

We'll need to audit the call-sites to ensure that it's not breaking some intended behavior

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The intended behavior wasn't working to begin with, I was just trying to fix it

Copy link
Collaborator

Choose a reason for hiding this comment

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

@BLoe can you add a feature test for this to the release QA sheet? https://www.notion.so/pixiebrix/Release-1-8-2-676f3ca1795541019e25d79c306b04c9

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure, done


/**
* Set title of the document, restoring the original title when component is unmounted.
*/
export function useTitle(title: string): void {
export function useSetDocumentTitle(title: string, show?: boolean): void {
Copy link
Contributor

Choose a reason for hiding this comment

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

👍 Thanks for renaming the hook

@twschiller
Copy link
Contributor

💅 Thanks for improving the naming!

@codecov
Copy link

codecov bot commented Oct 27, 2023

Codecov Report

Attention: 200 lines in your changes are missing coverage. Please review.

Comparison is base (441d6c8) 70.18% compared to head (49e4750) 70.05%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6734      +/-   ##
==========================================
- Coverage   70.18%   70.05%   -0.13%     
==========================================
  Files        1182     1188       +6     
  Lines       36825    36939     +114     
  Branches     6932     6937       +5     
==========================================
+ Hits        25845    25878      +33     
- Misses      10980    11061      +81     
Files Coverage Δ
src/activation/useActivateRecipeWizard.ts 91.66% <100.00%> (ø)
...alysis/analysisVisitors/varAnalysis/varAnalysis.ts 96.39% <100.00%> (ø)
src/auth/useRequiredPartnerAuth.ts 90.27% <100.00%> (+0.13%) ⬆️
src/background/auth/authStorage.ts 65.21% <ø> (ø)
src/background/auth/codeGrantFlow.ts 9.52% <ø> (ø)
src/background/auth/getToken.ts 87.50% <ø> (ø)
src/background/auth/implicitGrantFlow.ts 9.37% <ø> (ø)
src/background/auth/launchOAuth2Flow.ts 86.20% <ø> (ø)
src/background/installer.ts 55.55% <100.00%> (ø)
src/background/locator.ts 23.80% <100.00%> (ø)
... and 130 more

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@BLoe BLoe requested a review from twschiller October 28, 2023 02:58
@github-actions
Copy link

When the PR is merged, the first loom link found on this PR will be posted to #sprint-demo on Slack. Do not edit this comment manually.

@BLoe BLoe merged commit 953113c into main Oct 30, 2023
20 checks passed
@BLoe BLoe deleted the feature/6269-auto-configure-pkce-integrations branch October 30, 2023 16:34
@grahamlangford grahamlangford added this to the 1.8.2 milestone Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants