-
Notifications
You must be signed in to change notification settings - Fork 491
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
feat: add ipfs connection indicator and notifications #802
Conversation
- show the api address when connect via http - otherwise show api provider (window.ipfs, embedded js-ipfs) License: MIT Signed-off-by: Oli Evans <oli@tableflip.io>
License: MIT Signed-off-by: Oli Evans <oli@tableflip.io>
License: MIT Signed-off-by: Oli Evans <oli@tableflip.io>
License: MIT Signed-off-by: Oli Evans <oli@tableflip.io>
License: MIT Signed-off-by: Oli Evans <oli@tableflip.io>
License: MIT Signed-off-by: Oli Evans <oli@tableflip.io>
- got to await the doc title test othewise it resolves after the test ends - e2e tests are carried out on a small screen. the notificaiton div was covering the settings link so it couldnt be clicked. License: MIT Signed-off-by: Oli Evans <oli@tableflip.io>
- update to ipfs-redux-bundle v3.0.1 - tweak notify dismiss reactor to more reliably auto dismiss License: MIT Signed-off-by: Oli Evans <oli@tableflip.io>
@olizilla oops: found a bug: when going to /welcome it doesn't show the API address in input box. It might be an issue on ipfs-redux-bundle. Will take a look. |
@olizilla |
- also update ipfs-redux-bundle v3.1.0 License: MIT Signed-off-by: Oli Evans <oli@tableflip.io>
License: MIT Signed-off-by: Oli Evans <oli@tableflip.io>
I'm moving the i18n out of the bundle and into the Notify component and adding tests for the bundle. |
License: MIT Signed-off-by: Oli Evans <oli@tableflip.io>
src/bundles/notify.js
Outdated
# Notify | ||
- show error when ipfs goes away. | ||
- show ok when it comes back. | ||
- dismiss the the ok after 2s |
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.
dismiss the the ok after 2s 3s
src/bundles/notify.js
Outdated
return { ...state, show: false } | ||
} | ||
|
||
if (action.type.match(/_FETCH_FAILED$/) || action.type.match(/^FILE_\w+_FAILED$/)) { |
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 actions are FILES_*
, so this should be:
action.type.match(/^FILES_\w+_FAILED$/)`
src/bundles/notify.js
Outdated
} | ||
} | ||
|
||
if (action.type.match(/_FETCH_FINISHED$/) || action.type.match(/^FILE_\w+_FINISHED$/)) { |
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.
Same here: FILES_
.
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.
Looks 👌
I see potential for small tweaks:
-
Having spinner in left top corner and connection indicator in the right one is bit distracting.
Perhaps we could merge them and just animate connection indicator instead of having a separate spinner? (This could be a separate PR) -
Let's make indicator interactive (would be cool to do it before this is merged):
-
cursor: help
orcursor: pointer
-
Clicking on connection status indicator should display already existing troubleshooting guide:
-
→ this screen (enables user to switch to different API without inventing any new UI)
-
- add a retry-init bundle to track ipfs init failures and retry - Make connection indicator a link to welcome page - Improve language around network traffic graphs License: MIT Signed-off-by: Oli Evans <oli@tableflip.io>
License: MIT Signed-off-by: Oli Evans <oli@tableflip.io>
License: MIT Signed-off-by: Oli Evans <oli@tableflip.io>
@lidel very good plan! I have made it so. The spinner is gone. The connection indicator is a link. For bonus points we now also have auto-retry ipfs init when you get stuck on the welcome page if you open the app with no daemon running. If you go start your daemon, the page will now auto update to show you are now connected, which feels nice. |
License: MIT Signed-off-by: Oli Evans <oli@tableflip.io>
License: MIT Signed-off-by: Oli Evans <oli@tableflip.io>
Gonna merge this and see if i can do anything about the bundlesize in a separate PR |
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 is an initial sketch of an idea on how to inform users about IPFS connection issues. It works for both api errors and window.ipfs errors, but it is very high level; just enough info to let the user know that we're not able to talk to ifps at the moment.
TODO