-
Notifications
You must be signed in to change notification settings - Fork 145
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
Conversation
"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": { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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()}` |
There was a problem hiding this comment.
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'; |
There was a problem hiding this comment.
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';
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. |
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. |
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: 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
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
## [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))
## [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))
## [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))
What this does
New Components
Account
component that lists out a users accountsDrawer
: the bottom drawer that shows the "this account used in X apps" contentChooseAccount
screen, the page that shows the select an account UIUsername
screen, shows the UI for registering a new username, note: no validation currently added.State
Misc
@blockstack/connect
How to test
@blockstack/connect
yarn && yarn build && rm -rf node_modules && cd test-app && yarn && yarn start
blockstack-app
and runyarn dev
Connected to this
@blockstack/connect
PR.