Skip to content
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

Material Library Migration #81

Closed
rivernews opened this issue Nov 28, 2020 · 3 comments · Fixed by #82
Closed

Material Library Migration #81

rivernews opened this issue Nov 28, 2020 · 3 comments · Fixed by #82

Comments

@rivernews
Copy link
Owner

rivernews commented Nov 28, 2020

The official React mdc implementation (by Google) is deprecated, which is surprising and disappointing. However, there're couple few React material community libraries that are promising. Anyway, we'll have to migrate to one of these libraries.

We can start from one or two single places using a new library while trying which library best fit our needs.

We'll target material-ui first since it's the most popular one.

@rivernews
Copy link
Owner Author

rivernews commented Dec 17, 2020

Will need to consider migrate to material UI on other parts of the app since it's making the app crash -
Seems issue is in company detail page, the hasRipple. Sometimes it will crash when using safari:

TypeError: null is not an object (evaluating 't.getBoundingClientRect')
  • Looks like especially happens when react dev server reloads page

@rivernews rivernews reopened this Dec 17, 2020
@rivernews
Copy link
Owner Author

The issue starts occurring in Chrome as well.

TypeError: Cannot read property 'getBoundingClientRect' of null
computeBoundingRect
/packages/ripple/index.tsx:224
  221 |   window.removeEventListener('resize', handler),
  222 | updateCssVariable: this.updateCssVariable,
  223 | computeBoundingRect: () => {
> 224 |   if (!this.isComponentMounted) {
      | ^  225 |     // need to return object since foundation expects it
  226 |     // new DOMRect is not IE11 compatible
  227 |     const defaultDOMRect = {

@rivernews
Copy link
Owner Author

Since the MDC is deprecated, we should migrate to new UI library. Looks like new library will not have this issue. If we got an error crash similar to this, we should try to switch the component to use the one provide by new UI library, in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant