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

Implement UI for identity #69

Merged
merged 43 commits into from
Feb 11, 2020
Merged

Implement UI for identity #69

merged 43 commits into from
Feb 11, 2020

Conversation

aulneau
Copy link
Contributor

@aulneau aulneau commented Jan 28, 2020

What this does

New Components

  • Created an Account component that lists out a users accounts
  • Drawer: the bottom drawer that shows the "this account used in X apps" content
  • ChooseAccount screen, the page that shows the select an account UI
  • Username screen, shows the UI for registering a new username, note: no validation currently added.

State

  • Updated a couple screen enums for route states (choose, username)
  • Added a couple selectors to start determining if there are local identities
  • Set the initial screen to username

Misc

  • Created a hook: useAppDetails
  • Removed final.tsx as it's now in @blockstack/connect

How to test

  • Pull down and run this branch of @blockstack/connect
  • yarn && yarn build && rm -rf node_modules && cd test-app && yarn && yarn start
  • Pull down this branch of blockstack-app and run yarn dev

Connected to this @blockstack/connect PR.

@aulneau aulneau requested a review from kyranjamie January 29, 2020 15:59
"version": "1.0.0",
"description": "A web browser extension starter - based on Typescript, React, Redux, Styled-Component, Webpack, and more. Runs on Chrome and Firefox.",
"main": "index.js",
"scripts": {
Copy link
Collaborator

@kyranjamie kyranjamie Jan 29, 2020

Choose a reason for hiding this comment

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

Sorry for pending rant, but:

Can we please 🙏not order our package.json alphabetically? This is the IDE-feature autoformat wild west: alphabetical order is, by far, the least optimal way of ordering this file imo. (I see this is alphabetical except name, desc and version)

The most important and frequent thing I go to check in the package.json, is what scripts I can run. Now they're at the bottom.

When you run npm init it generates a file where name, main entry file and scripts are at the top, and, I would argue, with good reason.

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 am fine with this, sure. I use a package called fixpack to automate it and lint it. Happy to move the scripts to the top.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm happy to have some logic behind ordering, too.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Interesting, haven't seen this package, and thank would really appreciate that.

A package.json file scrubber for the truly insane.

🤔😂

I'm cool with linting it, just arguing scripts are amongst the most important content of the file.

Copy link
Collaborator

Choose a reason for hiding this comment

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

That said, adding a whole new configuration file to a repo, to lint and sort one configuration file, begs the question to me... what lints the linting configuration file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That said, adding a whole new configuration file to a repo, to lint and sort one configuration file, begs the question to me... what lints the linting configuration file?

It's not added to the file, it's just a one time thing generally -- npx fixpack. I just prefer to have some logic and consistency, I don't really care what that is :)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh nice, yeah let's do that

const [error, setError] = useState('');
const [loading, setLoading] = useState(false);
const [username, setUsername] = useState(
() => `${getRandomWord()}-${getRandomWord()}-${getRandomWord()}-${getRandomWord()}`
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

@@ -1,8 +1,10 @@
import Wallet from '@blockstack/keychain/dist/wallet';
import Identity from '@blockstack/keychain/dist/identity';
Copy link
Collaborator

@kyranjamie kyranjamie Jan 30, 2020

Choose a reason for hiding this comment

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

import { Wallet, Identity } from '@blockstack/keychain';

stacks-archive/keychain#18

@hstove
Copy link
Contributor

hstove commented Feb 4, 2020

Update: I've added the logic for showing the warning if re-using a multiplayer app.

It depends on stacks-archive/keychain#19, which is published as a beta.

@kyranjamie
Copy link
Collaborator

Looks good

The only improvement I'd suggest would be keying the identities by ID in an entities object

{
  entities: {
    <identity_id>: {},
  },
  ids: [<identity_id>],
}

// const selector = ids.map(id => entities[id]);

Would be easier to follow, and less error-prone than using the index.

@hstove
Copy link
Contributor

hstove commented Feb 4, 2020

Hey Kyran, I think that's a totally reasonable request. I have a hesitation, though, because the order of your identities is pretty important to keep, especially for cryptographic reasons with how we derive sub-identities from the master keychain. I will try out your suggestion, though, as you have a solution for keeping the order intact while still supporting ID-based lookup.

* fix: Remove Stack component from body

* fix: Your secret key, Fixes #86

* fix: Save your SK, Fixes #89

* fix: Connect Fixes #91

* fix: Align with connect's removeal of Stack from Screen

* fix: Addresses incorrect font, Fixes #87
hstove and others added 7 commits February 4, 2020 20:13
* fix: Styling of FAQ section, Closes #90

* fix: Styling of the toast, Closes #88

* feat: Update use of Title inline with @blockstack/connect

* use <Title> from connect

* update connect version in test-app

* update connect version

* test-app depends on authenticator dependency version?

Co-authored-by: Hank Stoever <hstove@gmail.com>
* fix: Disable spellcheck on secret key field

* fix: Incorrect link size

* fix: <ExplainerCard> style

* fix: Modal header styles, Closes #83

* fix: Preload images, remove loading delay, Closes #104

* fix: Kill unused file

* refactor: Chevron to UI lib

* fix: Remove implicit import

* fix: Replace mdi plus in circle for custom one

* fix: Delete duplicate, unused file

* dep updates

Co-authored-by: Hank Stoever <hstove@gmail.com>
* feat: Add homepage

* fix: Add mobile meta tag

* refactor: Faciliate list with no action

* refactor: Use Sign out term
* fix: Misaligned font size

* fix: Misalignment of toast

* fix: Add newly used word
@markmhendrickson
Copy link
Collaborator

markmhendrickson commented Feb 11, 2020

This is ready for merge upon which @timstackblock should be assigned #61 for QA.

* fix: Usernames flashing on component refresh, Closes #101

* fix: Shorten huge gitignore

* fix: Add padding to bottom of create account
@aulneau aulneau merged commit c23e92b into master Feb 11, 2020
hstove pushed a commit that referenced this pull request Feb 25, 2020
kyranjamie pushed a commit that referenced this pull request Jul 17, 2024
## [6.44.0](v6.43.0...v6.44.0) (2024-07-17)

### Features

* add debug command to log hiro limiter data ([52a0c15](52a0c15))
* add runes fiat balance, closes [#5300](#5300) ([0a175f7](0a175f7))
* auto-scale balance font-size to avoid line-break ([b25d5bc](b25d5bc))

### Bug Fixes

* **analytics:** remove query error tracking, too many events ([f3de110](f3de110))
* **analytics:** segment not passing context to mixpanel ([52a6fb2](52a6fb2))
* send forms address error, closes [#5440](#5440) ([0b99130](0b99130))
* show brc20 token fiat balance, closes [#5626](#5626) ([adf8c19](adf8c19))
* stx balance loading condition ([37686a4](37686a4))

### Internal

* post-release merge back ([db89bdd](db89bdd))
* remove bitcoin contracts, closes [#5244](#5244) and leather-io/issues[#69](#69) ([1b9f9a2](1b9f9a2))
* update query cache with known data ([69a4e0c](69a4e0c))
* update query package ([98beec5](98beec5))
github-merge-queue bot pushed a commit that referenced this pull request Jul 25, 2024
## [6.44.0](v6.43.0...v6.44.0) (2024-07-17)

### Features

* add debug command to log hiro limiter data ([52a0c15](52a0c15))
* add runes fiat balance, closes [#5300](#5300) ([0a175f7](0a175f7))
* auto-scale balance font-size to avoid line-break ([b25d5bc](b25d5bc))

### Bug Fixes

* **analytics:** remove query error tracking, too many events ([f3de110](f3de110))
* **analytics:** segment not passing context to mixpanel ([52a6fb2](52a6fb2))
* send forms address error, closes [#5440](#5440) ([0b99130](0b99130))
* show brc20 token fiat balance, closes [#5626](#5626) ([adf8c19](adf8c19))
* stx balance loading condition ([37686a4](37686a4))

### Internal

* post-release merge back ([db89bdd](db89bdd))
* remove bitcoin contracts, closes [#5244](#5244) and leather-io/issues[#69](#69) ([1b9f9a2](1b9f9a2))
* update query cache with known data ([69a4e0c](69a4e0c))
* update query package ([98beec5](98beec5))
kyranjamie pushed a commit that referenced this pull request Jul 25, 2024
## [6.44.1](v6.44.0...v6.44.1) (2024-07-25)

### Bug Fixes

* handle long token names gracefully, ref leather-wallet/extension[#5673](#5673) ([3110f7e](3110f7e))
* rate limiting on testnet ([f4258cd](f4258cd))
* security vulnerability with ip pkg in storybook ([85d34b3](85d34b3))
* send inscription flow validation error ([8030d3a](8030d3a))
* stx fallback btn show on load ([95d6ea5](95d6ea5))
* update popup headers to show account info, ref leather-wallet/issues[#157](#157) ([93ad45f](93ad45f))

### Internal

* bitcoin queries, closes leather-io/issues[#94](#94) and leather-io/issues[#101](#101) ([1187acf](1187acf))
* **release:** 6.44.0 ([9fc4eb4](9fc4eb4)), closes [#5300](#5300) [#5440](#5440) [#5626](#5626) [#5244](#5244) [#69](#69)
* stacks queries ([5041cfb](5041cfb))
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.

4 participants