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

feat: page material developer #455

Merged
merged 23 commits into from
Aug 28, 2020
Merged

Conversation

sspku-yqLiu
Copy link
Collaborator

No description provided.

@sspku-yqLiu sspku-yqLiu self-assigned this Aug 21, 2020
@sspku-yqLiu
Copy link
Collaborator Author

sspku-yqLiu commented Aug 21, 2020

里程碑

  • 添加页面的 quick pick
  • 生成 add block 风格的 add page 主页面
  • 使用 formily 生成配置页面
  • 面板与插件通信
  • 使用 template-service 完成渲染
  • 功能测试
  • 调整 button 样式、 jsx 合并等
  • 测试
  • self-review
  • 发布后回归测试
  • 使用真实的 template 编写文档

@alvinhui alvinhui changed the base branch from release/0.7.0 to release/0.8.0 August 23, 2020 14:09
@sspku-yqLiu sspku-yqLiu changed the title [WIP] feat: page material developer feat: page material developer Aug 27, 2020
@alvinhui
Copy link
Contributor

alvinhui commented Aug 27, 2020

流程应该跟之前的生成页面一直,有路由配置的功能。

@alvinhui
Copy link
Contributor

template service 应该封装到 page service ,另外部分和 block service 共用的方法考虑能不能封装到 common service ,不需要实现两遍。

"build-plugin-css-assets-local": "^0.1.0",
"build-plugin-fusion": "^0.1.3",
"build-plugin-moment-locales": "^0.1.0",
"ice.js": "^1.0.0",
"typescript": "^3.8.3"
},
"dependencies": {
"@alifd/next": "~1.19.2",
"@alifd/next": "^1.20.28",
Copy link
Contributor

Choose a reason for hiding this comment

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

为什么升级到了 1.20?

Copy link
Collaborator Author

@sspku-yqLiu sspku-yqLiu Aug 28, 2020

Choose a reason for hiding this comment

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

没有刻意升级 应该是 npm run setup 的时候自动变的。
需要回溯到 1.19 吗

Copy link
Contributor

Choose a reason for hiding this comment

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

不要引入不必要的改动


// TODO: 如果规定 templates 的类型为 IMaterialPage[] | IMaterialBlock[]
// 则在 368 行会出现不兼容错误 ts 2349.
export const bulkDownload = async function (templates: any, tmpPath: string, log?: (text: string) => void) {
Copy link
Contributor

Choose a reason for hiding this comment

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

参数名应该叫 materials

Copy link
Contributor

Choose a reason for hiding this comment

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

函数可命名为 bulkDownloadMaterials

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor

Choose a reason for hiding this comment

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

函数命名没有改?

@alvinhui
Copy link
Contributor

reviewed ,请检查所有未关闭的评论。

sspku-yqLiu pushed a commit that referenced this pull request Aug 28, 2020
sspku-yqLiu pushed a commit that referenced this pull request Aug 28, 2020
@sspku-yqLiu
Copy link
Collaborator Author

第二轮修改已经完成,请查收

* docs: update material-ui-builder doc

* docs: update README.md
};

/**
* Download blocks code to page
* Render blocks code to page
Copy link
Contributor

Choose a reason for hiding this comment

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

这个注释有问题,这里已经不是 render blocks to page 了

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

这个是在 block-service 插件里面的
大概流程是这个样子
-- block render
通用下载 --通用安装依赖
-- get schema -- page render(ejs)

Copy link
Contributor

Choose a reason for hiding this comment

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

跟流程没啥关系,这里就是一个渲染区块到指定的文件夹。单个函数的职责是明确的,跟 page 没关系

@alvinhui alvinhui merged commit 5b43b70 into release/0.8.0 Aug 28, 2020
@alvinhui alvinhui deleted the feat/page-material-developer branch August 28, 2020 08:51
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