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

refactor: onboarding after install #1307

Closed
wants to merge 2 commits into from

Conversation

fbwoolf
Copy link
Contributor

@fbwoolf fbwoolf commented Jun 16, 2021

Try out this version of the Stacks Wallet - download extension builds.

This PR changes the onboarding flow so that now after install the user is directed back to their app tab and it reloads the page so the extension can be detected as installed.

Issues:
hirosystems/connect#144
hirosystems/connect#98

Testing:

  1. Point at the alpha release changes to connect linked in the PR above.
  2. Run the test-app
  3. Load the unpacked version into Chrome
  4. Going thru onboarding in the full-page wallet
  5. After you set your password, the ext should automatically redirect you back to the app tab
  6. Click on Sign up again
  7. Choose an account
  8. Done

I think ultimately the goal is to extract out the concept of the Sign up button in the test-app and make it available via the connect library (@jasperjansz new designs for onboarding), but this is a good first step.

cc/ @aulneau @kyranjamie @fbwoolf

@changeset-bot
Copy link

changeset-bot bot commented Jun 16, 2021

🦋 Changeset detected

Latest commit: ce7dfa0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@stacks/wallet-web Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Jun 16, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/blockstack/stacks-wallet-web/GHHfpfydpfbKy2ZTLBe4VFjJwSek
✅ Preview: https://stacks-wallet-web-git-refactor-onboarding-aft-b52bab-blockstack.vercel.app

Copy link
Collaborator

@kyranjamie kyranjamie left a comment

Choose a reason for hiding this comment

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

Good work @fbwoolf—I've added some comments wrt readability and keeping with the patterns being used currently.

@@ -6,7 +6,7 @@ const manifest = {
author: 'Hiro PBC',
description:
'Stacks Wallet. Use the Stacks blockchain to access privacy-friendly apps, and keep data in your control.',
permissions: ['activeTab'],
permissions: ['tabs'],
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you explain why this is needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had to change it to this to query all tabs. I think activeTab only allows you to have access to the active tab.

src/background/background.ts Outdated Show resolved Hide resolved
src/manifest.json Outdated Show resolved Hide resolved
src/background/background.ts Outdated Show resolved Hide resolved
src/pages/set-password.tsx Outdated Show resolved Hide resolved
@fbwoolf
Copy link
Contributor Author

fbwoolf commented Jun 17, 2021

@kyranjamie one thing I noticed a little weird in testing this with the test-app is that when back at that app page the wallet is loaded but I still have to select an account before it moves past the sign up page. It seems like it should always just default to select the first indexed account to move an app past auth?

@aulneau
Copy link
Contributor

aulneau commented Jun 17, 2021

It seems like it should always just default to select the first indexed account to move an app past auth?

I think for first time registrations this makes a lot of sense

@fbwoolf fbwoolf force-pushed the refactor/onboarding-after-install branch from 523db7c to 33ad682 Compare June 17, 2021 19:29
@vercel vercel bot temporarily deployed to Preview June 17, 2021 19:29 Inactive
@fbwoolf fbwoolf force-pushed the refactor/onboarding-after-install branch from 33ad682 to 14c15f0 Compare June 18, 2021 01:15
@vercel vercel bot temporarily deployed to Preview June 18, 2021 01:15 Inactive
@fbwoolf
Copy link
Contributor Author

fbwoolf commented Jun 18, 2021

It seems like it should always just default to select the first indexed account to move an app past auth?

I think for first time registrations this makes a lot of sense

Been working on a solution for this, do either of you know why logging window to the console shows StacksProvider but if I console.log window.StacksProvider it is undefined (in the test-app)? Must be something with it being injected via the inpage script?

@kyranjamie
Copy link
Collaborator

Bizarre. Does window === window // true? They should resolve to the same place.

image

@fbwoolf fbwoolf force-pushed the refactor/onboarding-after-install branch from 14c15f0 to 5031f95 Compare June 19, 2021 20:28
@vercel vercel bot temporarily deployed to Preview June 19, 2021 20:28 Inactive
@fbwoolf fbwoolf force-pushed the refactor/onboarding-after-install branch from 5031f95 to 097234e Compare June 19, 2021 20:32
@vercel vercel bot temporarily deployed to Preview June 19, 2021 20:32 Inactive
@fbwoolf fbwoolf force-pushed the refactor/onboarding-after-install branch from 097234e to 5e3f83f Compare June 20, 2021 17:01
@vercel vercel bot temporarily deployed to Preview June 20, 2021 17:01 Inactive
@fbwoolf fbwoolf force-pushed the refactor/onboarding-after-install branch from 5e3f83f to 56a7fbe Compare June 20, 2021 19:53
@vercel vercel bot temporarily deployed to Preview June 20, 2021 19:53 Inactive
src/background/background.ts Outdated Show resolved Hide resolved
src/background/background.ts Outdated Show resolved Hide resolved
src/background/background.ts Outdated Show resolved Hide resolved
src/background/background.ts Outdated Show resolved Hide resolved
src/background/background.ts Outdated Show resolved Hide resolved
src/background/background.ts Outdated Show resolved Hide resolved
src/pages/set-password.tsx Outdated Show resolved Hide resolved
test-app/src/components/app.tsx Outdated Show resolved Hide resolved
test-app/src/components/app.tsx Outdated Show resolved Hide resolved
@fbwoolf fbwoolf changed the title refactor: onboarding after install refactor: reload app after install Jun 21, 2021
@fbwoolf fbwoolf changed the title refactor: reload app after install refactor: onboarding after install Jun 21, 2021
@fbwoolf fbwoolf marked this pull request as draft June 21, 2021 20:51
@fbwoolf fbwoolf force-pushed the refactor/onboarding-after-install branch from 56a7fbe to 565eb25 Compare June 24, 2021 01:11
@vercel vercel bot temporarily deployed to Preview June 24, 2021 01:11 Inactive
@fbwoolf fbwoolf force-pushed the refactor/onboarding-after-install branch from 565eb25 to 677b225 Compare June 24, 2021 01:15
@vercel vercel bot temporarily deployed to Preview June 24, 2021 01:15 Inactive
src/background/background.ts Outdated Show resolved Hide resolved
@fbwoolf fbwoolf force-pushed the refactor/onboarding-after-install branch from 677b225 to ce7dfa0 Compare June 24, 2021 15:51
@vercel vercel bot temporarily deployed to Preview June 24, 2021 15:51 Inactive
@kyranjamie kyranjamie changed the base branch from main to dev October 29, 2021 12:08
@fbwoolf
Copy link
Contributor Author

fbwoolf commented Mar 9, 2022

Going to close this PR, it is really outdated. Will be discussed further here: #1808

@fbwoolf fbwoolf closed this Mar 9, 2022
@pete-watters pete-watters deleted the refactor/onboarding-after-install branch February 14, 2024 06:08
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.

3 participants