Browse Source

docs: update d2c/dsm usage

pointhalo 2 years ago
parent
commit
95e0db908d
3 changed files with 82 additions and 37 deletions
  1. 29 13
      README-zh_CN.md
  2. 48 22
      README.md
  3. 5 2
      content/start/faq/index.md

+ 29 - 13
README-zh_CN.md

@@ -58,35 +58,51 @@
 # 🔥 安装
 
 ```sh
-# 使用 npm
 npm install @douyinfe/semi-ui
-
-# 使用 yarn
-yarn add @douyinfe/semi-ui
-
 ```
 
-# 👍 使用
+# 👍 组件使用
 
 这是一个快速开始的例子:
 
 ```jsx
 import React from 'react';
-import ReactDOM from 'react-dom';
-import { Button, Switch } from '@douyinfe/semi-ui';
+import { createRoot } from 'react-dom/client';
+import { Button, Form } from '@douyinfe/semi-ui';
 
 const App = () => (
-    <>
-        <Button type='primary'>primary button</Button>
-        <Switch size='large' />
-    </>
+    <Form>
+        <Form.Input field='name' initValue='semi design'></Form.Input>
+        <Button htmlType='submit'>submit</Button>
+    </Form>
 );
 
-ReactDOM.render(<App />, document.querySelector('#app'));
+const root = createRoot(document.querySelector('#app'));
+root.render(<App />);
 ```
 
 [Semi UI 官网](https://semi.design) 拥有上千个支持实时调试的例子,欢迎体验使用。
 
+# ⚡️ D2C 设计稿转代码
+
+安装插件 [Semi Figma Plugin](https://www.figma.com/community/plugin/1166339852662786534/Semi-Design-%E8%AE%BE%E8%AE%A1%E8%BD%AC%E4%BB%A3%E7%A0%81). 数秒内将 Figma 转为真实前端代码,支持多种出码格式: JSX + SCSS / Emotion/Tailwind、 JSON Schema DSL
+
+- 支持 Figma Devmode,选中图层后,右侧可直接查看对应的真实代码
+  
+![design2code](https://lf3-static.bytednsdoc.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/github/devmode.gif)
+
+- 或跳转至 Codesandbox 进行二次编辑
+  
+![codesandboxdemo](https://lf3-static.bytednsdoc.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/github/1080p-fps5.gif)
+
+
+# 🎨 DSM 设计系统管理
+
+基于 Semi UI 定制你的专属设计系统, 提供高达 2700+ Token 允许你定义每一处细节. 并时刻在 Figma 与主题商店间保持同步。
+
+![dsm-intro](https://lf3-static.bytednsdoc.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/github/dsm-intro.png)
+
+
 # 📰 关注我们的动态
 * [Follow on Twitter](https://twitter.com/SemiDesignUI)
 * [Follow on Medium](https://medium.com/@semi-design)

+ 48 - 22
README.md

@@ -9,9 +9,11 @@
     
 <div align="center">
 
+[![Twitter Follow](https://img.shields.io/twitter/follow/SemiDesignUI?style=social)](https://twitter.com/SemiDesignUI)
+
 [![LICENSE][license-badge]][license-url] [![NPM][npm-badge]][npm-url] [![CONTRIBUTORS][contributors-badge]][contributors-url]  ![Design Token][Design Token] [![FIGMA][figma-badge]][figma-url] 
 [![BUILD-JS][build-js-badge]][build-js-url] [![BUILD-CSS][build-css-badge]][build-css-url] [![CODECOV][codecov-badge]][codecov-url] [![Chromatic][chromatic-badge]][chromatic-url] [![Cypress][cypress-badge]][cypress-url]
-[![Twitter Follow](https://img.shields.io/twitter/follow/SemiDesignUI?style=social)](https://twitter.com/SemiDesignUI)
+
 
 [npm-badge]: https://img.shields.io/npm/v/@douyinfe/semi-ui.svg
 [contributors-badge]: https://img.shields.io/github/contributors/DouyinFE/semi-design
@@ -49,57 +51,73 @@ English | [简体中文](./README-zh_CN.md)
 
 # 🎉 Features
 
-- 💪 Up to 60+ high-quality Components.
-- 💅 Code2Design, automatically generate Figma UI Kit according to different themes, keep same between design and code
-- 🚀 Powerful Design2Code support, convert figma draft to code in a few seconds
+- 💪 Up to 60+ high-quality Components. Stable update since 2019
+- 🚀 Official Design to Code (D2C) support, convert figma draft to real code in a few seconds
+- 💅 Code to Design (C2D), automatically generate Figma UI Kit according to different themes, keep same between design and code
 - 💕 Complete A11y support, follows W3C standards to provide keyboard interaction, focus management and ARIA for all components
-- 💅 Design system management Semi DSM, up to 2000+ Design Tokens, make Semi Design to Any Design quickly.
+- 💅 Design system management Semi DSM, up to 2700+ Design Tokens, make Semi Design to Any Design quickly.
 - 🌍 Internationalization Support for Dozens of Languages, timezone, RTL support
-- ⚙️ Strict quality assurance, covering unit testing, E2E testing, visual testing
+- ⚙️ Strict quality assurance, covering unit testing, E2E testing, visual testing.
 - 👏 Written in Typescript, friendly Static Type Support. Based on Foundation/Adapter architecture, easy to read and contribute
-- 🥳 SSR (Server Side Rendering) Compatible.
+- 🥳 SSR (Server Side Rendering) Compatible. 
 
 # 🔥 Install
 
 ```sh
-# with npm
 npm install @douyinfe/semi-ui
-
-# with yarn
-yarn add @douyinfe/semi-ui
-
 ```
 
-# 👍 Usage
+# 👍 Component Usage
 
 Here is a quick example to get you started, it's all you need:
 
 ```jsx
 import React from 'react';
-import ReactDOM from 'react-dom';
-import { Button, Switch } from '@douyinfe/semi-ui';
+import { createRoot } from 'react-dom/client';
+import { Button, Form } from '@douyinfe/semi-ui';
 
 const App = () => (
-    <>
-        <Button type='primary'>primary button</Button>
-        <Switch size='large' />
-    </>
+    <Form>
+        <Form.Input field='name' initValue='semi design'></Form.Input>
+        <Button htmlType='submit'>submit</Button>
+    </Form>
 );
 
-ReactDOM.render(<App />, document.querySelector('#app'));
+const root = createRoot(document.querySelector('#app'));
+
+root.render(<App />);
 ```
 
-And [Semi UI Doc Site](https://semi.design/en-US/) has hundreds of editable examples and live preview, welcome to play with those examples.
+[Semi UI Doc Site](https://semi.design/en-US/) has hundreds of editable examples and live preview, welcome to play with those examples.
+
+# ⚡️ Design to Code Usage
+
+Install [Semi Figma Plugin](https://www.figma.com/community/plugin/1166339852662786534/Semi-Design-%E8%AE%BE%E8%AE%A1%E8%BD%AC%E4%BB%A3%E7%A0%81). Translate Figma to real code in seconds. Support multiple output formats: JSX + SCSS / Emotion/Tailwind, or JSON Schema DSL
 
+- Support figma devmode, selecting a layer, directly get corresponding code on the right
+  
+![design2code](https://lf3-static.bytednsdoc.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/github/devmode.gif)
+
+- Or jump to codesandbox to continue editing
+  
+![codesandboxdemo](https://lf3-static.bytednsdoc.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/github/1080p-fps5.gif)
+
+
+# 🎨 DSM Usage
+
+Define your own design system base on Semi UI with DSM in one click, Provide more than 2700 tokens for you to configure every detail. Sync between Figma and Code at all times.
+
+![dsm-intro](https://lf3-static.bytednsdoc.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/github/dsm-intro.png)
 
 # 📰 News about Semi UI
 * [Follow on Twitter](https://twitter.com/SemiDesignUI)
 * [Follow on Medium](https://medium.com/@semi-design)
 * [Follow on Dev.to](https://dev.to/semidesign)
 
+
 # 📌 Documentation
 * [Semi DSM](https://semi.design/dsm)
-* [Semi Design2Code](https://semi.design/code/en-US)
+* [Design to Code](https://semi.design/code/en-US)
 * [Semi Figma Plugin](https://www.figma.com/community/plugin/1166339852662786534/Semi-Design-%E8%AE%BE%E8%AE%A1%E8%BD%AC%E4%BB%A3%E7%A0%81)
 * [Quick Start](https://semi.design/en-US/start/getting-started)
 * [Components Overview](https://semi.design/en-US/start/overview)
@@ -112,6 +130,14 @@ And [Semi UI Doc Site](https://semi.design/en-US/) has hundreds of editable exam
 * [FAQ](https://semi.design/en-US/start/faq)
 * [CHANGELOG](https://semi.design/en-US/start/changelog)
 
+# 📝 Blogs
+- [The Evolution of Semi D2C Design to Code](https://juejin.cn/post/7267418854124699702)
+- [How to design component library architecture to adapt to different mvvm frameworks](https://bytedance.feishu.cn/wiki/wikcnOVYexosCS1Rmvb5qCsWT1f)
+- [How we test semi ui](https://medium.com/front-end-weekly/how-we-test-semi-design-component-libraries-64b854f63b65)
+- [In-depth explanation of Semi theme](https://mp.weixin.qq.com/s/noHoWRuA25PgqFNcurhIUA)
+- [Accessibility in Semi Design](https://mp.weixin.qq.com/s/O3js-SZDNPEOjGxh-aAkbw)
+
+
 # 👌 Platform Support
 
 Semi UI supports all major modern browsers.

+ 5 - 2
content/start/faq/index.md

@@ -7,10 +7,13 @@ order: 8
 ---
 
 #### Semi 提供了 Figma UI Kit,考虑提供 Sketch 或基于其他设计工具的版本吗?
-目前没有这方面的计划,具体原因请参考 [Issue 74](https://github.com/DouyinFE/semi-design/issues/74)
+暂无计划,具体原因请参考 [Issue 74](https://github.com/DouyinFE/semi-design/issues/74)
 
 #### Semi 目前提供了基于 React 版本的 ui library,是否有官方提供其他技术栈 lib 的计划?
-无这方面的计划。具体原因:[Issue 311](https://github.com/DouyinFE/semi-design/issues/311),更多讨论 [Issue 56](https://github.com/DouyinFE/semi-design/issues/56)
+暂无计划。具体原因:[Issue 311](https://github.com/DouyinFE/semi-design/issues/311),更多讨论 [Issue 56](https://github.com/DouyinFE/semi-design/issues/56)
+
+#### Semi 后续会提供移动端组件吗 ? 
+暂无计划,具体原因参考 [discussions 287](https://github.com/DouyinFE/semi-design/discussions/287)
 
 #### Semi 的默认的主题风格跟我们系统的定位不符,可以配置另外的主题吗?