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 extra call to archive/accept in Glam onboarding #517

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

meisekimiu
Copy link
Member

@meisekimiu meisekimiu commented Jan 21, 2025

The original onboarding flow was designed to not accept an archive invitation until the end of the flow in case the user wanted to change which archive they accept. In the new "Glam" onboarding flow, the user can accept as many archives as they want in addition to creating an archive. Accepting archive invites also happens as soon as the user clicks accept on the first page, rather than at the end of onboarding.

Since the Glam onboarding flow is still built on top of the older onboarding components, this final archive accepting stage still runs despite the fact that the invitations have been accepted. This causes a brief error message to appear before the user is directed to their archive. Only run this acceptance logic during the legacy onboarding flow so that this doesn't happen.

Steps to test:

  1. Accept an archive invitation in glam onboarding and verify that no error message pops up once completing onboarding
  2. Verify that the "classic" onboarding still works

This can also be tested in Storybook by comparing the mocked calls to archive/accept, though this is more of a test for developers.

The original onboarding flow was designed to not accept an archive
invitation until the end of the flow in case the user wanted to change
which archive they accept. In the new "Glam" onboarding flow, the user
can accept as many archives as they want in addition to creating an
archive. Accepting archive invites also happens as soon as the user
clicks accept on the first page, rather than at the end of onboarding.

Since the Glam onboarding flow is still built on top of the older
onboarding components, this final archive accepting stage still runs
despite the fact that the invitations have been accepted. This causes a
brief error message to appear before the user is directed to their
archive. Only run this acceptance logic during the legacy onboarding
flow so that this doesn't happen.

This error could have been prevented if the "glam" onboarding was built
separately from the previous onboarding flow. This has caused many of
the recent onboarding issues in both Glam and original flows.

PER-9971: Final onboarding screen triggers an error for invitation
@meisekimiu meisekimiu force-pushed the glam-duplicate-archive-accept branch from 9dbef9b to 207ff6d Compare January 21, 2025 21:16
Copy link

codecov bot commented Jan 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 43.53%. Comparing base (ee652aa) to head (207ff6d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #517      +/-   ##
==========================================
+ Coverage   43.44%   43.53%   +0.09%     
==========================================
  Files         364      364              
  Lines       11178    11179       +1     
  Branches     1827     1828       +1     
==========================================
+ Hits         4856     4867      +11     
+ Misses       6159     6147      -12     
- Partials      163      165       +2     

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants