-
Notifications
You must be signed in to change notification settings - Fork 295
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
[DDW-1190] Set decimal places to 2 when showing the sync percentage #3106
Conversation
… 2 fixed digit places
logger.error('SyncingProgress::Percentage::Error parsing sync percentage', { | ||
error, | ||
}); | ||
return '-'; |
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.
@danielmain is this -
a requirement or we can return e.g. 0%
?
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 uncertain if onParsingError we show 0% percentage sync. People will think they have to wait if they see 0% where there is actually an error.
Should we show "Error parsing" ?
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.
hmmm, yeah. Maybe we can keep it as is and show -
. It is better than showing the error that we are not able to parse the data or, like you said, confuse users by showing 0%
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.
The Sync progress now shows the decimal .00 at starting screen but still not fetching the actual progress and always stays integer.
Please see the record for details.
@@ -68,7 +68,7 @@ const createHandleNewLogLine = (mainWindow: BrowserWindow) => { | |||
return; | |||
} | |||
|
|||
const progress = Math.floor(parseFloat(unparsedProgress)); | |||
const progress = parseFloat(unparsedProgress); |
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.
This PR follow the suggestion in this issue: #3103 to set a fix decimal place to 2.
Expect: 99.89%, 99.90%, 99.91%
Actual: 99.89%, 99.9%, 99.91%
Screenshots
Basics
input-output-hk/daedalus-dev
andinput-output-hk/daedalus-qa
assigned as PR reviewersrun Chromatic
label to PR to trigger the run)release-vNext
,feature
/bug
/chore
,WIP
)yarn manage:translations
produces no changes)yarn storybook
)yarn.lock
file is updatedCode Quality
Testing
After Review