Skip to content

fix(side-panel): use correct spacing in collapse mode#1704

Draft
spike-rabbit wants to merge 1 commit intomainfrom
fix/side-panel/collapsed-spacing
Draft

fix(side-panel): use correct spacing in collapse mode#1704
spike-rabbit wants to merge 1 commit intomainfrom
fix/side-panel/collapsed-spacing

Conversation

@spike-rabbit
Copy link
Member

@spike-rabbit spike-rabbit commented Mar 20, 2026

Currently, the spacing in the collapse mode is completely off. With this change, all collapse buttons have a correct size of 48x40.


Documentation.
Examples.
Dashboards Demo.
Playwright report.

Coverage Reports:

Code Coverage

Currently, the spacing in the collapse mode is completely off.
With this change, all collapse buttons have a correct size of 48x40.
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request effectively addresses the spacing issues in the collapse mode of the side panel and collapsible panels. The changes introduce dynamic class application in the HTML templates and specific CSS rules to ensure correct sizing and spacing of elements when the panels are collapsed. The updated Playwright snapshots confirm the visual correctness of these adjustments.

Comment on lines +5 to +7
[class]="`collapsible-header focus-inside ${headerCssClasses()}`"
[class.px-5]="hcollapsed()"
[class.px-6]="!hcollapsed()"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The refactoring of the px-6 class into conditional px-5 and px-6 based on hcollapsed() is a good approach to manage spacing dynamically. This aligns with the goal of adjusting spacing in collapse mode.

Comment on lines +21 to +27
<si-icon
class="icon"
[class.p-1]="hcollapsed()"
[class.pe-2]="!hcollapsed()"
[icon]="headerIcon"
[class.collapsed-icon]="isHCollapsible"
/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Applying conditional padding classes (p-1 and pe-2) to the si-icon based on the hcollapsed() state is a clean way to handle the icon's spacing in different modes. This improves the visual consistency of the component.

</span>
}
<span class="ms-auto overflow-hidden">
<span class="ms-auto autohide">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Changing overflow-hidden to autohide for the dropdown caret span is a functional improvement. This leverages the existing .autohide class defined in the SCSS to correctly manage visibility when the panel is collapsed, ensuring the caret behaves as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant