ant-design / antd-token-previewer

https://ant-design.github.io/antd-token-previewer
MIT License
71 stars 21 forks source link

Refactor Plan #211

Open MadCcc opened 12 months ago

MadCcc commented 12 months ago

Motivation

Currently antd-token-previewer@2.x has been released for a while, from a simple component to a complex one with a lot of demos within, which make this component too large with nearly 400kb after gzip.

And for other reasons like package name: https://github.com/ant-design/antd-token-previewer/issues/181 , it is needed to split this repo and make theme-editor dependent.

What to do

  1. Split this repo into 2 or more packages: @ant-design/theme-editor @ant-design/token-previewer and possible demo package.
  2. Use Suspense and React.lazy to split demos after bundled.
  3. Use antd ColorPicker only (Remove react-colorful) and optimize debounced theme change.
  4. To be supplemented