Skip to content

ui: restyle wallets page - #1700

Merged
chappjc merged 3 commits into
decred:masterfrom
buck54321:wallets
Aug 14, 2022
Merged

ui: restyle wallets page#1700
chappjc merged 3 commits into
decred:masterfrom
buck54321:wallets

Conversation

@buck54321

Copy link
Copy Markdown
Member

The wallets page is restyled. The new style is responsive.

Desktop

Tablet

Mobile

@chappjc chappjc added this to the 0.6/1.0 milestone Jul 14, 2022
@buck54321
buck54321 force-pushed the wallets branch 3 times, most recently from df6fb0d to 752dfc1 Compare July 28, 2022 00:51
@buck54321
buck54321 force-pushed the wallets branch 5 times, most recently from d3bb6e7 to 6ec03b5 Compare August 4, 2022 22:31
@buck54321
buck54321 force-pushed the wallets branch 2 times, most recently from e8eb16b to e6aa794 Compare August 9, 2022 20:06
@buck54321
buck54321 marked this pull request as ready for review August 9, 2022 20:17

@chappjc chappjc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks great just based on code. Will actually test next.

I see what you mean about the localized_html bloat. Agree we should look into those done on-the-fly after we get the initial go:embed stuff in.

Comment thread client/webserver/locales/pl-pl.go
Comment thread client/webserver/site/src/html/bodybuilder.tmpl Outdated
Comment on lines +616 to +617
console.log(note)
console.log(error.stack)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

leftovers or you want this because it shouldn't happen?

Comment thread client/webserver/site/src/js/doc.ts
Comment thread client/webserver/site/src/js/wallets.ts
Comment thread client/webserver/site/src/js/wallets.ts Outdated
Comment thread client/webserver/site/src/js/wallets.ts Outdated
Comment thread client/webserver/site/src/js/wallets.ts
Doc.hide(page.sendErr)
const assetID = parseInt(page.sendForm.dataset.assetID || '')
const subtract = page.subtractCheckBox.checked || false
const assetID = parseInt(page.sendForm.dataset.assetID ?? '')

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Eeeek have we broadly misusing || when we should have been using the nullish coalescing operator?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Meh. I just discovered this, really. Will try to use it more in the future, but it's already bitten me. I did something like

const v = parseFloat(inputElement.value ?? '0')

which yields NaN, because value is not undefined or null, just empty, which is falsy but not nullish.

I think we should use it, but I'm not going to enforce it too strictly.


I've also been using the optional chaining operator, ?..

const thing = { a: 1 }
let v = thing.b.c    // error thrown cuz b undefined
v = thing?.b?.c      // undefined

Comment thread client/asset/interface.go

@chappjc chappjc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Tests well overall, just a few minor things.

And the following is not an issue with this PR, but there's inconsistent terminology with the built-in wallets. We call them "Native" for DCR and BTC, but "Internal" for ETH:

image

image

This is just something we don't want the user scratching their head over.

Also in that BTC screen, it's a whole number so there are no decimals, not even a single ".0". I guess that's fine if intended, but looks a little unusual for wallet displays.

Comment thread client/webserver/site/src/localized_html/en-US/wallets.tmpl
Comment thread client/webserver/site/src/localized_html/en-US/wallets.tmpl Outdated
@chappjc

chappjc commented Aug 13, 2022

Copy link
Copy Markdown
Member

Thanks for the review followup. Just want to make sure you saw that I had a prior review: #1700 (review) No rush but I got the sense you just were only addressing the second review from my testing. The order filled percent is the main outstanding thing.

@chappjc chappjc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

OK. I thought we could just capitalize the other languages where it looks safe, but whatever

@chappjc
chappjc merged commit d85cdad into decred:master Aug 14, 2022
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