antvis / gatsby-theme-antv

⚛️ Polished Gatsby theme for documentation site
https://gatsby-starter-theme-antv.antv.vision/zh
Other
344 stars 57 forks source link

feat: support the monaco editor on example #195

Closed NewByVector closed 4 years ago

NewByVector commented 4 years ago
  1. support monaco editor by config editorType in gatsby-config.js
  2. support view source data if source code includes fetch statements
  3. fix the error in g2 example
afc163 commented 4 years ago
  1. 使用英文和语义化的 commit messsage。
  2. git 信息绑定有问题。
image
  1. 使用精简有语义的 PR 标题。
image
NewByVector commented 4 years ago

done

afc163 commented 4 years ago

rebase 一下 master,解决一下冲突。

afc163 commented 4 years ago

另外,Semantic Pull Request 还是 ❌ 的。

NewByVector commented 4 years ago

done

afc163 commented 4 years ago
image image image image
NewByVector commented 4 years ago
  1. fetch那里是因为:现在example中fetch写法太多,改动起来成本比较高,暂时不改变原来js写法,只把data显示出来
  2. G2自己的类型定义文件interface.d.ts内容不全,导致不能显示提示。后面会优化每个项目的interface.ts文件,直接读这个文件传给编辑器即可 其他问题已经修复
afc163 commented 4 years ago

解决了的问题请勾掉。

另外 ci 是挂的,请检查。

afc163 commented 4 years ago

fetch那里是因为:现在example中fetch写法太多,改动起来成本比较高,暂时不改变原来js写法,只把data显示出来

可以先改一个看看真实代码的效果。

NewByVector commented 4 years ago
  • [x] npm run lint 有问题,修复一下,不知道为啥 PR 的 CI 没开启。
  • [x] 这段代码前多了几个空格。
image
  • [x] 拖动中间分隔线的时候,编辑器宽度没有自适应。拖放浏览器宽度同样可重现。
image
  • [x] CodeMirror 直接干掉吧,两个编辑器体积很大的。
  • [x] 如果统一用 Data panel 来放数据,这里代码里的 fetch 是什么意思?是否写法也要改变一下。
image
  • [x] 代码底部有大片空白,导致多余滚动条出现。
image

解决了的问题请勾掉。

另外 ci 是挂的,请检查。

  1. 彻底删除codemirror(太粗心了(⊙o⊙)…)
  2. 修复单元测试报错
  3. monaco使用懒加载,解决build下报错
afc163 commented 4 years ago

我发个版本先,@NewByVector 的 npm 账号是多少,我加你权限,之后有问题随时改随时发。

NewByVector commented 4 years ago

我发个版本先,@NewByVector 的 npm 账号是多少,我加你权限,之后有问题随时改随时发。

newbyvector

afc163 commented 4 years ago

https://github.com/antvis/gatsby-theme-antv/releases/tag/0.11.0 published