Skip to content

Fixed EuiCode's fullscreen mode#3633

Merged
chandlerprall merged 2 commits intoelastic:masterfrom
chandlerprall:bug/3627-euicode-fullscreen
Jun 18, 2020
Merged

Fixed EuiCode's fullscreen mode#3633
chandlerprall merged 2 commits intoelastic:masterfrom
chandlerprall:bug/3627-euicode-fullscreen

Conversation

@chandlerprall
Copy link
Copy Markdown
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

@chandlerprall chandlerprall requested a review from thompsongl June 18, 2020 14:54
@kibanamachine
Copy link
Copy Markdown

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

@chandlerprall
Copy link
Copy Markdown
Contributor Author

Giant network error; jenkins test this

Copy link
Copy Markdown
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
Copy Markdown

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