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

add iconfont to remove the dependency on the external cdn #516

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rgl
Copy link

@rgl rgl commented Feb 5, 2020

Which problem is this PR solving?

This closes #187

It would be nice not using the absolute address in @icon-url: "/iconfont/iconfont" but I didn't find a way.

The fonts came from the upstream https://github.com/ant-design/antd-init/tree/master/examples/local-iconfont repo.

This also adds a GitHub Actions Workflow to build and archive the result in the workflow result.

Signed-off-by: Rui Lopes <rgl@ruilopes.com>
@rgl rgl force-pushed the feature-add-github-actions branch from 53a3db0 to d5bc1c1 Compare February 5, 2020 19:01
@yurishkuro
Copy link
Member

Why do we need to commit the font files to this repo? Where are they from? Which license? Couldn't we download them from an official location during build time?


// Font
// see https://github.com/ant-design/antd-init/tree/master/examples/local-iconfont
@icon-url: "/iconfont/iconfont"
Copy link
Member

Choose a reason for hiding this comment

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

wouldn't this break people who're using --query.base-path option?

Copy link
Author

Choose a reason for hiding this comment

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

I think it will. But I don't known enough about this antd library to known how to make that configurable. I think its worse to use the cdn than working around that at the http server level.

@codecov
Copy link

codecov bot commented Feb 5, 2020

Codecov Report

Attention: 13 lines in your changes are missing coverage. Please review.

Comparison is base (8cb13c4) 92.92% compared to head (691414c) 96.57%.
Report is 751 commits behind head on main.

❗ Current head 691414c differs from pull request most recent head d5bc1c1. Consider uploading reports for the commit d5bc1c1 to get more accurate results

Files Patch % Lines
.../jaeger-ui/src/components/QualityMetrics/index.tsx 93.87% 3 Missing ⚠️
...r-ui/src/components/Monitor/ServicesView/index.tsx 98.37% 2 Missing ⚠️
...components/SearchTracePage/SearchResults/index.tsx 90.00% 2 Missing ⚠️
...aeger-ui/src/actions/path-agnostic-decorations.tsx 97.91% 1 Missing ⚠️
packages/jaeger-ui/src/components/App/TopNav.tsx 94.44% 1 Missing ⚠️
...rc/components/DeepDependencies/SidePanel/index.tsx 96.77% 1 Missing ⚠️
...jaeger-ui/src/components/DependencyGraph/index.jsx 95.83% 1 Missing ⚠️
...ger-ui/src/components/Monitor/EmptyState/index.tsx 92.85% 1 Missing ⚠️
...c/components/Monitor/ServicesView/serviceGraph.tsx 98.18% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #516      +/-   ##
==========================================
+ Coverage   92.92%   96.57%   +3.64%     
==========================================
  Files         197      254      +57     
  Lines        4808     7620    +2812     
  Branches     1160     1986     +826     
==========================================
+ Hits         4468     7359    +2891     
+ Misses        299      261      -38     
+ Partials       41        0      -41     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -22,3 +22,7 @@

// Table
@table-row-hover-bg:#e5f2f2;

// Font
// see https://github.com/ant-design/antd-init/tree/master/examples/local-iconfont
Copy link
Member

Choose a reason for hiding this comment

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

That repo appears to be archived. What is the risk of using it?

Copy link
Author

Choose a reason for hiding this comment

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

There is no risk because the fonts were included in this MR. I've only placed that comment to hint from where the fonts came from.

And from what I understood, it was only archived because newer versions of antd library no longer use the cdn.

@rgl
Copy link
Author

rgl commented Feb 5, 2020

Why do we need to commit the font files to this repo?

It seemed the simpler solution.

Where are they from?

They come from https://github.com/ant-design/antd-init/tree/master/examples/local-iconfont/iconfont.

Which license?

I guess its the same as the antd library itself.

Couldn't we download them from an official location during build time?

I guess we could download them at runtime from https://github.com/ant-design/antd-init/tree/master/examples/local-iconfont/iconfont, or even fork that repo and make a proper release of it, or upgrade to a newer version of the antd library (which no longer depends on the cdn).

@everett980
Copy link
Collaborator

or upgrade to a newer version of the antd library (which no longer depends on the cdn)

@rgl it seems to me that this could be the simplest option. though it will require manually checking and potentially fixing any styles that override antd

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.

Remove the dependency on alicdn.com
3 participants