bito-code-review[bot] commented on code in PR #37881:
URL: https://github.com/apache/superset/pull/37881#discussion_r2836830771
##########
superset-frontend/src/dashboard/components/gridComponents/Column/Column.tsx:
##########
@@ -103,11 +103,11 @@ const ColumnStyles = styled.div<{ editMode: boolean }>`
z-index: ${EMPTY_CONTAINER_Z_INDEX};
width: 100%;
height: ${theme.sizeUnit * 4}px;
- &:first-child {
+ &:first-of-type {
inset-block-start: 0;
}
}
- &:first-child:not(.droptarget-edge) {
+ &:first-of-type:not(.droptarget-edge) {
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Inconsistent CSS selectors</b></div>
<div id="fix">
The change from :first-child to :first-of-type in lines 106 and 110 is
correct for targeting the first .empty-droptarget element regardless of sibling
types, but the selector on line 116 still uses :first-child, creating
inconsistency. This could lead to incorrect styling of non-first drop targets
if the first .empty-droptarget isn't the first child element.
</div>
<details>
<summary>
<b>Code suggestion</b>
</summary>
<blockquote>Check the AI-generated fix before applying</blockquote>
<div id="code">
```
- height: 100%;
- }
- &:not(:first-child):not(.droptarget-edge) {
- width: 100%;
- min-height: ${theme.sizeUnit * 4}px;
+ height: 100%;
+ }
+ &:not(:first-of-type):not(.droptarget-edge) {
+ width: 100%;
+ min-height: ${theme.sizeUnit * 4}px;
```
</div>
</details>
</div>
<small><i>Code Review Run #d99fbe</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
##########
superset-frontend/src/pages/GroupsList/index.tsx:
##########
@@ -338,7 +338,7 @@ function GroupsList({ user }: GroupsListProps) {
unfilteredLabel: t('All'),
fetchSelects: async (filterValue, page, pageSize) =>
fetchUserOptions(filterValue, page, pageSize, addDangerToast),
- dropdownStyle: { minWidth: WIDER_DROPDOWN_WIDTH },
+ popupStyle: { minWidth: WIDER_DROPDOWN_WIDTH },
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Use styles.popup.root for Ant Design v5 Select</b></div>
<div id="fix">
In Ant Design v5, popupStyle is deprecated for Select dropdown styling. Use
styles.popup.root instead. Apply the same change to line 341. The SelectFilter
component also needs updating to pass styles to the Select components.
</div>
<details>
<summary>
<b>Code suggestion</b>
</summary>
<blockquote>Check the AI-generated fix before applying</blockquote>
<div id="code">
````suggestion
styles: { popup: { root: { minWidth: WIDER_DROPDOWN_WIDTH } } },
````
</div>
</details>
</div>
<small><i>Code Review Run #d99fbe</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
##########
superset-frontend/src/pages/GroupsList/index.tsx:
##########
@@ -338,7 +338,7 @@ function GroupsList({ user }: GroupsListProps) {
unfilteredLabel: t('All'),
fetchSelects: async (filterValue, page, pageSize) =>
fetchUserOptions(filterValue, page, pageSize, addDangerToast),
- dropdownStyle: { minWidth: WIDER_DROPDOWN_WIDTH },
+ popupStyle: { minWidth: WIDER_DROPDOWN_WIDTH },
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Use styles.popup.root for Ant Design v5 Select</b></div>
<div id="fix">
In Ant Design v5, popupStyle is deprecated for Select dropdown styling. Use
styles.popup.root instead. Same change as for line 330. The SelectFilter
component also needs updating to pass styles to the Select components.
</div>
</div>
<small><i>Code Review Run #d99fbe</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
##########
superset-frontend/src/pages/DashboardList/index.tsx:
##########
@@ -640,7 +640,7 @@ function DashboardList(props: DashboardListProps) {
user,
),
paginate: true,
- dropdownStyle: { minWidth: WIDER_DROPDOWN_WIDTH },
+ popupStyle: { minWidth: WIDER_DROPDOWN_WIDTH },
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Ant Design v5 API Migration</b></div>
<div id="fix">
This change updates the filter configuration to use popupStyle instead of
the deprecated dropdownStyle, aligning with Ant Design v5. However, the
SelectFilter component still expects dropdownStyle, so the mapping in
Filters/index.tsx temporarily bridges this. To fully complete the migration,
update SelectFilter and @superset-ui/core Select to use popupStyle directly.
</div>
</div>
<small><i>Code Review Run #d99fbe</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
##########
superset-frontend/src/pages/DashboardList/index.tsx:
##########
@@ -605,7 +605,7 @@ function DashboardList(props: DashboardListProps) {
),
optionFilterProps: OWNER_OPTION_FILTER_PROPS,
paginate: true,
- dropdownStyle: { minWidth: WIDER_DROPDOWN_WIDTH },
+ popupStyle: { minWidth: WIDER_DROPDOWN_WIDTH },
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Ant Design v5 API Migration</b></div>
<div id="fix">
This change updates the filter configuration to use popupStyle instead of
the deprecated dropdownStyle, aligning with Ant Design v5. However, the
SelectFilter component still expects dropdownStyle, so the mapping in
Filters/index.tsx temporarily bridges this. To fully complete the migration,
update SelectFilter and @superset-ui/core Select to use popupStyle directly.
</div>
</div>
<small><i>Code Review Run #d99fbe</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]