bito-code-review[bot] commented on code in PR #37298:
URL: https://github.com/apache/superset/pull/37298#discussion_r2710438376
##########
superset-frontend/src/SqlLab/components/AppLayout/index.tsx:
##########
@@ -99,47 +139,59 @@ const AppLayout: React.FC = ({ children }) => {
return (
<StyledContainer>
- <Splitter
- css={css`
- flex: 1;
- `}
- lazy
- onResizeEnd={onSidebarChange}
- onResize={noop}
- >
- <Splitter.Panel
- collapsible={{
- start: true,
- end: true,
- showCollapsibleIcon: true,
- }}
- size={leftWidth}
- min={SQL_EDITOR_LEFTBAR_WIDTH}
+ <StyledSidebarWrapper>
+ <Layout.Sider
+ collapsed
+ collapsedWidth={SQL_EDITOR_LEFTBAR_COLLAPSED_WIDTH}
+ >
+ <StyledMenu
+ mode="vertical"
+ items={collapsedMenuItems}
+ selectable={false}
+ />
+ </Layout.Sider>
+ <Splitter
+ css={css`
+ flex: 1;
+ `}
+ lazy
+ onResizeEnd={onSidebarChange}
+ onResize={noop}
>
- <StyledSidebar>
- <SqlEditorLeftBar
- key={queryEditorId}
- queryEditorId={queryEditorId}
- />
- </StyledSidebar>
- </Splitter.Panel>
- <Splitter.Panel className="sqllab-body">{children}</Splitter.Panel>
- {contributions.length > 0 && (
<Splitter.Panel
collapsible={{
start: true,
end: true,
showCollapsibleIcon: true,
}}
- size={rightWidth}
- min={SQL_EDITOR_RIGHTBAR_WIDTH}
+ size={leftWidth - SQL_EDITOR_LEFTBAR_COLLAPSED_WIDTH}
+ min={SQL_EDITOR_LEFTBAR_WIDTH - SQL_EDITOR_LEFTBAR_COLLAPSED_WIDTH}
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Sidebar collapse blocked</b></div>
<div id="fix">
The sidebar panel's min size is set to 344px, but since the layout now
includes a collapsed sider and the panel can shrink to 0 when toggled, this
prevents collapsing. Setting min to 0 enables proper toggle behavior.
</div>
<details>
<summary>
<b>Code suggestion</b>
</summary>
<blockquote>Check the AI-generated fix before applying</blockquote>
<div id="code">
````suggestion
min={0}
````
</div>
</details>
</div>
<small><i>Code Review Run #9ba2ef</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]