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

Fixed EuiCode's fullscreen mode #3633

Merged

Conversation

chandlerprall
Copy link
Contributor

@chandlerprall chandlerprall commented Jun 18, 2020

Summary

Fixes #3627

The fullscreen code container's ref wasn't being set in time the useEffect fired to set its content. This PR moves that ref into a state variable and creates a separate useEffect to fill it. I added a test and verified it fails without the accompanying changes to EuiCodeBlockImpl.

Not sure when/how this bug was introduced, I checked the published docs for the previous 2 PRs touching this file, and fullscreen mode works in both. Perhaps there's a difference in React's dev & production builds affecting this?

Checklist

- [ ] Check against all themes for compatibility in both light and dark modes

  • Checked in mobile
  • Checked in IE11 and Firefox
    - [ ] Props have proper autodocs
    - [ ] Added documentation
    - [ ] Checked Code Sandbox works for the any docs examples
  • Added or updated jest tests
  • Checked for breaking changes and labeled appropriately
    - [ ] Checked for accessibility including keyboard-only and screenreader modes
  • A changelog entry exists and is marked appropriately

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_3633/

@chandlerprall
Copy link
Contributor Author

Giant network error; jenkins test this

Copy link
Contributor

@thompsongl thompsongl left a comment

Choose a reason for hiding this comment

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

Thanks!

We'll probably want to make a release with this today to patch

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_3633/

@chandlerprall chandlerprall merged commit 6189d86 into elastic:master Jun 18, 2020
@chandlerprall chandlerprall deleted the bug/3627-euicode-fullscreen branch June 18, 2020 16:22
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 this pull request may close these issues.

EuiCode fullscreen feature broken on example pages
3 participants