[COMPASS-5481] Replace UnsafeComponent wrapper with ErrorBoundary wrapper in compass-components Created: 02/Feb/22  Updated: 07/Feb/22  Resolved: 07/Feb/22

Status: Closed
Project: Compass
Component/s: None
Affects Version/s: None
Fix Version/s: 1.31.0

Type: Task Priority: Major - P3
Reporter: Rhys Howell Assignee: Rhys Howell
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Story Points: 3
Documentation Changes: Not Needed
Sprint: Iteration Utica

 Description   

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.



 Comments   
Comment by Githook User [ 07/Feb/22 ]

Author:

{'name': 'Rhys', 'email': 'Anemy@users.noreply.github.com', 'username': 'Anemy'}

Message: chore: Replace UnsafeComponent wrapper component with ErrorBoundary COMPASS-5481 (#2754)
Branch: COMPASS-5417-sort-filters-on-entry-screen
https://github.com/mongodb-js/compass/commit/146d9e1f56b6514e8c124cfa4b552b73edc21596

Comment by Githook User [ 04/Feb/22 ]

Author:

{'name': 'Rhys', 'email': 'Anemy@users.noreply.github.com', 'username': 'Anemy'}

Message: chore: Replace UnsafeComponent wrapper component with ErrorBoundary COMPASS-5481 (#2754)
Branch: 1.31-releases
https://github.com/mongodb-js/compass/commit/146d9e1f56b6514e8c124cfa4b552b73edc21596

Comment by Githook User [ 04/Feb/22 ]

Author:

{'name': 'Rhys', 'email': 'Anemy@users.noreply.github.com', 'username': 'Anemy'}

Message: chore: Replace UnsafeComponent wrapper component with ErrorBoundary COMPASS-5481 (#2754)
Branch: mocha-automock-support
https://github.com/mongodb-js/compass/commit/146d9e1f56b6514e8c124cfa4b552b73edc21596

Comment by Githook User [ 03/Feb/22 ]

Author:

{'name': 'Rhys', 'email': 'Anemy@users.noreply.github.com', 'username': 'Anemy'}

Message: chore: Replace UnsafeComponent wrapper component with ErrorBoundary COMPASS-5481 (#2754)
Branch: COMPASS-5470-improve-dark-theme-toggle-appearance
https://github.com/mongodb-js/compass/commit/146d9e1f56b6514e8c124cfa4b552b73edc21596

Comment by Githook User [ 03/Feb/22 ]

Author:

{'name': 'Rhys', 'email': 'Anemy@users.noreply.github.com', 'username': 'Anemy'}

Message: chore: Replace UnsafeComponent wrapper component with ErrorBoundary COMPASS-5481 (#2754)
Branch: main
https://github.com/mongodb-js/compass/commit/146d9e1f56b6514e8c124cfa4b552b73edc21596

Generated at Wed Feb 07 22:39:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.