Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

feat: support the monaco editor on example #195

Merged
merged 9 commits into from
Jul 29, 2020
Merged

feat: support the monaco editor on example #195

merged 9 commits into from
Jul 29, 2020

Conversation

NewByVector
Copy link
Contributor

@NewByVector NewByVector commented Jul 21, 2020

  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

Copy link

@tests-checker tests-checker bot left a comment

Choose a reason for hiding this comment

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

Could you please add tests to make sure this change works as expected?

@afc163
Copy link
Contributor

afc163 commented Jul 21, 2020

  1. 使用英文和语义化的 commit messsage。
  2. git 信息绑定有问题。

image

  1. 使用精简有语义的 PR 标题。

image

@NewByVector NewByVector changed the title feat:1.支持monaco编辑器,支持智能提示 2.解决example中G2 demo不能运行的bug feat:support the monaco editor on example Jul 21, 2020
@NewByVector
Copy link
Contributor Author

done

@afc163
Copy link
Contributor

afc163 commented Jul 22, 2020

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

@afc163
Copy link
Contributor

afc163 commented Jul 22, 2020

另外,Semantic Pull Request 还是 ❌ 的。

@NewByVector NewByVector changed the title feat:support the monaco editor on example feat: support the monaco editor on example Jul 22, 2020
@auto-add-label auto-add-label bot added the enhancement New feature or request label Jul 22, 2020
@NewByVector
Copy link
Contributor Author

done

@afc163
Copy link
Contributor

afc163 commented Jul 22, 2020

  • npm run lint 有问题,修复一下,不知道为啥 PR 的 CI 没开启。
  • 这段代码前多了几个空格。

image

  • 拖动中间分隔线的时候,编辑器宽度没有自适应。拖放浏览器宽度同样可重现。

image

  • CodeMirror 直接干掉吧,两个编辑器体积很大的。
  • 如果统一用 Data panel 来放数据,这里代码里的 fetch 是什么意思?是否写法也要改变一下。

image

  • 代码底部有大片空白,导致多余滚动条出现。

image

*/
color(field: string, cfg?: string | string[]): any;
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

能直接使用 G2 自己的定义么,这里都要每个库单独定义一下挺重复和麻烦的。

@NewByVector
Copy link
Contributor Author

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

@afc163
Copy link
Contributor

afc163 commented Jul 23, 2020

解决了的问题请勾掉。

另外 ci 是挂的,请检查。

@afc163
Copy link
Contributor

afc163 commented Jul 23, 2020

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

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

@NewByVector
Copy link
Contributor Author

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

解决了的问题请勾掉。

另外 ci 是挂的,请检查。

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

@@ -91,6 +95,7 @@ module.exports = {
dependencies: {
'@antv/l7': 'beta',
},
extraLib: extraLibDeclare,
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

Choose a reason for hiding this comment

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

每个库单独提供api-extractor.json(api-extractor的配置文件),在gatsby-theme-antv中统一提取.d.ts文件

Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@@ -139,6 +139,7 @@
"access": "public"
},
"devDependencies": {
"@microsoft/api-extractor": "^7.9.2",
Copy link
Contributor

Choose a reason for hiding this comment

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

dependencies

@afc163
Copy link
Contributor

afc163 commented Jul 29, 2020

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

@NewByVector
Copy link
Contributor Author

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

newbyvector

@afc163
Copy link
Contributor

afc163 commented Jul 29, 2020

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request PR: merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants