Feature/icon breakapart#1856
Merged
chandlerprall merged 17 commits intoelastic:feature/dynamic-euiiconfrom Apr 25, 2019
Merged
Conversation
…i into feature/icon-breakapart
thompsongl
reviewed
Apr 18, 2019
cchaos
approved these changes
Apr 23, 2019
Contributor
cchaos
left a comment
There was a problem hiding this comment.
Did a code check, just two comment spots. But LGTM
thompsongl
approved these changes
Apr 25, 2019
Contributor
thompsongl
left a comment
There was a problem hiding this comment.
Code looks good. Tested locally in docs and Kibana.
Just a note that #1808 becomes a higher priority with these changes as yarn link will likely not work anymore.
chandlerprall
added a commit
that referenced
this pull request
May 7, 2019
…rnal urls (#1924) * Feature/icon breakapart (#1856) * dynamic import * Make the icon kinda work * progress * generate tsx from svg * Build and commit icons TSX * Updated Icon snapshots * Updated EuiIcon build to again work in dependant projects * Create a single eui.js build, bundling EuiIcon's dynamic import into the build * Tests are passing * Add a loading class to EuiIcon * Added -isLoaded and using animations for fading * update snapshots * Remove background color from isLoaded state * PR feedback * Docs for EuiIcon new abilities (#1889) Add docs for the custom svg abilities in EuiIcon * DOCS ONLY: Allow multiple snippets (#1908) * Update IconType and its proptype usage (#1913) * Expand IconType to include string * Update EuiIcon IconType to include Element, fix some TS issues, widen the EuiIcon IconType proptype * Swap Vim example logo out for SVG example logo, which contains a viewBox for IE11 compat * changelog
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(recreating to target feature branch https://github.com/elastic/eui/tree/feature/dynamic-euiicon, some previous conversation from #1822)
Summary
Changes EuiIcon to dynamically load SVGs. This has been tested in Kibana and confirmed to work with the webpack setup there. EuiIcon's tests themselves still snapshot the full, rendered, SVG contents. Other snapshots capture the loading state (as will be the case with downstream tests in Kibana, this should not affect Cloud UI as they already mock EuiIcon).
Note this requires manually running the
yarn compile-iconscommand for any new icon or modifications to an existing one, replacing the manual clearing of jest cache.Caroline is aware of a bug in FF around the loading animation
Checklist
- [ ] Any props added have proper autodocs- [ ] This was checked against keyboard-only and screenreader scenarios- [ ] This required updates to Framer X components