-
Notifications
You must be signed in to change notification settings - Fork 310
fix(base-select): [base-select] fix style issues in the old theme #2535
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,8 @@ | |
return { | ||
...node, | ||
currentLabel: node.label, | ||
value: node.id | ||
value: node.id, | ||
isTree: true | ||
} | ||
}) | ||
) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,8 @@ | |
return { | ||
...node, | ||
currentLabel: node.label, | ||
value: node.id | ||
value: node.id, | ||
isTree: true | ||
Comment on lines
+43
to
+44
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Consider standardizing the node structure across all scenarios While adding Consider applying this change to all three scenarios for consistency: // Single select scenario
updateSelectedData({
...data,
currentLabel: data.label,
value: data.id,
+ isTree: true,
state: {
currentLabel: data.label
}
})
// Searchable scenario
updateSelectedData({
...data,
currentLabel: data.label,
value: data.id,
+ isTree: true,
state: {
currentLabel: data.label
}
})
|
||
} | ||
}) | ||
) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -203,6 +203,24 @@ | |
} | ||
} | ||
|
||
& { | ||
.@{tag-prefix-cls} { | ||
height: 20px; | ||
} | ||
} | ||
|
||
&--medium { | ||
.@{tag-prefix-cls} { | ||
height: 24px; | ||
} | ||
} | ||
|
||
&--small, &--mini { | ||
.@{tag-prefix-cls} { | ||
height: 16px; | ||
} | ||
} | ||
Comment on lines
+218
to
+222
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Small and mini sizes should have different heights The current implementation using the same height (16px) for both small and mini sizes in the base-select component is inconsistent with the design system. Throughout the codebase:
The tag heights should be adjusted to maintain consistency with the design system. 🔗 Analysis chainVerify if small and mini sizes should share the same height The current implementation uses the same height (16px) for both small and mini sizes. Please verify if this is intentional, as typically these sizes would have different values. Based on the search results, I can see that throughout the codebase, small and mini sizes consistently have different heights. Specifically in the base variables ( --tv-size-height-xs: 24px; // mini 尺寸
--tv-size-height-sm: 28px; // small 尺寸 Let me search for the specific tag height definitions to verify if there's any intentional override. 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Search for other size definitions in the codebase to verify consistency
rg --type=less "height.*(?:small|mini)" -A 2 -B 2
Length of output: 25919 Script: #!/bin/bash
# Search for tag height definitions in the codebase
rg --type=less "tag.*height|--tv-.*tag.*height" -B 2 -A 2
Length of output: 2861 |
||
|
||
&.is-hover-expand, | ||
&.is-click-expand { | ||
vertical-align: top; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,7 +90,6 @@ | |
} | ||
|
||
.@{input-prefix-cls}__prefix { | ||
display: block; | ||
left: 0; | ||
font-size: 0; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent node structure across select scenarios
The
isTree
property is only added to nodes in the multi-select scenario (场景2), but not in the single select (场景1) or searchable select (场景3) scenarios. This inconsistency could lead to issues in components that consume this data.Consider applying this change consistently across all scenarios: