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

app: fix markets view layout issues #560

Merged
merged 6 commits into from
Jul 28, 2020
Merged

Conversation

buck54321
Copy link
Member

@buck54321 buck54321 commented Jul 21, 2020

Fixes issues where overflow and div sizing were acting weird on resize.

Creates and uses a stylish scrollbar class. Enables manual chart div click-drag resizing and remembers the user's preference across sessions.

Also corrects a recent regression where certain order form elements were not being hidden for market orders.

Most of the loc are just html indentation changes. Best tested with the test app server.

resolves #550, #514, #296, #539

Fixes issues where overflow and div sizing were acting weird on resize.
Creates and uses a stylish scrollbar class. Enables manual chart
div resizing and remembers the user's preference across sessions.

Also correct a recent regression where certain order form elements
were not being hidden for market orders.
@buck54321
Copy link
Member Author

739d61e contains fixes for #516 and #532. Sorry if anybody was mid-review.

Copy link
Member

@chappjc chappjc left a comment

Choose a reason for hiding this comment

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

When starting dexc with already configured wallets (everything rebuild and hard-refreshed and cache disabled):

image

image

image

After unlocking in the /wallets page, the markets view is fixed:

image

Separately after resolving the above with an unlock, I think this came after a trade:

image

client/webserver/site/src/js/markets.js Outdated Show resolved Hide resolved
client/webserver/site/src/html/markets.tmpl Show resolved Hide resolved
@buck54321
Copy link
Member Author

@chappjc, I was unable to reproduce the formatCoinValue error. I've added a console error message that should give some insight if you can still reproduce.

@chappjc
Copy link
Member

chappjc commented Jul 28, 2020

I'm not seeing it any more either, at least not with a fresh harness. The one I had with over 1 million DCR was pretty unusual.

@chappjc
Copy link
Member

chappjc commented Jul 28, 2020

Here's the repro with 1218684.00822222:

function str(x){
  return x.toLocaleString('en-us', fullPrecisionSpecs);
}

const fullPrecisionSpecs = {
  minimumSignificantDigits: 4,
  maximumSignificantDigits: 8,
  minimumFractionDigits: 8,
  maximumFractionDigits: 8
}
let v = 1218684.00822222
var vStr = str(v)
console.log(vStr)
var [whole, frac] = vStr.split('.')
console.log(whole, frac);

https://jsbin.com/daqukodoqo/edit?js,console

I think toLocaleString should always output at least 2 fraction digits.

@buck54321
Copy link
Member Author

Fixed formatCoinValue in 741523f. We could use unit tests for functions like this, so I actually tested a couple of js unit testing frameworks, but ran into some unfortunate issues with both. I'll keep looking for a suitable framework.

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.

web: market sell has rate/price form
2 participants