Replace UnsafeComponent wrapper with ErrorBoundary wrapper in compass-components

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Major - P3
    • 1.31.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • 3
    • Iteration Utica
    • Not Needed

      We'd like to have all of Compass on one react root so that any context, like the current theme of Compass, that is in the tree can be used by contained elements. Currently the UnsafeComponent https://github.com/mongodb-js/compass/blob/main/packages/hadron-react-components/src/unsafe-component.jsx in Compass renders new react roots for the components it wraps. This makes the context not passable from compass-home to pages like compass-aggregations. The views where the unsafe component wrapper is used are the Workspace, Database, and Collection views.
      We currently have an error boundary component in compass-components which we can replace this component with, this will still catch rendering errors, and it will avoid creating more react roots.

      This will involves some style updates in Compass as UnsafeComponent currently has some styling influence.

            Assignee:
            Rhys Howell
            Reporter:
            Rhys Howell
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: