antd-token-previewer icon indicating copy to clipboard operation
antd-token-previewer copied to clipboard

Refactor Plan

Open MadCcc opened this issue 1 year ago • 0 comments

Motivation

Currently [email protected] 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

MadCcc avatar Sep 11 '23 05:09 MadCcc