-
Notifications
You must be signed in to change notification settings - Fork 841
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EuiCodeBlock organization: REFACTOR ALL THE THINGS
- Fixing the virtualization bug got me frustrated with working on the component. Various bits of different state and logic were scattered all over 450~ lines and made jumping up and down the file relatively annoying. I decided to split this component up into several different hook/sub-component helpers based on several different complex pieces of functionality: - overflow detection & observers - copy functionality - full screen functionality - virtualization This cleanup also: - gets us to 100% statement coverage (woo) - removes the need for certain lint disable comments (good times with ...rest) TBH, the file is still a little meaty to get through though the organization helps, if we continue to add more functionality to EuiCodeBlock it would be worth considering splitting up the separate sections/helpers into their own files.
- Loading branch information
Showing
3 changed files
with
349 additions
and
296 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.