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

[WIP] Feat/vue vtable #1709

Open
wants to merge 44 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
8f845f8
feat: add vue component
fangsmile May 14, 2024
45be0e6
chore: add vue eslint rules
fangsmile May 15, 2024
70710a3
Merge remote-tracking branch 'origin/develop' into feat/vue-vtable
fangsmile Jul 10, 2024
4b8c1a4
chore: update depend version
fangsmile Jul 10, 2024
4792cda
feat: add vue-shims.d.ts file for TypeScript module declaration
YELineee Jul 21, 2024
036989b
feat: initial commit
YELineee Jul 21, 2024
9f3b232
feat: register chart module
YELineee Jul 21, 2024
5cc7a4c
feat: update Vue VTable demo with new components and options
YELineee Jul 21, 2024
27408aa
fix: organize the code
YELineee Jul 24, 2024
136e1b5
docs: update changlog of rush
YELineee Jul 25, 2024
34b4585
Merge pull request #2128 from YELineee/feat-vue
fangsmile Jul 30, 2024
c2600f9
feat: improving options handling for grammatical tag
YELineee Aug 5, 2024
c29d3f8
feat: add ListColumn component
YELineee Aug 5, 2024
73ddc33
feat: add new components and options to Vue VTable demo
YELineee Aug 5, 2024
952bcdc
Merge pull request #2179 from YELineee/feat-vue
fangsmile Aug 5, 2024
bd50745
feat: grammatical tags enhancement
YELineee Aug 6, 2024
b043545
fix: watcher for prop not updating correctly
YELineee Aug 6, 2024
3c8a878
fix: modified some demos
YELineee Aug 6, 2024
69a0e4e
feat: add PivotChartPie component to demo
YELineee Aug 7, 2024
22fa56d
Merge pull request #2187 from YELineee/feat-vue
fangsmile Aug 8, 2024
37ee3db
refactor: remove unused Vue VTable components
YELineee Aug 9, 2024
8d23ec7
feat: new VTable components in Vue using TSX with TypeScript
YELineee Aug 9, 2024
0bfc2d7
feat: add demo use editor
YELineee Aug 9, 2024
1ca48a3
feat: optimize Vue VTable components and add new features
YELineee Aug 13, 2024
5b8b5f5
feat: update Vue VTable demo
YELineee Aug 13, 2024
7f57596
Merge pull request #2222 from YELineee/feat-vue
fangsmile Aug 13, 2024
661eddd
feat: update @vitejs/plugin-vue for rollup build
YELineee Aug 13, 2024
f033dbd
Merge branch 'feat/vue-vtable' into feat-vue
YELineee Aug 13, 2024
8f3c5b7
Merge pull request #2224 from YELineee/feat-vue
fangsmile Aug 13, 2024
192e2cc
Revert "Merge branch 'feat/vue-vtable' into feat-vue"
YELineee Aug 14, 2024
038c03f
feat: update rollup-plugin-typescript2@0.36.0
YELineee Aug 14, 2024
d35ff2c
fix: optimize Vue VTable components
YELineee Aug 14, 2024
3031d1c
Merge pull request #2235 from YELineee/feat-vue
fangsmile Aug 15, 2024
fbec15a
feat: add cunstom demo
YELineee Aug 21, 2024
717e0be
feat: add CustomLayout component
YELineee Aug 21, 2024
9b5e158
feat: add createCustomLayout function in utils.ts
YELineee Aug 21, 2024
e987c76
fix: watcher in base-table
YELineee Aug 21, 2024
bb4795b
feat: optimize list-table.vue by adding createCustomLayout function
YELineee Aug 21, 2024
cac1629
feat: add custom layout component currently under testing
YELineee Aug 21, 2024
55bbe50
Merge pull request #2280 from YELineee/feat-vue
fangsmile Aug 23, 2024
79c9ebe
fix: custom layout for grammatical tag handling
YELineee Sep 1, 2024
3162fc8
feat: add ListTableCustom component for custom layout in demo
YELineee Sep 1, 2024
3696a5e
chore: clean up unused code and comments in src
YELineee Sep 1, 2024
e51183a
Merge pull request #2348 from YELineee/feat-vue-vtable
fangsmile Sep 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feaure_request.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Feature Request
description: Request a new feature from @VisActor/vtable
title: '[Feature] '
labels: [feature]
labels: [new-feature]
body:
- type: markdown
attributes:
Expand Down
14 changes: 2 additions & 12 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
# Add 'vtable' label to any change within the 'vtable' package
vtable:
# Add 'core' label to any change within the 'core' package
core:
- packages/vtable/**

# Add 'react-vtable' label to any change within the 'react-vtable' package
react-vtable:
- packages/react-vtable/**

# Add 'openinula-vtable' label to any change within the 'openinula-vtable' package
openinula-vtable:
- packages/openinula-vtable/**

# Add 'test' label to any change to packages/*/__tests__/* files within the source dir
test:
- packages/*/__tests__/*
Expand Down Expand Up @@ -42,5 +34,3 @@ bundler:
# Add 'chore' label to any change to common/** files within the source dir
chore:
- common/**
- .github/**
- .vscode/**
2 changes: 1 addition & 1 deletion .github/workflows/label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ jobs:
pull-requests: write

steps:
- uses: actions/labeler@v4
- uses: actions/labeler@master
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
238 changes: 41 additions & 197 deletions CONTRIBUTING.md

Large diffs are not rendered by default.

254 changes: 48 additions & 206 deletions CONTRIBUTING.zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,240 +1,82 @@
# VTable 开源代码贡献指南
# 贡献指南

首先为你选择加入开源贡献行列的行为点赞 👍🏻。再者,十分感谢你选择参与到 VisActor 社区,为这个开源项目做出贡献
首先非常感谢你能抽出时间为我们的开源项目做贡献。希望这份指南能够清晰地阐明贡献过程并回答你可能有的一些问题,所以请你在提 issue 或者 pull request 之前花几分钟时间阅读

## VTable 贡献指南
## 行为准则

VisActor 团队通常在 github 上进行开发和 issue 维护,请打开 [Github 网站](https://github.com/),点击右上角 `Sign up` 按钮,注册一个自己的账号,开启你开源之旅的第一步
我们有一份[行为准则](CODE_OF_CONDUCT.md),希望所有的贡献者都能遵守,请花时间阅读一遍全文以确保你能明白哪些是可以做的,哪些是不可以做的

如果因为特殊情况,你无法打开 Github 站点,也可以通过 [Gitee](https://gitee.com/VisActor/VTable) 进行项目开发。
## 透明的开发

在 [VTable 仓库](https://github.com/VisActor/VTable)中,我们有一份面向所有开源贡献者的[指南](https://github.com/VisActor/VTable/blob/develop/CONTRIBUTING.zh-CN.md),介绍了有关版本管理、分支管理等内容,**请花几分钟时间阅读了解一下**
我们所有的工作都会放在 [GitHub](https://github.com/VisActor/) 上。不管是核心团队的成员还是外部贡献者的 pull request 都需要经过同样流程的 review

## 你的第一个 PullRequest
## 版本管理

### Step1:安装 Git
VTable 遵循[语义化版本控制](https://semver.org/lang/zh-CN/)。我们发布 patch 补丁版本以修复重要的错误,发布 minor 次要版本以提供新功能或非必要的更改,发布 major 主要版本以适应任何重大更改。当我们进行重大更改时,在次要版本中还会引入弃用警告,以便用户了解即将到来的更改并提前迁移代码。

Git 是一种版本控制系统,用于跟踪和管理软件开发项目中的代码变更。它帮助开发者记录和管理代码的历史记录,方便团队协作、代码版本控制、合并代码等操作。通过 Git,您可以追踪每个文件的每个版本,并轻松地在不同版本之间进行切换和比较。Git 还提供了分支管理功能,使得可以同时进行多个并行开发任务
每个重要的更改我们都会记录在对应项目 CHANGELOG 更新日志中

- 访问 Git 官方网站:<https://git-scm.com/>
- 下载最新版本的 Git 安装程序。
- 运行下载的安装程序,按照安装向导的提示进行安装。
- 安装完成后,你可以通过命令行使用 `git version` 命令确认安装成功。
## 发布周期

<div style="width: 80%; text-align: center;">
<img src="https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/guide/contribution_1.png" />
</div>
- patch 修订版本号:todo
- minor 次版本号:todo
- major 主版本号:todo

### Step2:Fork 项目
## 分支管理

- 首先需要 fork 这个项目,进入[VTable 项目页面](https://github.com/VisActor/VTable),点击右上角的 Fork 按钮
<!-- TODO:待讨论 -->

<div style="width: 80%; text-align: center;">
<img src="https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/guide/contribution_2.png" />
</div>
**请将所有的更改提交到 `main` 主分支**。我们不使用单独的分支进行开发或即将发布的版本管理。我们尽力保持主分支良好状态,确保所有测试都能通过。

- 你的 github 帐号中会出现 xxxx(你的 github 用户名)/VTable 这个项目
- 在本地电脑上使用以下命令: 得到一个 VTable 文件夹
这里需要注意,所有进入主分支的代码必须与最新的稳定版本兼容,它可能包含其他功能,但不能有任何破坏性更改。我们应该能够随时从主分支的末端发布一个新的次要版本。

```
// ssh
git clone git@github.com:xxxx(你的github用户名)/VTable.git
// https
git clone https://github.com/xxxx(你的github用户名)/VTable.git
```
## Bugs 管理

### Step3:获取项目代码
我们使用 [GitHub Issues](todo) 来追踪所有的缺陷。无论内外部的缺陷,我们都会在 issues 上进行管理,尽量让一切公开、清晰明了。在你报告一个 bug 之前,请先确保已经搜索
过已有的 issues。

- 进入 VTable 文件夹,添加 VTable 的远程地址
如果你想要你发现的 bug 被快速解决,最好的办法就是根据我们提供的 issue 模板进行提问,只需要进入 [New issue](todo) 页面,然后选择其中任意一个开始即可,最好能使用这个[模板](todo) 来提供复现的示例代码。

```
git remote add upstream https://github.com/VisActor/VTable.git
```
## 提交变更建议

- 获取 VTable 最新源码
如果你有改进我们的配置项、接口或者新增功能的想法,我们同样推荐你通过 issue 进行提问,或者进入我们的 [New issue](todo) 页面,选择相应的 issue 模板进行提交,

```
git pull upstream develop
```
如果你准备帮助我们修复一个 bug,那么你可以立即提交一个 pull request 请求,但我们仍然建议你先创建一个 issue 并在 issue 中详细说明将要修复的内容,这样可以帮助我们更好得追踪问题。

### Step4:创建分支
## 你的第一个 Pull Request

- 好了,现在可以开始贡献我们的代码了。VTable 默认分支为 develop 分支。无论是功能开发、bug 修复、文档编写,都请新建立一个分支,再合并到 develop 分支上。使用以下代码创建分支:
`
如果你还不清楚怎么在 GitHub 上提 Pull Request ,可以阅读下面这篇文章来学习:[如何优雅地在 GitHub 上贡献代码](https://segmentfault.com/a/1190000000736629)

```
// 创建功能开发分支
git checkout -b feat/xxxx
为了能帮助你开始你的第一次尝试,我们用[good first issues](todo)标记了一些比较容易修复的 bug 和小功能。这些 issue 可以很好地作为你的首次尝试。

// 创建问题修复开发分支
git checkout -b fix/xxxx
如果你打算开始处理一个 issue,请先检查一下 issue 下面的留言以确保没有别人正在处理这个 issue。如果当前没有人在处理的话你可以留言告知其他人你将会处理这个 issue,以免别人重复劳动。

// 创建文档、demo分支
git checkout -b docs/add-funnel-demo
```
如果之前有人留言说会处理这个 issue 但是一两个星期都没有动静,那么你也可以接手处理这个 issue,当然还是需要留言告知其他人。

假设我们创建了文档修改分支 `docs/add-funnel-demo`
### 如何发送 Pull Request

- 现在我们可以在分支上更改代码了
- 假设我们已经添加了一些代码,提交到代码库
- git commit -a -m "docs: add custom funnel demo and related docs" 。VisActor 的 commit 提交信息遵循 [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) 规范
VisActor 团队会关注所有的 pull request,我们会 review 以及合并你的代码,也有可能要求你做一些修改或者告诉你我们为什么不能接受这样的修改。我们将尽最大努力在整个过程中提供及时的更新和反馈。

- `<type>[optional scope]: <description>`
- 其中常用 `type`包括 docs(文档、日志修改)、feat(新功能)、fix(问题修复)、refactor(代码重构)等,请根据实际情况选择。
- 请用简短精确的英文描述编写 description
- 提交 commit 之前,我们会进行 commit lint 检查,具体可以查看[检查规则](https://github.com/VisActor/VTable/blob/develop/common/autoinstallers/lint/commitlint.config.js)
在**你发送 Pull Request 之前**,请确认你是按照下面的步骤来做的:

### Step5:合并修改
<!-- TODO: 待完善 -->

- 一个常见的问题是远程的 upstream (@visactor/VTable) 有了新的更新, 从而会导致我们提交的 Pull Request 时会导致冲突。 因此我们可以在提交前先把远程其他开发者的 commit 和我们的 commit 合并。使用以下代码切换到 develop 分支:
1. 基于 `main` 分支做修改
2. (如果你已经安装,请跳过此步骤)全局安装 [@microsoft/rush](https://rushjs.io/pages/intro/get_started/):`npm i --global @microsoft/rush`
3. 根目录下运行 `rush update --full`
4. 如果你修复了一个 bug 或者新增了一个功能,请确保写了相应的测试,这很重要。
5. 确认所有的测试都是通过的 `rush test`。 小贴士:开发过程中可以用 `rush test -- --watch TestName` 来运行指定的测试。
6. 确保你的代码通过了 lint 检查 `rush lint`. 小贴士: Lint 会在你 git commit 的时候自动运行(通过 Git Hooks)。
7. 运行 `rush compile` 进行 ts 类型检测。

```
git checkout develop
```
## 开发流程

- 使用以下代码拉出远程的最新代码:
在你 clone 了 VTable 的代码并且使用 `rush update --full` 安装完依赖后,你还可以运行下面几个常用的命令:

```
git pull upstream develop
```
1. `rush start` 在本地运行 VTable 代码的测试页面
2. `rush eslint` 运行所有项目的 eslint 脚本
3. `rush test` 运行所有项目的 test 脚本
4. `rush run -p <project_name> -s <script>` 运行指定项目的指定脚本,eg. `rush run -p @visactor/vtable -s start`
5. `rush prettier --dir <project_relative_path> --ext <file_type>` 格式化指定项目的源代码,eg. `rush prettier --dir packages/vtable --ext ts`

- 切换回自己的开发分支:

```
git checkout docs/add-funnel-demo
```

- 把 develop 的 commit 合并到 `add-funnel-demo`:

```
git rebase develop
```

- 把更新代码提交到自己的分支中:

```
git push origin docs/add-funnel-demo
```

### Step6:提交 Pull Request

你可以在你的 github 代码仓库页面点击 `pull requests` 按钮,点击`New pull request`。

<div style="width: 80%; text-align: center;">
<img src="https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/guide/contribution_3.png" />
</div>

选择提交到 develop 分支。

按照模板填写本次提交的修改内容:

- 勾选这是什么类型的修改
<div style="display: flex;">
<div style="width: 30%; text-align: center; ">
<img src="https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/guide/contribution_4.png" />
</div>
</div>

- 填写关联的 issue
<div style="display: flex;">
<div style="width: 20%; text-align: center;">
<img src="https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/guide/contribution_5.png" />
</div>
</div>

- 若有复杂变更,请说明背景和解决方案
<div style="display: flex;">
<div style="width: 60%; text-align: center;">
<img src="https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/guide/contribution_6.png" />
</div>
</div>
相关信息填写完成后,点击 Create pull request 提交。

## Mini Task 开发指南

"**good first issue**" 是一个在开源社区常见的标签,这个标签的目的是帮助新贡献者找到适合入门的问题。

VTable 的入门问题,你可以通过 [issue 列表](https://github.com/VisActor/VTable/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) 查看,目前包括两类:

- Demo 编写
- bug 修复及简单功能开发

如果你当前**有时间和意愿**参与到社区贡献,可以在 issue 里看一看 **good first issue**,选择一个感兴趣、适合自己的认领。

相信你一定是一个有始有终的同学,所以,当你了解并决定认领一个 issue 后,请在 issue 下留言告知大家。

### Demo Task

我们准备了一些在实际应用场景中常见的案例,需要思考如何利用 VTable 的能力实现。

你可以通过这类任务,上手对 VTable 的使用。VTable 提供了丰富的能力,每个人或许都有不同的实现思路,**你可以在 issue 下留言,和大家讨论自己的方案**。

任务完成后,你可以将自己制作的案例提交到官网 demo,让更多需要的人学习和使用。

所有的 demo 存放在 `docs/assets/demo` 目录下

1. 请基于 develop 分支,新拉一个 `docs/***`分支进行开发

1. (如果你已经安装,请跳过此步骤)全局安装 [@microsoft/rush](https://rushjs.io/pages/intro/get_started/):`npm i --global @microsoft/rush`

1. 根目录下运行 `rush update`

1. 运行`rush docs` 在本地预览目前 demo 内容

1. `docs` 目录下

1. `docs/assets/demo/menu.json` 目录文件中添加你的 demo 信息
1. 在`zh`/`en`目录下分别完成中英文 demo 文档
1. 封面地址 cover 字段 可以联系 vtable 的团队成员帮忙上传。

1. 提交所有代码,并在 Github 创建 Pull Request,邀请其他人进行 review

### Bug fix/Feature Task

我们准备了一些简单、易上手的特性开发任务,如果你有一定的 Javascript / Typescript 基础,可以认领这类任务。

你可以通过 bug 的修复及需求的开发过程,从而更快地了解 VTable 代码架构。**你可以在 issue 下留言,和大家讨论自己的方案**。

1. 请基于 develop 分支,新拉一个 `feat/***` or `fix/***`分支进行开发
1. (如果你已经安装,请跳过此步骤)全局安装 [@microsoft/rush](https://rushjs.io/pages/intro/get_started/):`npm i --global @microsoft/rush`。

常用的项目命令行如下:

```
# 注释:安装依赖。 install dependencies
$ rush update
# 注释:进入vtable目录。 enter vtable package
$ cd packages/vtable
# 注释:启动开发测试页面。 execute in file path: ./packages/vtable
$ rushx demo
# 注释:在外层目录启动官网页面。 start site development server, execute in file path: ./
$ rush docs
# 注释:提交代码后生成changelog。 after execut git commit, please run the following command to update the change log. Please execute in file path: ./
$ rush change-all
```


4. 提交所有代码,并在 Github 创建 Pull Request,邀请其他人进行 review



### 推广任务贡献指南

推广任务是指你将和VisActor相关的文章、demo、视频 等素材,公开发布到各种媒体渠道的行为。
你可以新建一个 issue,类型选择 `others` 打上 `promotion` 的标签,然后将相关链接,截图,简介等一起发布即可。
例如:[https://github.com/VisActor/VChart/issues/2858](https://github.com/VisActor/VChart/issues/2858)

每个季度我们会评选一些推广VisActor的作品,给予作者一定的物质奖励。

## 拥抱 VisActor 社区

在你为 VisActor 贡献代码之余,我们鼓励你参与其他让社区更加繁荣的事情,比如:

1. 为项目的发展、功能规划 等提建议
1. 创作文章、视频,开办讲座来宣传 VisActor
1. 撰写推广计划,同团队一同执行

VisActor 也在努力帮助参与社区建设的同学一同成长,我们计划(但不限于,期待大家更多的建议)提供如下帮助:

1. 以 VisActor 为基础的数据可视化研发培训,帮助参与的同学在编程技能、可视化理论、架构设计等多个方面快速成长。
1. 定期评选“代码贡献奖”和“社区推广奖”
1. 组织社区成员参与开源活动
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ $ rush docs

# 🤝 Contribution

If you would like to contribute, please read the [Code of Conduct ](./CODE_OF_CONDUCT.md) and [ Guide](./CONTRIBUTING.md) first。
If you would like to contribute, please read the [Code of Conduct ](./CODE_OF_CONDUCT.md) and [ Guide](./CONTRIBUTING.zh-CN.md) first。

Small streams converge to make great rivers and seas!

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"changes": [
{
"comment": "fix: getCellAtRelativePosition api return value #2054\n\n",
"comment": "fix: organize the code\n\n",
"type": "none",
"packageName": "@visactor/vtable"
}
],
"packageName": "@visactor/vtable",
"email": "892739385@qq.com"
"email": "1638317920@qq.com"
}

This file was deleted.

7 changes: 0 additions & 7 deletions common/config/rush/command-line.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,6 @@
"summary": "Start the document development server",
"description": "Run this command to start document development server",
"shellCommand": "rush run -p @visactor/table -s build:es && rush run -p @internal/docs -s start"
},
{
"commandKind": "global",
"name": "sync-bnpm",
"summary": "Sync bnpm",
"description": "Sync bnpm",
"shellCommand": "bnpm sync @visactor/vtable && bnpm sync @visactor/vtable-editors && bnpm sync @visactor/react-vtable && bnpm sync @visactor/openinula-vtable && bnpm sync @visactor/vtable-export && bnpm sync @visactor/vtable-search"
}
],
"parameters": [
Expand Down
Loading
Loading