-
Notifications
You must be signed in to change notification settings - Fork 472
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Rui Lopes <rgl@ruilopes.com>
53a3db0
to
d5bc1c1
Compare
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" |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 ReportAttention:
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. |
@@ -22,3 +22,7 @@ | |||
|
|||
// Table | |||
@table-row-hover-bg:#e5f2f2; | |||
|
|||
// Font | |||
// see https://github.com/ant-design/antd-init/tree/master/examples/local-iconfont |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
It seemed the simpler solution.
They come from https://github.com/ant-design/antd-init/tree/master/examples/local-iconfont/iconfont.
I guess its the same as the antd library itself.
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). |
@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 |
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.