-
Notifications
You must be signed in to change notification settings - Fork 154
Disable actions that require an internet connection #352
Comments
I would like to add that it seems if your network is heavily throttled, the search feature also doesn't work, as described above. Creating a new project shows the animation and takes a long time, but it does eventually work. Hard for me to tell if this is a proxy issue, a firewall issue, or a slow connection issue. |
If no one is looking at this I'm happy to do so. |
@joshuaellis sure, it's all yours. I'm pretty busy with writing unit tests. That's why I'm not working on new features at the moment. But maybe I'm doing a break from the tests soon and have a look at the Codesandbox export feature. |
A couple of questions relating to the quote, firstly do we already have an infobar designed and built? Not to worry if not. Secondly, I don't think it should be dismissable considering we're going to be blocking core features of the product – building new projects and adding new dependencies. What're your thoughts? |
We don't have an infobar designed. That's a new part of the UI. |
I was wondering if we want to have the infobar UI as a separate component that we could use in other instances, is this something we would want or should the Online Checker render an infobar? |
I think it's OK to render it in in the OnlineCheck component as this is a special info. We have had some discussions about notifications (nothing decided) but I think this won't fit into a toastr notification system. We wanted to have some toasts for finishing tasks info or when we'd like to have the users attention on a task - I think there is no open issue for this but I'll check and open an issue so we can discuss this there. |
* Online check component added * add reducer & action for online check component. also included in App.js * removed sidebar functionality when offline * removed depedency functionality when offline * removed functionality from create new project wizard when offline * fixed tests to align with disabled pattern * add infoBanner to Z-indexes for future usage. * removed random {' '}, changed IS_ONLINE_CHECK to SET_ONLINE_STATUS * pull request requested changes missed one file. * updated infobar to be fixed header. * flow fix * remove random whitespace * Pull request changes remove state type, move styled components to before redux part, change background color of infobar to be transparent. * enable menu items based on isOnline
OK, we can close this. Thanks @joshuaellis for adding this. I like the idea of having a low bandwidth info as @alexlee-dev mentioned. Maybe we could add this as a new issue but I'm not sure if it's worth to add. |
* Online check component added * add reducer & action for online check component. also included in App.js * removed sidebar functionality when offline * removed depedency functionality when offline * removed functionality from create new project wizard when offline * fixed tests to align with disabled pattern * add infoBanner to Z-indexes for future usage. * removed random {' '}, changed IS_ONLINE_CHECK to SET_ONLINE_STATUS * pull request requested changes missed one file. * updated infobar to be fixed header. * flow fix * remove random whitespace * Pull request changes remove state type, move styled components to before redux part, change background color of infobar to be transparent. * enable menu items based on isOnline
* add analytics tags * Update AddDependencySearchProvider.js * #352 Disable actions that require an internet connection (#368) * Online check component added * add reducer & action for online check component. also included in App.js * removed sidebar functionality when offline * removed depedency functionality when offline * removed functionality from create new project wizard when offline * fixed tests to align with disabled pattern * add infoBanner to Z-indexes for future usage. * removed random {' '}, changed IS_ONLINE_CHECK to SET_ONLINE_STATUS * pull request requested changes missed one file. * updated infobar to be fixed header. * flow fix * remove random whitespace * Pull request changes remove state type, move styled components to before redux part, change background color of infobar to be transparent. * enable menu items based on isOnline * Setup ESlint rules for Jest (#366) * WIP: Added eslint-jest & fixed issues (except snapshots) * reduced snapshot size to meet max 100 lines * fixed snapshot * changed comment to a note about noPadding prop * updated snapshot * Test ProjectConfigurationModal component (#360) * WIP: Added render test * WIP: Added tests * fixed flow * added focus test * Merge branch 'master' into test-project-configuration-modal * fixed linting warnings * removed typing as no flow used in test files * Test CreateNewProjectWizard components (#361) * WIP: Added tests * WIP: ProjectType undefined not throwing in test * fixed flow * added tests * reverted to children render props * Merge branch 'master' into test-create-new-project-wiz * Fixed linting & replaced snapshot with simple smoke tests * addressed review comments * Test DependencyManagementPane component (#363) * moved related components to DependencyManagementPane * added tests * fixed flow * added a constant instead of Date.now() * updated snapshot * removed white-spaces * removed verbose * fixed linting & mocked AlgoliaLogo * move related component files & moved tests to __tests__ folder * Add script for test:dev * Fix spaces and update lint-staged (#369) * Switch to advanced config to silence validation warning * Fix spacing issues * chore: fix merge changes
It's more a bug than a feature but I'm writing this as feature description. I've noticed this during my work on PR #335 because there I'm using
fetch
to get the starters from Github.Describe the bug
With-out internet connection some features aren't working as expected:
console.log
(see first screenshot)To Reproduce
Let's build
Add New Dependency
gatsby-starter
branch) won't need a special handling as failing silently is OK.Expected behavior
Allow tasks that can be performed offline & disable actions that require an internet connection. Also display an infobar that Guppy requires an internet connection on the top of the app (right below the application menu).
navigator.onLine
to determine & check if this is working in Chrome. See mdn here. Added toApp.js
. Check can be done like in the following Codesandbox example - just Redux missing.isOnline
boolean toapp-status.reducer
app-status.reducer
-isOnline
flag required)Add New Dependency
Screenshots
CRA build with-out internet
Add dependency fails silently
Discussion
The text was updated successfully, but these errors were encountered: