Skip to content

Release #1916

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

Merged
merged 4 commits into from
Mar 28, 2025
Merged

Release #1916

merged 4 commits into from
Mar 28, 2025

Conversation

wang1212
Copy link
Member

No description provided.

sz-p and others added 4 commits March 17, 2025 21:16
Copy link

Walkthrough: This pull request introduces a new test case related to issue #1911, updates several package dependencies, and includes minor changes to the rendering logic in the Text.ts file. Additionally, it updates the changelogs for multiple packages to reflect these changes.

Changes:

Files Summary
__tests__/demos/bugfix/1911.ts, __tests__/demos/bugfix/index.ts Added a new test case for issue #1911 and updated the index to include this test.
packages/g-mobile-svg/CHANGELOG.md, packages/g-plugin-a11y/CHANGELOG.md, packages/g-plugin-rough-svg-renderer/CHANGELOG.md, packages/g-plugin-svg-picker/CHANGELOG.md, packages/g-plugin-svg-renderer/CHANGELOG.md, packages/g-plugin-zdog-svg-renderer/CHANGELOG.md, packages/g-svg/CHANGELOG.md Updated changelogs for multiple packages to document recent changes and dependency updates.
packages/g-plugin-a11y/src/AriaManager.ts Added pointerEvents: none to improve accessibility handling.
packages/g-plugin-svg-renderer/src/shapes/paths/Text.ts Modified the logic for setting styleCSSText and adjusted dy attribute handling.
packages/g-mobile-svg/package.json, packages/g-plugin-a11y/package.json, packages/g-plugin-rough-svg-renderer/package.json, packages/g-plugin-svg-picker/package.json, packages/g-plugin-svg-renderer/package.json, packages/g-plugin-zdog-svg-renderer/package.json, packages/g-svg/package.json Updated package versions and dependencies.
🪧 Tips For further assistance, please describe your question in the comments and @petercat-assistant to start a conversation with me.

if (dx !== 0 || dy !== 0) {
styleCSSText += `transform:translate(${dx}px, ${dy}px);`;
}
let styleCSSText = `transform:translate(${dx}px, ${dy}px);`;

Choose a reason for hiding this comment

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

The change in styleCSSText initialization to always include transform:translate(${dx}px, ${dy}px); may introduce unintended transformations when dx and dy are zero. Consider adding a condition to avoid unnecessary transformations.

@@ -0,0 +1,104 @@
import { Canvas, Text, Rect, CanvasEvent } from '@antv/g';

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note test

Unused import Canvas.

Copilot Autofix

AI 21 days ago

To fix the problem, we need to remove the unused Canvas import from the import statement on line 1. This will clean up the code and eliminate the unnecessary import, improving readability and potentially performance.

  • Remove the Canvas import from the import statement on line 1.
  • Ensure that the remaining imports are still correctly formatted and used in the code.
Suggested changeset 1
__tests__/demos/bugfix/1911.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/__tests__/demos/bugfix/1911.ts b/__tests__/demos/bugfix/1911.ts
--- a/__tests__/demos/bugfix/1911.ts
+++ b/__tests__/demos/bugfix/1911.ts
@@ -1,2 +1,2 @@
-import { Canvas, Text, Rect, CanvasEvent } from '@antv/g';
+import { Text, Rect, CanvasEvent } from '@antv/g';
 import { Renderer as SVGRenderer } from '@antv/g-svg';
EOF
@@ -1,2 +1,2 @@
import { Canvas, Text, Rect, CanvasEvent } from '@antv/g';
import { Text, Rect, CanvasEvent } from '@antv/g';
import { Renderer as SVGRenderer } from '@antv/g-svg';
Copilot is powered by AI and may make mistakes. Always verify output.
@wang1212 wang1212 merged commit c9905e3 into master Mar 28, 2025
5 checks passed
@wang1212 wang1212 deleted the release branch March 28, 2025 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants