antvis / S2

⚡️ A practical visualization library for tabular analysis.
https://s2.antv.antgroup.com
MIT License
1.46k stars 194 forks source link

feat: 统一链接跳转字段绘制逻辑, 支持标记列头 close #2430 #2796

Closed lijinke666 closed 2 months ago

lijinke666 commented 2 months ago

👀 PR includes

✨ Feature

📝 Description

  1. 统一绘制逻辑, 支持列头 close #2430, 现在链接跳转支持对 列头 标记,且明细表同时对 列头数值 生效(可自定义规则)
  2. 修正链接跳转错误文档, 完善自定义标记的教程
const s2Options = {
  interaction: {
    linkFields: ['province', 'city', 'type', 'sub_type', 'number', EXTRA_FIELD]
  }
}
  1. 回调参数 key 调整为 field, cellData 调整为 meta, 风格保持统一.
s2.on(S2Event.GLOBAL_LINK_FIELD_JUMP, (data) => {
-  const { key, cellData, record } = data;
+  const { field, meta, record } = data;
});

🖼️ Screenshot

Before After
image image

🔗 Related issue link

close #2430

🔍 Self-Check before the merge

vercel[bot] commented 2 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
antvis-s2 ❌ Failed (Inspect) Jul 1, 2024 8:37am
github-actions[bot] commented 2 months ago

Size Change: +17 B (+0.01%)

Total Size: 326 kB

Filename Size Change
./packages/s2-core/dist/index.min.js 228 kB +17 B (+0.01%)
ℹ️ View Unchanged | Filename | Size | | :--- | :---: | | `./packages/s2-core/dist/style.min.css` | 388 B | | `./packages/s2-react/dist/index.min.js` | 69.8 kB | | `./packages/s2-react/dist/style.min.css` | 3.88 kB | | `./packages/s2-vue/dist/index.min.js` | 22 kB | | `./packages/s2-vue/dist/style.min.css` | 1.97 kB |

compressed-size-action

github-actions[bot] commented 2 months ago

你好, @lijinke666 CI 执行失败, 请点击 [Details] 按钮查看, 并根据日志修复。

Hello, @lijinke666 CI run failed, please click the [Details] button for detailed log information and fix it.

codecov-commenter commented 2 months ago

Codecov Report

Attention: Patch coverage is 88.57143% with 4 lines in your changes missing coverage. Please review.

Project coverage is 80.15%. Comparing base (ecdc9c8) to head (3197402). Report is 398 commits behind head on next.

Files Patch % Lines
...n/base-interaction/click/header-cell-link-click.ts 92.30% 1 Missing and 1 partial :warning:
...ckages/s2-core/src/utils/interaction/link-field.ts 71.42% 1 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## next #2796 +/- ## ========================================== + Coverage 75.77% 80.15% +4.38% ========================================== Files 257 180 -77 Lines 11994 10337 -1657 Branches 2464 2331 -133 ========================================== - Hits 9088 8286 -802 + Misses 1398 607 -791 + Partials 1508 1444 -64 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

lijinke666 commented 2 months ago

:tada: This PR is included in version @antv/s2-v2.0.0-next.25 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

lijinke666 commented 2 months ago

:tada: This PR is included in version @antv/s2-react-v2.0.0-next.24 :tada:

The release is available on:

Your semantic-release bot :package::rocket: