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

[DDW-1190] Set decimal places to 2 when showing the sync percentage #3106

Merged
merged 4 commits into from
Mar 27, 2023

Conversation

danielmain
Copy link
Contributor

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

CleanShot 2023-02-14 at 18 59 40@2x

Basics

  • PR assigned to the PR author(s)
  • input-output-hk/daedalus-dev and input-output-hk/daedalus-qa assigned as PR reviewers
  • All visual regression testing has been reviewed (assign run Chromatic label to PR to trigger the run)
  • PR has appropriate labels (release-vNext, feature/bug/chore, WIP)
  • PR link is added to a Jira ticket, ticket moved to In Review
  • PR is updated to the most recent version of the target branch (and there are no conflicts)
  • PR has a good description that summarizes all changes
  • PR contains screenshots (in case of UI changes)
  • CHANGELOG entry has been added to the top of the appropriate section (Features, Fixes, Chores) and is linked to the correct PR on GitHub
  • There are no missing translations (running yarn manage:translations produces no changes)
  • Text changes are proofread and approved (Jane Wild / Amy Reeve)
  • Japanese text changes are proofread and approved (Junko Oda)
  • Storybook works and no stories are broken (yarn storybook)
  • In case of dependency changes yarn.lock file is updated

Code Quality

  • Important parts of the code are properly commented and documented
  • Code is properly typed with typescript types
  • React components are split-up enough to avoid unnecessary re-renderings
  • Any code that only works in main process is neatly separated from components

Testing

  • New feature/change is covered by acceptance tests
  • New feature/change is manually tested and approved by QA team
  • All existing acceptance tests are still up-to-date
  • New feature/change is covered by Daedalus Testing scenario
  • All existing Daedalus Testing scenarios are still up-to-date

After Review

  • Update Slack QA thread by marking it with a green checkmark

@tomislavhoracek tomislavhoracek self-requested a review March 9, 2023 09:50
logger.error('SyncingProgress::Percentage::Error parsing sync percentage', {
error,
});
return '-';
Copy link
Contributor

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% ?

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 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" ?

Copy link
Contributor

@tomislavhoracek tomislavhoracek Mar 9, 2023

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%

@dmitrii-gaico dmitrii-gaico self-requested a review March 20, 2023 10:13
Copy link

@dmitrii-gaico dmitrii-gaico left a 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);
Copy link
Contributor

Choose a reason for hiding this comment

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

@tomislavhoracek tomislavhoracek requested a review from a team March 23, 2023 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants