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-426] Fix Having Trouble Connecting Notification #1112

Merged

Conversation

MarcusHurney
Copy link
Contributor

@MarcusHurney MarcusHurney commented Oct 5, 2018

  • This PR implements a fix in the Loading.js component for the "Having Trouble Connecting" notification which launches after a user has been stuck on "Connecting to the Network..." for longer than 5 minutes due to poor internet connectivity or perhaps an unknown issue within their local instance of cardano-node. This notification contains a button which launches a form allowing the user to submit a support ticket.

  • This PR implements a similar fix in the Loading.js component for the "Having Trouble Syncing..." notification which launches after a user has been stuck on "Syncing Blocks..." at a certain percentage of synced blocks which does not change for longer than the hardcoded time limit. The notification also contains a button which launches a form allowing the user to submit a support ticket ticket.

  • This PR also refactors nearly the entirety of the Loading.js component's methods by naming them declaratively based on their intended functionalities/outcomes. The component's methods are also broken down by responsibility and composed in a such a way to quickly gain an understanding of their functionalities. One may now read the code within Loading.js as if it were a children's book before bed.

  • This PR also breaks out the conditional rendering logic of loadingMessage into its own render method therefore reducing the overextended main render method whose epic length was second only to the PR description.


Review Checklist:

Basics

  • PR is updated to the most recent version of target branch (and there are no conflicts)
  • PR has good description that summarizes all changes and shows some screenshots or animated GIFs of important UI changes
  • CHANGELOG entry has been added and is linked to the correct PR on GitHub
  • Automated tests: All acceptance tests are passing (yarn run test)
  • Manual tests (minimum tests should cover newly added feature/fix): App works correctly in development build (yarn run dev)
  • Manual tests (minimum tests should cover newly added feature/fix): App works correctly in production build (yarn run package / CI builds)
  • There are no flow errors or warnings (yarn run flow:test)
  • There are no lint errors or warnings (yarn run lint)
  • Text changes are proofread and approved (Jane Wild)
  • There are no missing translations (running yarn run manage:translations produces no changes)
  • UI changes look good in all themes (Alexander Rukin)
  • Storybook works and no stories are broken (yarn run storybook)
  • In case of dependency changes yarn.lock file is updated

Code Quality

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

Testing

  • New feature / change is covered by acceptance tests
  • 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:

  • Merge PR
  • Delete source branch
  • Move ticket to done on the Youtrack board

@MarcusHurney MarcusHurney self-assigned this Oct 5, 2018
@@ -1,6 +1,6 @@
// @flow
// All configuration values for timeouts / intervals should go here
export const REPORT_ISSUE_TIME_TRIGGER = 5 * 60; // 5 minutes | unit: seconds
export const REPORT_ISSUE_TIME_TRIGGER = 30; // 5 minutes | unit: seconds
Copy link
Contributor

Choose a reason for hiding this comment

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

the comment claims 5 minutes still, but the code says 30 seconds

Copy link
Contributor

Choose a reason for hiding this comment

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

@cleverca22 this was edited for debugging purposes. 5 min is the real value which we will revert to at the end...

@nikolaglumac
Copy link
Contributor

@MarcusHurney please update PR description 🙏

@MarcusHurney MarcusHurney removed the WIP label Oct 6, 2018
Copy link
Contributor

@nikolaglumac nikolaglumac left a comment

Choose a reason for hiding this comment

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

Awesome work @MarcusHurney 🎉

@nikolaglumac nikolaglumac merged commit d0b3bcc into develop Oct 6, 2018
@nikolaglumac nikolaglumac deleted the bug/ddw-426-fix-having-trouble-connecting-notification branch October 6, 2018 13:32
This was referenced Oct 16, 2018
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.

3 participants