-
Notifications
You must be signed in to change notification settings - Fork 297
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
[DDW-426] Fix Having Trouble Connecting Notification #1112
Conversation
@@ -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 |
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 comment claims 5 minutes still, but the code says 30 seconds
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.
@cleverca22 this was edited for debugging purposes. 5 min is the real value which we will revert to at the end...
@MarcusHurney please update PR description 🙏 |
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.
Awesome work @MarcusHurney 🎉
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 ofcardano-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 withinLoading.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 mainrender
method whose epic length was second only to the PR description.Review Checklist:
Basics
yarn run test
)yarn run dev
)yarn run package
/ CI builds)yarn run flow:test
)yarn run lint
)yarn run manage:translations
produces no changes)yarn run storybook
)yarn.lock
file is updatedCode Quality
Testing
After Review:
done
on the Youtrack board