Skip to content

Comments

Feature/icon breakapart#1856

Merged
chandlerprall merged 17 commits intoelastic:feature/dynamic-euiiconfrom
chandlerprall:feature/icon-breakapart
Apr 25, 2019
Merged

Feature/icon breakapart#1856
chandlerprall merged 17 commits intoelastic:feature/dynamic-euiiconfrom
chandlerprall:feature/icon-breakapart

Conversation

@chandlerprall
Copy link
Contributor

@chandlerprall chandlerprall commented Apr 18, 2019

(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-icons command 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

  • This was checked in mobile
  • This was checked in IE11
  • This was checked in dark mode
    - [ ] Any props added have proper autodocs
  • Documentation examples were added
  • A changelog entry exists and is marked appropriately
  • This was checked for breaking changes and labeled appropriately
  • Jest tests were updated or added to match the most common scenarios
    - [ ] This was checked against keyboard-only and screenreader scenarios
    - [ ] This required updates to Framer X components

Copy link
Contributor

@cchaos cchaos left a comment

Choose a reason for hiding this comment

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

Did a code check, just two comment spots. But LGTM

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.

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 chandlerprall merged commit f2ad01c into elastic:feature/dynamic-euiicon Apr 25, 2019
@chandlerprall chandlerprall deleted the feature/icon-breakapart branch April 25, 2019 20:27
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
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.

3 participants