Skip to content

[CSS-in-JS] Convert EuiErrorBoundary - #6053

Merged
thompsongl merged 6 commits into
elastic:mainfrom
thompsongl:css-in-js/euierrorboundary
Jul 20, 2022
Merged

thompsongl merged 6 commits into
elastic:mainfrom
thompsongl:css-in-js/euierrorboundary

Conversation

@thompsongl

@thompsongl thompsongl commented Jul 14, 2022 •

Copy link
Copy Markdown
Contributor

Summary

Converts EuiErrorBoundary to @emotion styling.
Note that if you run this locally, the error overlay on the Error Boundary docs page is expected.

Checklist

  • Checked in both light and dark modes
  • Checked in mobile
  • Checked in Chrome, Safari, Edge, and Firefox
  • Props have proper autodocs and playground toggles
  • Checked Code Sandbox works for any docs examples
  • Checked for breaking changes and labeled appropriately
  • Checked for accessibility including keyboard-only and screenreader modes
  • A changelog entry exists and is marked appropriately

@thompsongl thompsongl mentioned this pull request Jul 14, 2022
49 tasks done
@kibanamachine

Copy link
Copy Markdown
Contributor

@thompsongl
thompsongl marked this pull request as ready for review July 14, 2022 18:53

@elizabetdev elizabetdev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🎉

I just have a few questions and suggestions. Tested in Chrome, Safari, Edge, and Firefox.

EuiErrorBoundaryProps,
type EuiErrorBoundaryExtendedProps = EuiErrorBoundaryProps & WithEuiThemeProps;

export class _EuiErrorBoundary extends Component<

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this component be converted to a function component?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately it's not yet possible: https://reactjs.org/docs/hooks-faq.html#do-hooks-cover-all-use-cases-for-classes

We need componentDidCatch for this to function and there is no way to achieve that without a class component.

@kibanamachine

Copy link
Copy Markdown
Contributor

@kibanamachine

Copy link
Copy Markdown
Contributor

@kibanamachine

Copy link
Copy Markdown
Contributor

@elizabetdev

Copy link
Copy Markdown
Contributor

@thompsongl it's looking good in Safari 15.4! 🎉

Screenshot 2022-07-20 at 13 51 49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants