React Upgrade - Error boundaries, new Toast, new Tabs
Long time no news! Not that Spider did not progress during 3 months, more that I was lasy to write about it.
There are been a series of improvements, and I'm about to share the most important ones.
All UIs have been migrated to lastest React: 16.8
This was much needed and postponed, as I was still using React 14. Migration was mostly seemless witht the nice tooling offered by the community, and the scripts to converts the code (extract PropTypes, use PureComponents...)
Libraries upgrade
In the same time, I upgraded nearly all libraries. Few libraries couldn't get upgrade as the changes were too big:
- Tabs: the library I used was not maintained (react-tab-panel), and the repo has been removed. I switched to react-tabs. Which offers less features, is simpler, but is well maintained.
- Redux
- Redux was not upgraded to latest version as this one was using React context and was showing performance issues. I have to wait for next one.
- React-select
- React-select did a major rework and change, and upgrade will need a seperate task. Moreover, it did not fill needed.
- React-dropzone
- Major interface break as well, less prioritary.
- Material-UI
- Material UI encountered many major version change, and this would impact much of the UI to upgrade it.
- I created a separate task for this.
New feature: Error boundaries
Coming with React 16 are improved error boundaries. The features help catching rendering errors in React component tree and handle them gracefully by rendering a fallback when the error is catched.
I encapsulated all branches of Spider UI into these new error boundaries, so that the error is nicely catch and displayed. And so that avoiding the source of the error (changing record, or timespan) would avoid the error without requiring a full refresh of the page.
- The bottom grid
- The detail view
- A detail view tab
- The map
- The timeline
- The menu
When an error happens, instead of the expected content, you will see a poor fallen spider ;)
Here is a sample of an error on an HTTP request detail:












