bito-code-review[bot] commented on code in PR #40970:
URL: https://github.com/apache/superset/pull/40970#discussion_r4075493815
##########
superset-frontend/src/filters/components/Select/SelectFilterPlugin.tsx:
##########
@@ -102,14 +102,32 @@ const StyledSpace = styled(Space)<{
width: 100%;
.exclude-select {
- width: 80px;
- flex-shrink: 0;
+ width: 100%;
+ min-width: 80px;
}
&.ant-space {
.ant-space-item {
width: ${({ inverseSelection }) => (!inverseSelection ? '100%' :
'auto')};
}
+
+ ${({ inverseSelection }) =>
+ inverseSelection &&
+ `
+ .ant-space-item:first-of-type {
+ flex: 1 1 25%;
+ }
+
+ .ant-space-item:last-child {
+ flex: 3 1 75%;
+ min-width: 0;
+ }
+
+ .select-container {
+ width: 100% !important;
+ max-width: none !important;
+ }
+ `}
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Config modal select squeezed to 75%</b></div>
<div id="fix">
The new flex block (114-130) is gated only on `inverseSelection`, but the
exclude-select it sizes is hidden in the config modal (line 631: `appSection
!== AppSection.FilterConfigModal`). There, the single `.ant-space-item` matches
both `:first-of-type` and `:last-child`; `:last-child`'s `flex: 3 1 75%` wins,
and flex-basis overrides `width: 100% !important`, shrinking the select to 75%.
Gate the block on `inverseSelection && appSection !==
AppSection.FilterConfigModal` to match the render condition.
</div>
</div>
<small><i>Code Review Run #c0c539</i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]