Skip to content

Commit 22a8b64

Browse files
authored
Merge pull request #4498 from VisActor/release/2.0.18
[Auto release] release 2.0.18
2 parents 10b51f3 + 1aa6e1b commit 22a8b64

73 files changed

Lines changed: 4404 additions & 264 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changelog/en.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
1-
# v2.0.17
1+
# v2.0.18
2+
3+
2026-03-05
4+
5+
**🆕 New Features**
6+
7+
- **@visactor/vchart**: feat: optimiz workflows for release
8+
29

3-
2026-02-26
410

511
**🐛 Bug Fixes**
612

7-
- **@visactor/vchart**: fix: support functional alternateColor in axis grid configuration
13+
- **@visactor/vchart**: fix: ensure DataZoom updates when data source changes (Issue #4185)
14+
- **@visactor/vchart**: fix: fix default lineWidth for heatmap label
15+
16+
17+
- **@visactor/vchart**: fix: Fix memory leaks in Player component and BaseComponent release logic.
818

9-
**Full Changelog**: https://github.com/VisActor/VChart/compare/v2.0.16...v2.0.17
19+
**Full Changelog**: https://github.com/VisActor/VChart/compare/v2.0.17...v2.0.18
1020

11-
[more detail about v2.0.17](https://github.com/VisActor/VChart/releases/tag/v2.0.17)
21+
[more detail about v2.0.18](https://github.com/VisActor/VChart/releases/tag/v2.0.18)

.changelog/harmony.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
1-
# v2.0.17
1+
# v2.0.18
2+
3+
2026-03-05
4+
5+
**🆕 New Features**
6+
7+
- **@visactor/vchart**: feat: optimiz workflows for release
8+
29

3-
2026-02-26
410

511
**🐛 Bug Fixes**
612

7-
- **@visactor/vchart**: fix: support functional alternateColor in axis grid configuration
13+
- **@visactor/vchart**: fix: ensure DataZoom updates when data source changes (Issue #4185)
14+
- **@visactor/vchart**: fix: fix default lineWidth for heatmap label
15+
16+
17+
- **@visactor/vchart**: fix: Fix memory leaks in Player component and BaseComponent release logic.
818

9-
**Full Changelog**: https://github.com/VisActor/VChart/compare/v2.0.16...v2.0.17
19+
**Full Changelog**: https://github.com/VisActor/VChart/compare/v2.0.17...v2.0.18
1020

11-
[more detail about v2.0.17](https://github.com/VisActor/VChart/releases/tag/v2.0.17)
21+
[more detail about v2.0.18](https://github.com/VisActor/VChart/releases/tag/v2.0.18)

.changelog/zh.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1-
# v2.0.17
1+
# v2.0.18
22

3-
2026-02-26
3+
2026-03-05
4+
5+
**🆕 新增功能**
6+
7+
- **@visactor/vchart**: 优化发布相关的工作流程(Release Workflows)
48

59
**🐛 问题修复**
610

7-
- **@visactor/vchart**: fix: support functional alternateColor in axis grid configuration
11+
- **@visactor/vchart**: 修复数据源变更时 DataZoom 未触发更新的问题 (Issue #4185)
12+
- **@visactor/vchart**: 修复热力图(Heatmap)标签的默认线宽(`lineWidth`)问题
13+
- **@visactor/vchart**: 修复 Player 组件以及 `BaseComponent` 销毁释放逻辑中的内存泄漏问题
814

9-
**Full Changelog**: https://github.com/VisActor/VChart/compare/v2.0.16...v2.0.17
15+
**Full Changelog**: https://github.com/VisActor/VChart/compare/v2.0.17...v2.0.18
1016

11-
[更多详情请查看 v2.0.17](https://github.com/VisActor/VChart/releases/tag/v2.0.17)
17+
[more detail about v2.0.18](https://github.com/VisActor/VChart/releases/tag/v2.0.18)

.cursor/commands/speckit.aftercode.md

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
description: 'Automatically execute the subsequent code delivery pipeline: changelog → commit → prgenerate, in strict sequential order.'
2+
description: 'Automatically execute the subsequent code delivery pipeline: skilltypesync → changelog → commit → prgenerate, in strict sequential order.'
33
handoffs:
44
- label: 'Create Pull Request'
55
agent: 'speckit.prcreate'
@@ -15,25 +15,42 @@ $ARGUMENTS
1515

1616
## Outline
1717

18-
This command orchestrates the code delivery pipeline, executing the `changelog`, `commit`, and `prgenerate` phases in a strict, sequential, and non-interactive flow. It ensures that the entire process, from generating change files to preparing the PR body, is automated while maintaining the precise behavior of each individual step.
18+
This command orchestrates the code delivery pipeline, executing the `skilltypesync`, `changelog`, `commit`, and `prgenerate` phases in a strict, sequential, and non-interactive flow. It ensures that the entire process, from synchronizing skill type resources to preparing the PR body, is automated while maintaining the precise behavior of each individual step.
1919

2020
**Execution is strictly sequential. No steps will be skipped or run in parallel.**
2121

22-
### Phase 1: Generate Changelog (`/speckit.changelog`)
22+
### Phase 1: Sync Skill Type Resources (`/speckit.skilltypesync`)
2323

24-
- **Action**: Initiates the delivery pipeline by invoking `/speckit.changelog`.
24+
- **Action**: Initiates the delivery pipeline by invoking `/speckit.skilltypesync`.
25+
- **Process**:
26+
- Detects whether this feature includes user-facing config/API/type changes.
27+
- If required, synchronizes skill reference assets under:
28+
- `skills/vchart-development-assistant/references/type-meta/`
29+
- `skills/vchart-development-assistant/references/type-details/`
30+
- Runs consistency checks to prevent broken type references in the skill resources.
31+
- Any parameters provided in `$ARGUMENTS` will be passed through (for example: `--base`, `--force`, `--types`).
32+
- **Handoff**: Upon successful completion, automatically triggers the `changelog` phase.
33+
- **Output Report**:
34+
- "Phase 1 (Skill Type Sync) completed."
35+
- `SYNC_TRIGGER`: [auto-detected | forced]
36+
- `UPDATED_TYPE_META`: [List of updated files or empty]
37+
- `UPDATED_TYPE_DETAILS`: [List of updated files or empty]
38+
39+
### Phase 2: Generate Changelog (`/speckit.changelog`)
40+
41+
- **Action**: Triggered automatically after `skilltypesync` completes.
2542
- **Process**:
2643
- Collects commits since a base branch (defaulting to `develop`).
2744
- Infers the version bump type (`patch`, `minor`, `major`) automatically from commit messages unless an explicit `bumpType` is passed in `$ARGUMENTS`.
2845
- Generates the necessary change files within the `common/changes/` directory.
2946
- Any parameters provided in `$ARGUMENTS` will be passed through to override default behavior.
3047
- **Handoff**: Upon successful completion, automatically triggers the `commit` phase.
3148
- **Output Report**:
32-
- "Phase 1 (Changelog) completed."
49+
- "Phase 2 (Changelog) completed."
3350
- `CREATED_FILES`: [List of paths to generated files in `common/changes/`]
3451
- `VALIDATION`: "Changelog message conforms to Conventional Commits standards."
3552

36-
### Phase 2: Create Commit (`/speckit.commit`)
53+
### Phase 3: Create Commit (`/speckit.commit`)
3754

3855
- **Action**: Triggered automatically after `changelog` completes.
3956
- **Process**:
@@ -44,11 +61,11 @@ This command orchestrates the code delivery pipeline, executing the `changelog`,
4461
- The `message` and `pushAfterCommit` behaviors can be overridden via `$ARGUMENTS`.
4562
- **Handoff**: Upon successful completion, automatically triggers the `prgenerate` phase.
4663
- **Output Report**:
47-
- "Phase 2 (Commit) completed."
64+
- "Phase 3 (Commit) completed."
4865
- `COMMIT_MESSAGE`: [The full commit message used]
4966
- `PUSH_STATUS`: "Branch [branch-name] pushed to origin."
5067

51-
### Phase 3: Generate PR Body (`/speckit.prgenerate`)
68+
### Phase 4: Generate PR Body (`/speckit.prgenerate`)
5269

5370
- **Action**: The final phase, realized via the native `handoff` from `/speckit.commit` to `/speckit.prgenerate` after `commit` completes. This `/speckit.aftercode` command does not declare its own `handoff` entry for `/speckit.prgenerate` to avoid duplicate execution.
5471
- **Process**:
@@ -57,7 +74,7 @@ This command orchestrates the code delivery pipeline, executing the `changelog`,
5774
- Saves the final, populated PR body to `.trae/output/pr.body.local.md`.
5875
- **Handoff**: This step retains its original `handoff` to `speckit.prcreate`. The `/speckit.aftercode` command depends strictly on the original single-step handoff chain and does **not** introduce any additional handoffs, preventing `prgenerate` (or downstream steps) from running more than once.
5976
- **Output Report**:
60-
- "Phase 3 (PR Generate) completed."
77+
- "Phase 4 (PR Generate) completed."
6178
- `OUTPUT_FILE`: ".trae/output/pr.body.local.md"
6279
- `VALIDATION_SUMMARY`: "PR body generated. Please review the file before creating the pull request."
6380
- `NEXT_STEPS`: "The `speckit.prcreate` command may have been triggered automatically. If not, you can run it manually to create the GitHub Pull Request."
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
description: "After feature development, detect user-config/API changes and synchronize skill type resources under skills/vchart-development-assistant/references/type-meta and type-details."
3+
---
4+
5+
## User Input
6+
7+
```text
8+
$ARGUMENTS
9+
```
10+
11+
You **MUST** consider user input if provided. Treat it as optional CLI-style overrides only (for example: `--base develop`, `--force`, `--types ILabelSpec,IData`).
12+
13+
## Outline
14+
15+
1. **Resolve diff scope**:
16+
- Default base branch is `develop`.
17+
- If `$ARGUMENTS` contains `--base <branch>`, use that branch as comparison base.
18+
- Collect changed files from:
19+
- staged + unstaged local changes, and
20+
- branch diff against base (`<base>...HEAD`).
21+
- De-duplicate all changed paths.
22+
23+
2. **Determine whether sync is required**:
24+
- Mark as **requires sync** when changes affect user-facing configuration or API/type definitions, including (but not limited to):
25+
- `packages/vchart/src/typings/**`
26+
- `packages/vchart/src/chart/**/interface/**`
27+
- `packages/vchart/src/component/**/interface/**`
28+
- `packages/vchart/src/series/**/interface/**`
29+
- `packages/vchart/src/theme/**`
30+
- any public API or option schema files referenced by VChart docs.
31+
- If no matching files and no `--force`, stop with a clear summary: "No user config/API changes detected, skill type sync skipped."
32+
33+
3. **Identify impacted type entities**:
34+
- From changed TypeScript definitions, extract impacted type/interface names (for example `ILabelSpec`, `IData`, `ITheme`).
35+
- Build two impact sets:
36+
- **Meta impact**: chart/common entries that need `type-meta/*.json` updates.
37+
- **Detail impact**: concrete types needing `type-details/*-Type-Definition.md` updates.
38+
- If `$ARGUMENTS` includes `--types`, merge explicit type names into the detail impact set.
39+
40+
4. **Update `type-meta` resources**:
41+
- Target directory: `skills/vchart-development-assistant/references/type-meta/`.
42+
- For each impacted chart/common meta file:
43+
- sync user-visible property paths,
44+
- sync `required` flags,
45+
- sync `type` and `isSimple` fields,
46+
- remove stale keys that no longer exist in source typings.
47+
- Keep JSON valid and stable (no duplicated keys, deterministic field ordering where possible).
48+
49+
5. **Update `type-details` resources**:
50+
- Target directory: `skills/vchart-development-assistant/references/type-details/`.
51+
- For each impacted type:
52+
- create or update `[TypeName]-Type-Definition.md` (for example `ILabelSpec-Type-Definition.md`),
53+
- ensure definitions reflect latest fields, value types, optional/required semantics, and usage notes,
54+
- include concise, runnable-style code examples that match current VChart API behavior.
55+
- Keep naming aligned with `references/FILE_NAMING_CONVENTIONS.md`.
56+
57+
6. **Consistency checks**:
58+
- Verify every complex type referenced in `type-meta` (`isSimple: false`) has a corresponding `type-details` document.
59+
- Verify removed/renamed types no longer leave broken references in `type-meta`.
60+
- Validate JSON syntax for all changed files under `type-meta`.
61+
- Ensure Markdown files under `type-details` are non-empty and include the target type name in title/content.
62+
63+
7. **Output report**:
64+
- Print:
65+
- base branch used,
66+
- whether sync was triggered by auto-detection or `--force`,
67+
- changed source files that triggered sync,
68+
- updated `type-meta` files,
69+
- updated `type-details` files,
70+
- unresolved gaps (if any manual follow-up is required).
71+
- If unresolved gaps exist, fail with actionable errors instead of silently succeeding.
72+
73+
## Notes
74+
75+
- This command only synchronizes skill reference assets; it does not commit, push, or create PR content.
76+
- Preferred execution point is after implementation is complete and before `/speckit.changelog` or `/speckit.aftercode`.

.cursor/rules/specify-rules.mdc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
Auto-generated from all feature plans. Last updated: 2026-01-15
44

55
## Active Technologies
6+
- TypeScript 4.x+ (Project uses TS) + `@visactor/vchart` (Core logic), `@visactor/react-vchart` (React wrapper) (007-fix-datazoom-react)
7+
- N/A (In-memory chart state) (007-fix-datazoom-react)
68

79
- TypeScript/React 18 + @visactor/react-vchart, @visactor/vchar (001-react-vchart-demo)
810

@@ -24,11 +26,11 @@ npm test && npm run lint
2426
TypeScript 4.9.5: Follow standard conventions
2527

2628
## Recent Changes
29+
- 007-fix-datazoom-react: Added TypeScript 4.x+ (Project uses TS) + `@visactor/vchart` (Core logic), `@visactor/react-vchart` (React wrapper)
30+
- 007-fix-datazoom-react: Added [if applicable, e.g., PostgreSQL, CoreData, files or N/A]
2731

2832
- 001-react-vchart-demo: Added TypeScript/React 18 + @visactor/react-vchart, @visactor/vchar
29-
- 001-react-vchart-demo: Added [if applicable, e.g., PostgreSQL, CoreData, files or N/A]
3033

31-
- 001-scrollbar-wheel-step: Added TypeScript 4.9.5 + @visactor/vchart, @visactor/vrender-components (~1.0.37), @visactor/vutils
3234

3335
<!-- MANUAL ADDITIONS START -->
3436
<!-- MANUAL ADDITIONS END -->

.github/workflows/post-release.yml

Lines changed: 43 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -74,31 +74,28 @@ jobs:
7474
7575
echo "skip=false" >> "$GITHUB_OUTPUT"
7676
77-
- name: Fetch develop changelog
77+
- name: Ensure main changelog exists
7878
if: steps.meta.outputs.skip != 'true' && steps.exist.outputs.skip != 'true'
7979
run: |
8080
set -euo pipefail
81-
git fetch origin develop:refs/remotes/origin/develop --depth=1
82-
git show origin/develop:docs/assets/changelog/en/release.md > release-develop.md
81+
if [ ! -f "docs/assets/changelog/en/release.md" ]; then
82+
echo "Error: docs/assets/changelog/en/release.md not found in main."
83+
exit 1
84+
fi
8385
84-
- name: Extract release body from develop changelog
86+
- name: Extract release body from main changelog
8587
id: body
8688
if: steps.meta.outputs.skip != 'true' && steps.exist.outputs.skip != 'true'
8789
env:
8890
VERSION: ${{ steps.meta.outputs.version }}
8991
run: |
9092
set -euo pipefail
91-
if [ ! -f "release-develop.md" ]; then
92-
echo "develop changelog file not found, skip post-release."
93-
echo "has_body=false" >> "$GITHUB_OUTPUT"
94-
exit 0
95-
fi
96-
97-
if node <<'NODE'
93+
node <<'NODE'
9894
const fs = require('fs');
9995
10096
const version = process.env.VERSION;
101-
const content = fs.readFileSync('release-develop.md', 'utf8');
97+
const changelogPath = 'docs/assets/changelog/en/release.md';
98+
const content = fs.readFileSync(changelogPath, 'utf8');
10299
103100
function escapeRegExp(str) {
104101
return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
@@ -108,27 +105,53 @@ jobs:
108105
const match = headerPattern.exec(content);
109106
110107
if (!match) {
111-
console.log('No changelog block for version', version, 'found in develop.');
108+
console.error('No changelog block for version', version, 'found in main changelog.');
112109
process.exit(1);
113110
}
114111
115112
const startIndex = match.index;
116113
const rest = content.slice(startIndex);
117114
118-
const nextHeaderPattern = /^#\s*v?\d+\.\d+\.\d+[^\n]*$/gm;
115+
// Find the next release header after the current one.
116+
const nextHeaderPattern = /^#\s*v?\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?[^\n]*$/gm;
119117
let nextIndex = rest.length;
120118
let m;
121-
if ((m = nextHeaderPattern.exec(rest)) !== null && m.index !== 0) {
122-
nextIndex = m.index;
119+
while ((m = nextHeaderPattern.exec(rest)) !== null) {
120+
if (m.index > 0) {
121+
nextIndex = m.index;
122+
break;
123+
}
123124
}
124125
125126
const block = rest.slice(0, nextIndex).trimEnd() + '\n';
127+
if (!block.trim()) {
128+
console.error('Extracted changelog block is empty for version', version);
129+
process.exit(1);
130+
}
126131
fs.writeFileSync('release-body.md', block, 'utf8');
127132
NODE
128-
then
129-
echo "has_body=true" >> "$GITHUB_OUTPUT"
130-
else
131-
echo "has_body=false" >> "$GITHUB_OUTPUT"
133+
echo "has_body=true" >> "$GITHUB_OUTPUT"
134+
135+
- name: Validate extracted release body
136+
if: steps.meta.outputs.skip != 'true' && steps.exist.outputs.skip != 'true' && steps.body.outputs.has_body == 'true'
137+
env:
138+
VERSION: ${{ steps.meta.outputs.version }}
139+
run: |
140+
set -euo pipefail
141+
if [ ! -s "release-body.md" ]; then
142+
echo "Error: release-body.md is missing or empty."
143+
exit 1
144+
fi
145+
146+
if ! grep -Eq "^#\\s*v?${VERSION}\\b" release-body.md; then
147+
echo "Error: release-body.md does not start with expected version header v${VERSION}."
148+
exit 1
149+
fi
150+
151+
HEADER_COUNT="$(grep -Ec '^#\s*v?[0-9]+\.[0-9]+\.[0-9]+([-.][0-9A-Za-z.]+)?\b' release-body.md || true)"
152+
if [ "${HEADER_COUNT}" -ne 1 ]; then
153+
echo "Error: extracted release body contains ${HEADER_COUNT} release headers, expected exactly 1."
154+
exit 1
132155
fi
133156
134157
- name: Verify gh identity
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Implementation Plan: Fix DataZoom Value Update on Data Change in React
2+
3+
**Branch**: `007-fix-datazoom-react`
4+
**Spec**: [specs/007-fix-datazoom-react/spec.md](../spec.md)
5+
6+
## Summary
7+
I have planned the fix for Issue #4185 where DataZoom fails to update in React when data changes. The plan involves detecting data view changes in the core `DataFilterBaseComponent` and rebinding listeners, ensuring the component stays in sync with the latest data.
8+
9+
## Phase 1: Setup (Reproduction)
10+
- [ ] Initialize reproduction in `packages/react-vchart/demo/src/BugReproduction.tsx`
11+
- [ ] Update demo entry point to run reproduction
12+
13+
## Phase 3: User Story 1 (Core Fix)
14+
- [ ] Implement `_collectDataInfo` helper to gather data view references
15+
- [ ] Add state tracking for `_currentDataCollection` and bound listeners
16+
- [ ] Update `_initData` to initialize tracking
17+
- [ ] Implement robust `onDataUpdate` logic:
18+
- Detect if underlying DataViews have changed
19+
- Unbind old listeners / Bind new listeners
20+
- Re-run data transforms to update domain
21+
- **Crucial**: Apply explicit `start`/`end` from spec if present (resetting range as per user config)
22+
23+
## Phase N: Polish
24+
- [ ] Clean up reproduction code
25+
- [ ] Restore demo entry point
26+
27+
I am ready to proceed with the implementation. Please confirm.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@visactor/react-vchart",
5+
"comment": "fix: ensure DataZoom updates when data source changes (Issue #4185)",
6+
"type": "patch"
7+
}
8+
],
9+
"packageName": "@visactor/react-vchart",
10+
"email": "test@example.com"
11+
}

0 commit comments

Comments
 (0)