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

Do not show UI tour with updates for new users #570

Merged
merged 3 commits into from
Nov 4, 2024

Conversation

ashleysmithTTD
Copy link
Contributor

@ashleysmithTTD ashleysmithTTD commented Nov 4, 2024

What Changed:

  • Added a check for local storage to see if user has nothing in their local storage, then do not show the UI tour since they will be a new user and everything is new to them

Note: this check relies on local storage, meaning if a user logs in on a different device or happens to clear their local storage, they would not see the tour steps, but I think it's safe to assume the case is rare where they would log in on a different device or clear their local storage and be needing to see new features for the first time

Test Plan:

  • Create an account and log in as that user for the first time (make sure there is nothing in local storage for tour data from your normal user)
  • Make sure you don't see the UI tour

@@ -29,7 +29,7 @@ describe('testing tour storage helper functions', () => {
mockUser.currentParticipantUserRoles = [{ id: UserRoleId.Admin, roleName: 'Admin' }];
mockUser.participants = [mockParticipant, mockParticipant2] as Participant[];
mockParticipant.currentUserRoleIds = [UserRoleId.Admin];
localStorage.removeItem(tourStorageKey);
localStorage.setItem(tourStorageKey, JSON.stringify({ seenForVersions: ['0.1.0'] }));

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Setting it to an early version so it shows all the steps are present - can't leave it empty or it won't show any tour steps

@ashleysmithTTD ashleysmithTTD merged commit c2e9444 into main Nov 4, 2024
3 checks passed
@ashleysmithTTD ashleysmithTTD deleted the ans-UID2-4377-disable-ui-tour-new-users branch November 4, 2024 21:29
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