From 0bd85c2a32aac642bff6cf19ddbd0aa2c768282f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?kiner-tang=28=E6=96=87=E8=BE=89=29?= <1127031143@qq.com> Date: Sat, 26 Nov 2022 17:23:55 +0800 Subject: [PATCH 1/5] fix: Sorted/Filtered table fixed column transparent background unreadable --- .../__snapshots__/demo-extend.test.ts.snap | 84 ++++++++++++++++++- .../__tests__/__snapshots__/demo.test.ts.snap | 60 ++++++++++++- components/table/demo/fixed-columns.tsx | 1 + components/table/style/index.tsx | 8 +- 4 files changed, 145 insertions(+), 8 deletions(-) diff --git a/components/table/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/table/__tests__/__snapshots__/demo-extend.test.ts.snap index 9b9229165de0..d4ed1ed7e9d5 100644 --- a/components/table/__tests__/__snapshots__/demo-extend.test.ts.snap +++ b/components/table/__tests__/__snapshots__/demo-extend.test.ts.snap @@ -8847,10 +8847,90 @@ exports[`renders ./components/table/demo/fixed-columns.tsx extend context correc Full Name - Age +
+ + Age + + + + + + + + + + + +
+
+
+
+
+ +
+ +
+
+
- Age +
+ + Age + + + + + + + + + + + +
= [ dataIndex: 'age', key: 'age', fixed: 'left', + sorter: true, }, { title: 'Column 1', dataIndex: 'address', key: '1' }, { title: 'Column 2', dataIndex: 'address', key: '2' }, diff --git a/components/table/style/index.tsx b/components/table/style/index.tsx index f4a8889ab881..033b8943d3ba 100644 --- a/components/table/style/index.tsx +++ b/components/table/style/index.tsx @@ -315,8 +315,8 @@ export default genComponentStyleHook('Table', (token) => { tableFooterTextColor: colorTextHeading, tableFooterBg: colorFillAlterSolid, tableHeaderCellSplitColor: colorSplit, - tableHeaderSortBg: colorFillSecondary, - tableHeaderSortHoverBg: colorFillContent, + tableHeaderSortBg: colorFillAlterSolid, + tableHeaderSortHoverBg: colorFillAlterSolid, tableHeaderIconColor: baseColorAction .clone() .setAlpha(baseColorAction.getAlpha() * opacityLoading) @@ -325,8 +325,8 @@ export default genComponentStyleHook('Table', (token) => { .clone() .setAlpha(baseColorActionHover.getAlpha() * opacityLoading) .toRgbString(), - tableBodySortBg: colorFillAlter, - tableFixedHeaderSortActiveBg: colorFillSecondary, + tableBodySortBg: colorFillAlterSolid, + tableFixedHeaderSortActiveBg: colorFillAlterSolid, tableHeaderFilterActiveBg: colorFillContent, tableFilterDropdownBg: colorBgContainer, tableRowHoverBg: colorFillAlterSolid, From 97d3f761e89a4e7df1fb71f444b2bf2e56b9a364 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?kiner-tang=28=E6=96=87=E8=BE=89=29?= <1127031143@qq.com> Date: Sat, 26 Nov 2022 18:13:35 +0800 Subject: [PATCH 2/5] feat: remove redundant code --- components/table/style/index.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/components/table/style/index.tsx b/components/table/style/index.tsx index 033b8943d3ba..b52467dd0bd8 100644 --- a/components/table/style/index.tsx +++ b/components/table/style/index.tsx @@ -282,7 +282,6 @@ export default genComponentStyleHook('Table', (token) => { colorIconHover, opacityLoading, colorBgContainer, - colorFillSecondary, borderRadiusLG, colorFillContent, controlInteractiveSize: checkboxSize, From ccd48bc401ace729c1769d7316fd46a2f5d203d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?kiner-tang=28=E6=96=87=E8=BE=89=29?= <1127031143@qq.com> Date: Wed, 28 Dec 2022 15:43:01 +0800 Subject: [PATCH 3/5] Update components/table/style/index.tsx Co-authored-by: MadCcc <1075746765@qq.com> --- components/table/style/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/table/style/index.tsx b/components/table/style/index.tsx index d30d2b01e206..19d5adb6f108 100644 --- a/components/table/style/index.tsx +++ b/components/table/style/index.tsx @@ -322,10 +322,10 @@ export default genComponentStyleHook('Table', (token) => { const colorFillSecondarySolid = new TinyColor(colorFillSecondary) .onBackground(colorBgContainer) - .setAlpha(1); + .toHexString(); const colorFillContentSolid = new TinyColor(colorFillContent) .onBackground(colorBgContainer) - .setAlpha(1); + .toHexString(); const colorFillAlterSolid = new TinyColor(colorFillAlter) .onBackground(colorBgContainer) From 1973c0c7aa9e4594ec22340f596c05d1c6a1b58d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?kiner-tang=28=E6=96=87=E8=BE=89=29?= <1127031143@qq.com> Date: Wed, 28 Dec 2022 15:51:32 +0800 Subject: [PATCH 4/5] feat: code optimize --- components/table/style/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/table/style/index.tsx b/components/table/style/index.tsx index 19d5adb6f108..06ccd72ed95f 100644 --- a/components/table/style/index.tsx +++ b/components/table/style/index.tsx @@ -348,8 +348,8 @@ export default genComponentStyleHook('Table', (token) => { tableFooterTextColor: colorTextHeading, tableFooterBg: colorFillAlterSolid, tableHeaderCellSplitColor: colorBorderSecondary, - tableHeaderSortBg: colorFillSecondarySolid.toRgbString(), - tableHeaderSortHoverBg: colorFillContentSolid.toRgbString(), + tableHeaderSortBg: colorFillSecondarySolid, + tableHeaderSortHoverBg: colorFillContentSolid, tableHeaderIconColor: baseColorAction .clone() .setAlpha(baseColorAction.getAlpha() * opacityLoading) @@ -359,7 +359,7 @@ export default genComponentStyleHook('Table', (token) => { .setAlpha(baseColorActionHover.getAlpha() * opacityLoading) .toRgbString(), tableBodySortBg: colorFillAlterSolid, - tableFixedHeaderSortActiveBg: colorFillSecondarySolid.toRgbString(), + tableFixedHeaderSortActiveBg: colorFillSecondarySolid, tableHeaderFilterActiveBg: colorFillContent, tableFilterDropdownBg: colorBgContainer, tableRowHoverBg: colorFillAlterSolid, From 82d02ff1c041c7fad4c49432f2b5e071b7a80f11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?kiner-tang=28=E6=96=87=E8=BE=89=29?= <1127031143@qq.com> Date: Wed, 28 Dec 2022 17:51:48 +0800 Subject: [PATCH 5/5] style: reset format doc --- docs/react/recommendation.zh-CN.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/react/recommendation.zh-CN.md b/docs/react/recommendation.zh-CN.md index 5bd67ba06b55..dc9844d2475f 100644 --- a/docs/react/recommendation.zh-CN.md +++ b/docs/react/recommendation.zh-CN.md @@ -13,7 +13,7 @@ title: 社区精选组件 | 路由 | [react-router](https://github.com/ReactTraining/react-router) | | 布局 | [react-grid-layout](https://github.com/react-grid-layout/react-grid-layout) [react-grid-system](https://github.com/sealninja/react-grid-system) [rc-dock](https://github.com/ticlo/rc-dock) | | 拖拽 | [dnd-kit](https://github.com/clauderic/dnd-kit) [react-beautiful-dnd](https://github.com/atlassian/react-beautiful-dnd/) [react-dnd](https://github.com/gaearon/react-dnd) | -| 代码编辑器 | [@uiw/react-codemirror](https://github.com/uiwjs/react-codemirror) [react-monaco-editor](<[https://github.com/superRaytin/react-monaco-editor](https://github.com/react-monaco-editor/react-monaco-editor)>) | +| 代码编辑器 | [@uiw/react-codemirror](https://github.com/uiwjs/react-codemirror) [react-monaco-editor]([https://github.com/superRaytin/react-monaco-editor](https://github.com/react-monaco-editor/react-monaco-editor)) | | 富文本编辑器 | [react-quill](https://github.com/zenoamaro/react-quill) | | JSON 编辑器 | [vanilla-jsoneditor](https://github.com/josdejong/svelte-jsoneditor) | | JSON 显示器 | [react-json-view](https://github.com/mac-s-g/react-json-view) |