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

docs: update development documentation #8

Merged
merged 23 commits into from
Dec 4, 2023
Merged

docs: update development documentation #8

merged 23 commits into from
Dec 4, 2023

Conversation

chenos
Copy link
Contributor

@chenos chenos commented Nov 21, 2023

No description provided.

@chenos chenos changed the title docs: update i18n documentation docs: update development documentation Nov 27, 2023
@@ -0,0 +1,85 @@
# SchemaSettings 设置器

激活 UI 配置之后,鼠标放到指定区块、表单、操作上方时,会显示对应的 Schema 工具栏,工具栏的设置图标就是当前 Schema 的设置器。
Copy link
Contributor

Choose a reason for hiding this comment

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

  1. “操作上方” 改为 "操作按钮上方"
  2. "工具栏的设置图标" 语言太干涩,如果只是这样说,别人也不知道什么是工具栏的设置图标,还是建议截个图放在最上面

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  1. 操作是名称的,鼠标放到指定区块、字段、操作上方时 字打错了,区块、字段、操作是三个特指,都是名称,UI 配置里最核心单独三个东西
  2. 这里还缺个截图


## 常用的设置器

<img src="./SchemaSettings.png" />
Copy link
Contributor

Choose a reason for hiding this comment

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

这个图感觉不是很有必要,写在这里几乎没啥用

Copy link
Contributor Author

@chenos chenos Nov 30, 2023

Choose a reason for hiding this comment

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

有用的,这样划分之后,看起来会清晰很多(这个图还没梳理完整)
还有就是图里的标识也还没补充(现在有的也没有),有标识了可以快速定位到是哪个 settings
没有标识,扩展的时候都不知道 name 要填的啥
也会加个链接,快速的看到所有 settings 的标识和 item 标识,


## 向已有的设置器里添加设置项

使用 `schemaSettingsManager.addItem()` 方法添加
Copy link
Contributor

Choose a reason for hiding this comment

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

这里可以把 hello 的那个截图添加到这里

Copy link
Contributor Author

Choose a reason for hiding this comment

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

这里打算加个 demo 示例的

```ts
class PluginSampleSchemaInitializer extends Plugin {
async load() {
const myInitializer = new SchemaInitializer({
Copy link
Contributor

Choose a reason for hiding this comment

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

  1. 建议将 new 的逻辑放到 Plugin 外面,都写在 load 里不太好
  2. 这里写的是 Initializer 不是 settings,这篇是 settings 的文章

Copy link
Contributor Author

Choose a reason for hiding this comment

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

不合适的,因为插件是实例化的,放外面会造成全局污染

}
```

### 在特定 Schema 中使用
Copy link
Contributor

Choose a reason for hiding this comment

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

应该把这个章节放到 "自主渲染设置器按钮" 下面,标题改为 “内置 Settings 渲染器的组件”

@@ -0,0 +1,86 @@
# SchemaInitializer 初始化器

当激活 UI 配置之后,界面上直观可见的各种橙色按钮就是 SchemaInitializer 初始化器,用于向界面内添加各种区块、字段、操作等。
Copy link
Contributor

Choose a reason for hiding this comment

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

“操作” 改为 “操作按钮”,操作是动词


## 向已有的初始化器里添加项

使用 `schemaInitializerManager.addItem()` 方法添加
Copy link
Contributor

Choose a reason for hiding this comment

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

添加一个截图

}
```

### 在特定 Schema 中使用
Copy link
Contributor

Choose a reason for hiding this comment

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

放到 “自主渲染” 的下面,标题改为 “内置 Initializer 渲染器的组件”

@chenos chenos merged commit 1fbab25 into main Dec 4, 2023
1 check failed
@chenos chenos deleted the docs/i18n-next branch December 4, 2023 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants