The Wayback Machine - https://web.archive.org/web/20201108165422/https://github.com/ng-bootstrap/ng-bootstrap/pull/3354
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

refactor(demos): improve icons usage with svg symbols #3354

Open
wants to merge 1 commit into
base: master
from

Conversation

@benouat
Copy link
Member

@benouat benouat commented Sep 5, 2019

Inspired by #3315 I refactored a bit the way we display icons in demos skeleton structure by introducing the usage of svg symbols. (in the demo website, not in the demos themselves)

Unfortunately we just can't use that in the demos themselves, as it would simply not work in Stackblitz.

@benouat benouat force-pushed the benouat:feat/demos/icon-svg-refs branch from 8611a13 to d2b43ad Sep 5, 2019
@codecov-io
Copy link

@codecov-io codecov-io commented Sep 5, 2019

Codecov Report

Merging #3354 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3354   +/-   ##
=======================================
  Coverage   90.88%   90.88%           
=======================================
  Files          95       95           
  Lines        2743     2743           
  Branches      510      510           
=======================================
  Hits         2493     2493           
  Misses        190      190           
  Partials       60       60
Flag Coverage Δ
#e2e 55.01% <ø> (ø) ⬆️
#unit 87.99% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2bd3abc...81077d3. Read the comment docs.

@benouat benouat force-pushed the benouat:feat/demos/icon-svg-refs branch from d2b43ad to 81077d3 Sep 6, 2019
@fbasso
Copy link
Member

@fbasso fbasso commented Sep 6, 2019

Thanks for the PR @benouat !

LGTM.

I have however one remark about SVG and symbol (with no impact for this PR though, but it can feed some future improvements):

I would have preferred implement something with an external link instead of having them inline in the page. It would have taken the advantage of the browser cache, and the svg containing the symbols would have been in the public directory instead of being in the icons component (this would have been more generic by working with the svg you want, no need to embed everything in icons.component.html).

But unfortunately, it comes with a drawback: it doesn't work with IE, so a workaround is necessary, rendering the solution more complex.

So for now, your PR is fine for me, as it improves the SVG usage in the demo !

Copy link
Contributor

@peterblazejewicz peterblazejewicz left a comment

👍 LGTM
Please ship it, as it simplifies DX

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.