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

UI – Updates to confirm invite flow #25583

Merged
merged 13 commits into from
Jan 24, 2025
Merged

UI – Updates to confirm invite flow #25583

merged 13 commits into from
Jan 24, 2025

Conversation

jacobshandling
Copy link
Contributor

@jacobshandling jacobshandling commented Jan 18, 2025

For #24486

  • Check invite validity before rendering form, error if invalid
  • Use data returned from validity check to pre-populate form
  • Remove dependence of flow on URL params other than token
  • Remove other URL params from link generated in invite confirmation email
  • Refactor form from JS to TS
  • Refactor form from class to functional components
  • Cleanup unused logic
  • Improve error handling

Invalid invite
invalid

Valid invite
valid-login-flow

  • Changes file added for user-visible changes in changes/
  • Updated tests
  • A detailed QA plan exists on the associated ticket (if it isn't there, work with the product group's QA engineer to add it)
  • Manual QA for all new/changed functionality

Jacob Shandling added 9 commits January 17, 2025 14:02
- Remove dependence on url params other than token
- Spinner while using token to check server for invite validity
- Use returned data with valid invites
- Refactor JS –> TS
- Refactor class –> functional components
- Clean up
@jacobshandling jacobshandling requested review from a team as code owners January 18, 2025 00:45
@jacobshandling jacobshandling marked this pull request as draft January 18, 2025 02:21
@@ -0,0 +1,38 @@
import { size } from "lodash";
import validateEquality from "components/forms/validators/validate_equality";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This just calls lodash's isEqual. Using here for consistency but perhaps we can retire this function in favor of calling the lodash method directly.

@jacobshandling jacobshandling marked this pull request as ready for review January 20, 2025 20:07
Copy link

codecov bot commented Jan 20, 2025

Codecov Report

Attention: Patch coverage is 93.18182% with 3 lines in your changes missing coverage. Please review.

Project coverage is 63.55%. Comparing base (b0de218) to head (8ceca36).
Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
...ents/forms/ConfirmInviteForm/ConfirmInviteForm.tsx 95.34% 2 Missing ⚠️
frontend/utilities/endpoints.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #25583      +/-   ##
==========================================
- Coverage   63.60%   63.55%   -0.06%     
==========================================
  Files        1624     1621       -3     
  Lines      155419   154818     -601     
  Branches     3967     4023      +56     
==========================================
- Hits        98856    98387     -469     
+ Misses      48761    48670      -91     
+ Partials     7802     7761      -41     
Flag Coverage Δ
frontend 53.14% <93.18%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

sgress454
sgress454 previously approved these changes Jan 22, 2025
Copy link
Contributor

@sgress454 sgress454 left a comment

Choose a reason for hiding this comment

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

Code looks good, tested 👍

One suggestion would be to add a retry function to the useQuery invocation. Right now it sits there spinning and retries four times even when the API response is a 404 -- it'd be better to have it show "invalid form" immediately.

Copy link
Contributor

@ghernandez345 ghernandez345 left a comment

Choose a reason for hiding this comment

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

can we not use the issue number only as the branch name. git gets confused when I try to switch to this branch cause it thinks I'm trying to check out a commit.

ghernandez345
ghernandez345 previously approved these changes Jan 23, 2025
@jacobshandling jacobshandling merged commit 55fd95d into main Jan 24, 2025
16 checks passed
@jacobshandling jacobshandling deleted the 24486 branch January 24, 2025 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants