bito-code-review[bot] commented on code in PR #39257:
URL: https://github.com/apache/superset/pull/39257#discussion_r3661312496
##########
superset-frontend/src/components/Datasource/components/DatasourceEditor/DatasourceEditor.tsx:
##########
@@ -741,6 +784,18 @@ function ColumnCollectionTable({
</StyledLabelWrapper>
),
type: d => (d ? <Label>{String(d)}</Label> : null),
+ expression: (v, onChange) => (
+ <TextAreaControl
+ initialValue={v as string}
+ onChange={onChange}
+ extraClasses={['datasource-sql-expression']}
+ language="sql"
+ offerEditInModal={false}
+ minLines={5}
+ textAreaStyles={{ minWidth: '100%', maxWidth: 'none' }}
+ resize="both"
+ />
+ ),
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Prop not forwarded to DOM</b></div>
<div id="fix">
The `extraClasses={['datasource-sql-expression']}` prop passed to
`TextAreaControl` has no effect — `TextAreaEditor` (line 173) only receives a
`style` prop, and the component does not forward the `className` to its wrapper
div. This means the CSS rule at lines 410-414 (`.datasource-sql-expression {
width: 100%; min-width: 460px; max-width: none; }`) never applies to the
rendered textarea, so the wide SQL layout styling fails to activate for the
expression field.
</div>
</div>
<small><i>Code Review Run #c48b25</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]