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

refactor: use token instead of constant in size #44598

Merged
merged 36 commits into from
Sep 4, 2023
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
8b70e7b
refactor: use token instead of constant in size
li-jia-nan Sep 2, 2023
2956115
fix: fix
li-jia-nan Sep 2, 2023
38d2448
fix: fix
li-jia-nan Sep 2, 2023
165f439
test: update snap
li-jia-nan Sep 2, 2023
40a04bb
Merge branch 'feature' into space-size
li-jia-nan Sep 2, 2023
90193c7
fix: update snap
li-jia-nan Sep 2, 2023
84cc472
test: fix test case
li-jia-nan Sep 2, 2023
95651f7
fix: fix
li-jia-nan Sep 2, 2023
77f5a94
fix: fix
li-jia-nan Sep 2, 2023
06014e2
fix: fix
li-jia-nan Sep 2, 2023
e7c800a
fix: fix tast cov
li-jia-nan Sep 2, 2023
00bbc94
fix: fix test case
li-jia-nan Sep 2, 2023
fd07e07
chore: add comment
li-jia-nan Sep 3, 2023
83eddde
chore: add comment
li-jia-nan Sep 3, 2023
66ee13e
Merge branch 'feature' into space-size
li-jia-nan Sep 3, 2023
ef3041b
chore: add comment
li-jia-nan Sep 3, 2023
a73de15
chore: rename
li-jia-nan Sep 3, 2023
87c1dbe
chore: rename
li-jia-nan Sep 3, 2023
fbea337
fix: fix test case
li-jia-nan Sep 3, 2023
076738c
fix: fix test case
li-jia-nan Sep 3, 2023
d0c0497
fix: fix
li-jia-nan Sep 3, 2023
3c83902
fix: fix
li-jia-nan Sep 3, 2023
c32f243
fix: fix
li-jia-nan Sep 3, 2023
94ae470
fix: fix
li-jia-nan Sep 3, 2023
7e6db58
test: add test case
li-jia-nan Sep 3, 2023
c31b0e5
fix: fix
li-jia-nan Sep 4, 2023
4a7310d
test: update snap
li-jia-nan Sep 4, 2023
2b1846a
fix: fix
li-jia-nan Sep 4, 2023
30d756f
fix: fix
li-jia-nan Sep 4, 2023
319057e
test: update
li-jia-nan Sep 4, 2023
1a6832d
test: update
li-jia-nan Sep 4, 2023
3359fa3
Merge branch 'feature' into space-size
li-jia-nan Sep 4, 2023
f790484
chore: fix
li-jia-nan Sep 4, 2023
67db2bb
fix: type
li-jia-nan Sep 4, 2023
a8fffd5
test: remove test
li-jia-nan Sep 4, 2023
eee26c3
Merge branch 'feature' into space-size
li-jia-nan Sep 4, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ exports[`renders components/app/demo/basic.tsx extend context correctly 1`] = `
>
<div
class="ant-space-item"
style="margin-right: 8px;"
style="margin-inline-end: 8px;"
>
<button
class="ant-btn ant-btn-primary"
Expand All @@ -22,7 +22,7 @@ exports[`renders components/app/demo/basic.tsx extend context correctly 1`] = `
</div>
<div
class="ant-space-item"
style="margin-right: 8px;"
style="margin-inline-end: 8px;"
>
<button
class="ant-btn ant-btn-primary"
Expand Down Expand Up @@ -60,7 +60,7 @@ exports[`renders components/app/demo/config.tsx extend context correctly 1`] = `
>
<div
class="ant-space-item"
style="margin-right: 8px;"
style="margin-inline-end: 8px;"
>
<button
class="ant-btn ant-btn-primary"
Expand Down
6 changes: 3 additions & 3 deletions components/app/__tests__/__snapshots__/demo.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ exports[`renders components/app/demo/basic.tsx correctly 1`] = `
>
<div
class="ant-space-item"
style="margin-right:8px"
style="margin-inline-end:8px"
>
<button
class="ant-btn ant-btn-primary"
Expand All @@ -22,7 +22,7 @@ exports[`renders components/app/demo/basic.tsx correctly 1`] = `
</div>
<div
class="ant-space-item"
style="margin-right:8px"
style="margin-inline-end:8px"
>
<button
class="ant-btn ant-btn-primary"
Expand Down Expand Up @@ -58,7 +58,7 @@ exports[`renders components/app/demo/config.tsx correctly 1`] = `
>
<div
class="ant-space-item"
style="margin-right:8px"
style="margin-inline-end:8px"
>
<button
class="ant-btn ant-btn-primary"
Expand Down
36 changes: 18 additions & 18 deletions components/avatar/__tests__/__snapshots__/demo-extend.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ exports[`renders components/avatar/demo/badge.tsx extend context correctly 1`] =
>
<div
class="ant-space-item"
style="margin-right: 24px;"
style="margin-inline-end: 24px;"
>
<span
class="ant-badge"
Expand Down Expand Up @@ -108,7 +108,7 @@ exports[`renders components/avatar/demo/basic.tsx extend context correctly 1`] =
>
<div
class="ant-space-item"
style="margin-right: 16px; padding-bottom: 16px;"
style="margin-inline-end: 16px; padding-bottom: 16px;"
>
<span
class="ant-avatar ant-avatar-circle ant-avatar-icon"
Expand Down Expand Up @@ -137,7 +137,7 @@ exports[`renders components/avatar/demo/basic.tsx extend context correctly 1`] =
</div>
<div
class="ant-space-item"
style="margin-right: 16px; padding-bottom: 16px;"
style="margin-inline-end: 16px; padding-bottom: 16px;"
>
<span
class="ant-avatar ant-avatar-lg ant-avatar-circle ant-avatar-icon"
Expand Down Expand Up @@ -165,7 +165,7 @@ exports[`renders components/avatar/demo/basic.tsx extend context correctly 1`] =
</div>
<div
class="ant-space-item"
style="margin-right: 16px; padding-bottom: 16px;"
style="margin-inline-end: 16px; padding-bottom: 16px;"
>
<span
class="ant-avatar ant-avatar-circle ant-avatar-icon"
Expand Down Expand Up @@ -230,7 +230,7 @@ exports[`renders components/avatar/demo/basic.tsx extend context correctly 1`] =
>
<div
class="ant-space-item"
style="margin-right: 16px; padding-bottom: 16px;"
style="margin-inline-end: 16px; padding-bottom: 16px;"
>
<span
class="ant-avatar ant-avatar-square ant-avatar-icon"
Expand Down Expand Up @@ -259,7 +259,7 @@ exports[`renders components/avatar/demo/basic.tsx extend context correctly 1`] =
</div>
<div
class="ant-space-item"
style="margin-right: 16px; padding-bottom: 16px;"
style="margin-inline-end: 16px; padding-bottom: 16px;"
>
<span
class="ant-avatar ant-avatar-lg ant-avatar-square ant-avatar-icon"
Expand Down Expand Up @@ -287,7 +287,7 @@ exports[`renders components/avatar/demo/basic.tsx extend context correctly 1`] =
</div>
<div
class="ant-space-item"
style="margin-right: 16px; padding-bottom: 16px;"
style="margin-inline-end: 16px; padding-bottom: 16px;"
>
<span
class="ant-avatar ant-avatar-square ant-avatar-icon"
Expand Down Expand Up @@ -500,7 +500,7 @@ Array [
>
<div
class="ant-space-item"
style="margin-right: 8px;"
style="margin-inline-end: 8px;"
>
<span
class="ant-badge"
Expand Down Expand Up @@ -631,7 +631,7 @@ exports[`renders components/avatar/demo/fallback.tsx extend context correctly 1`
>
<div
class="ant-space-item"
style="margin-right: 8px;"
style="margin-inline-end: 8px;"
>
<span
class="ant-avatar ant-avatar-circle ant-avatar-image"
Expand Down Expand Up @@ -1246,11 +1246,11 @@ exports[`renders components/avatar/demo/toggle-debug.tsx extend context correctl
Array [
<div
class="ant-space ant-space-horizontal ant-space-align-center"
style="flex-wrap: wrap; margin-bottom: -8px;"
style="flex-wrap: wrap;"
>
<div
class="ant-space-item"
style="margin-right: 8px; padding-bottom: 8px;"
style="margin-inline-end: 8px; padding-bottom: 8px;"
>
<button
class="ant-btn ant-btn-default"
Expand All @@ -1263,7 +1263,7 @@ Array [
</div>
<div
class="ant-space-item"
style="margin-right: 8px; padding-bottom: 8px;"
style="margin-inline-end: 8px; padding-bottom: 8px;"
>
<button
class="ant-btn ant-btn-default"
Expand Down Expand Up @@ -1346,7 +1346,7 @@ exports[`renders components/avatar/demo/type.tsx extend context correctly 1`] =
>
<div
class="ant-space-item"
style="margin-right: 16px; padding-bottom: 16px;"
style="margin-inline-end: 16px; padding-bottom: 16px;"
>
<span
class="ant-avatar ant-avatar-circle ant-avatar-icon"
Expand Down Expand Up @@ -1374,7 +1374,7 @@ exports[`renders components/avatar/demo/type.tsx extend context correctly 1`] =
</div>
<div
class="ant-space-item"
style="margin-right: 16px; padding-bottom: 16px;"
style="margin-inline-end: 16px; padding-bottom: 16px;"
>
<span
class="ant-avatar ant-avatar-circle"
Expand All @@ -1389,7 +1389,7 @@ exports[`renders components/avatar/demo/type.tsx extend context correctly 1`] =
</div>
<div
class="ant-space-item"
style="margin-right: 16px; padding-bottom: 16px;"
style="margin-inline-end: 16px; padding-bottom: 16px;"
>
<span
class="ant-avatar ant-avatar-circle"
Expand All @@ -1405,7 +1405,7 @@ exports[`renders components/avatar/demo/type.tsx extend context correctly 1`] =
</div>
<div
class="ant-space-item"
style="margin-right: 16px; padding-bottom: 16px;"
style="margin-inline-end: 16px; padding-bottom: 16px;"
>
<span
class="ant-avatar ant-avatar-circle ant-avatar-image"
Expand All @@ -1417,7 +1417,7 @@ exports[`renders components/avatar/demo/type.tsx extend context correctly 1`] =
</div>
<div
class="ant-space-item"
style="margin-right: 16px; padding-bottom: 16px;"
style="margin-inline-end: 16px; padding-bottom: 16px;"
>
<span
class="ant-avatar ant-avatar-circle ant-avatar-image"
Expand All @@ -1430,7 +1430,7 @@ exports[`renders components/avatar/demo/type.tsx extend context correctly 1`] =
</div>
<div
class="ant-space-item"
style="margin-right: 16px; padding-bottom: 16px;"
style="margin-inline-end: 16px; padding-bottom: 16px;"
>
<span
class="ant-avatar ant-avatar-circle"
Expand Down
36 changes: 18 additions & 18 deletions components/avatar/__tests__/__snapshots__/demo.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ exports[`renders components/avatar/demo/badge.tsx correctly 1`] = `
>
<div
class="ant-space-item"
style="margin-right:24px"
style="margin-inline-end:24px"
>
<span
class="ant-badge"
Expand Down Expand Up @@ -106,7 +106,7 @@ exports[`renders components/avatar/demo/basic.tsx correctly 1`] = `
>
<div
class="ant-space-item"
style="margin-right:16px;padding-bottom:16px"
style="margin-inline-end:16px;padding-bottom:16px"
>
<span
class="ant-avatar ant-avatar-circle ant-avatar-icon"
Expand Down Expand Up @@ -135,7 +135,7 @@ exports[`renders components/avatar/demo/basic.tsx correctly 1`] = `
</div>
<div
class="ant-space-item"
style="margin-right:16px;padding-bottom:16px"
style="margin-inline-end:16px;padding-bottom:16px"
>
<span
class="ant-avatar ant-avatar-lg ant-avatar-circle ant-avatar-icon"
Expand Down Expand Up @@ -163,7 +163,7 @@ exports[`renders components/avatar/demo/basic.tsx correctly 1`] = `
</div>
<div
class="ant-space-item"
style="margin-right:16px;padding-bottom:16px"
style="margin-inline-end:16px;padding-bottom:16px"
>
<span
class="ant-avatar ant-avatar-circle ant-avatar-icon"
Expand Down Expand Up @@ -228,7 +228,7 @@ exports[`renders components/avatar/demo/basic.tsx correctly 1`] = `
>
<div
class="ant-space-item"
style="margin-right:16px;padding-bottom:16px"
style="margin-inline-end:16px;padding-bottom:16px"
>
<span
class="ant-avatar ant-avatar-square ant-avatar-icon"
Expand Down Expand Up @@ -257,7 +257,7 @@ exports[`renders components/avatar/demo/basic.tsx correctly 1`] = `
</div>
<div
class="ant-space-item"
style="margin-right:16px;padding-bottom:16px"
style="margin-inline-end:16px;padding-bottom:16px"
>
<span
class="ant-avatar ant-avatar-lg ant-avatar-square ant-avatar-icon"
Expand Down Expand Up @@ -285,7 +285,7 @@ exports[`renders components/avatar/demo/basic.tsx correctly 1`] = `
</div>
<div
class="ant-space-item"
style="margin-right:16px;padding-bottom:16px"
style="margin-inline-end:16px;padding-bottom:16px"
>
<span
class="ant-avatar ant-avatar-square ant-avatar-icon"
Expand Down Expand Up @@ -407,7 +407,7 @@ Array [
>
<div
class="ant-space-item"
style="margin-right:8px"
style="margin-inline-end:8px"
>
<span
class="ant-badge"
Expand Down Expand Up @@ -534,7 +534,7 @@ exports[`renders components/avatar/demo/fallback.tsx correctly 1`] = `
>
<div
class="ant-space-item"
style="margin-right:8px"
style="margin-inline-end:8px"
>
<span
class="ant-avatar ant-avatar-circle ant-avatar-image"
Expand Down Expand Up @@ -856,11 +856,11 @@ exports[`renders components/avatar/demo/toggle-debug.tsx correctly 1`] = `
Array [
<div
class="ant-space ant-space-horizontal ant-space-align-center"
style="flex-wrap:wrap;margin-bottom:-8px"
style="flex-wrap:wrap"
>
<div
class="ant-space-item"
style="margin-right:8px;padding-bottom:8px"
style="margin-inline-end:8px;padding-bottom:8px"
>
<button
class="ant-btn ant-btn-default"
Expand All @@ -873,7 +873,7 @@ Array [
</div>
<div
class="ant-space-item"
style="margin-right:8px;padding-bottom:8px"
style="margin-inline-end:8px;padding-bottom:8px"
>
<button
class="ant-btn ant-btn-default"
Expand Down Expand Up @@ -954,7 +954,7 @@ exports[`renders components/avatar/demo/type.tsx correctly 1`] = `
>
<div
class="ant-space-item"
style="margin-right:16px;padding-bottom:16px"
style="margin-inline-end:16px;padding-bottom:16px"
>
<span
class="ant-avatar ant-avatar-circle ant-avatar-icon"
Expand Down Expand Up @@ -982,7 +982,7 @@ exports[`renders components/avatar/demo/type.tsx correctly 1`] = `
</div>
<div
class="ant-space-item"
style="margin-right:16px;padding-bottom:16px"
style="margin-inline-end:16px;padding-bottom:16px"
>
<span
class="ant-avatar ant-avatar-circle"
Expand All @@ -997,7 +997,7 @@ exports[`renders components/avatar/demo/type.tsx correctly 1`] = `
</div>
<div
class="ant-space-item"
style="margin-right:16px;padding-bottom:16px"
style="margin-inline-end:16px;padding-bottom:16px"
>
<span
class="ant-avatar ant-avatar-circle"
Expand All @@ -1013,7 +1013,7 @@ exports[`renders components/avatar/demo/type.tsx correctly 1`] = `
</div>
<div
class="ant-space-item"
style="margin-right:16px;padding-bottom:16px"
style="margin-inline-end:16px;padding-bottom:16px"
>
<span
class="ant-avatar ant-avatar-circle ant-avatar-image"
Expand All @@ -1025,7 +1025,7 @@ exports[`renders components/avatar/demo/type.tsx correctly 1`] = `
</div>
<div
class="ant-space-item"
style="margin-right:16px;padding-bottom:16px"
style="margin-inline-end:16px;padding-bottom:16px"
>
<span
class="ant-avatar ant-avatar-circle ant-avatar-image"
Expand All @@ -1038,7 +1038,7 @@ exports[`renders components/avatar/demo/type.tsx correctly 1`] = `
</div>
<div
class="ant-space-item"
style="margin-right:16px;padding-bottom:16px"
style="margin-inline-end:16px;padding-bottom:16px"
>
<span
class="ant-avatar ant-avatar-circle"
Expand Down