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: switch to a dynamic theme based on css variables #8545

Merged

Conversation

HyperLife1119
Copy link
Collaborator

@HyperLife1119 HyperLife1119 commented May 23, 2024

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[x] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Application (the showcase website) / infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

[WARNING] Deprecated inline execution of JavaScript has been enabled ("javascriptEnabled") [plugin angular-less]

    components/style/color/bezierEasing.less:110:0:
      110 │ .bezierEasingMixin();
          ╵ ^

  JavaScript found within less stylesheets may be executed at build time. [https://lesscss.org/usage/#less-options]
  Support for "javascriptEnabled" may be removed from the Angular CLI starting with Angular v19.
  The plugin "angular-less" was triggered by this import

要消除 angular-less javascriptEnabled 警告,我们需要将 antd less 文件中的所有 inline-js 用法全部替换为新的 @plugin 用法。

作为第一步,我们需要移除 antd-theme-generator 这个第三方依赖,因为它在内部使用了 inline-js 特性。

ZORRO 使用 antd-theme-generator 生成主题文件(less),用于文档站点的动态主题。在这个 PR 中,我们将文档站点切换到基于 css variables 的动态主题方式。

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

Copy link

zorro-bot bot commented May 23, 2024

This preview will be available after the AzureCI is passed.

Copy link

codecov bot commented May 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.57%. Comparing base (8c247db) to head (072ed21).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #8545   +/-   ##
=======================================
  Coverage   91.57%   91.57%           
=======================================
  Files         532      532           
  Lines       18334    18334           
  Branches     2801     2801           
=======================================
+ Hits        16789    16790    +1     
+ Misses       1227     1226    -1     
  Partials      318      318           

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

Copy link
Collaborator

@Laffery Laffery left a comment

Choose a reason for hiding this comment

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

LGTM

@Laffery Laffery merged commit 23cf3cc into NG-ZORRO:master May 28, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants