Skip to content

considering the first snackbars height in combined height calculation - #841

Merged
Pranjal Singh (pranjal-glowingstar) merged 1 commit into
masterfrom
user/savenepally/fix-expanded-snackbar-height-linked
Oct 6, 2026
Merged

Pranjal Singh (pranjal-glowingstar) merged 1 commit into
masterfrom
user/savenepally/fix-expanded-snackbar-height-linked

Conversation

@Sab-do3

@Sab-do3 Sahasra_venepally (Sab-do3) commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

The expanded stackable snackbar height did not include the first snackbar, causing the combined stack height to be too small and is clipping the expanded stack.

Root cause

 heightAfterIndex(0)  calculates the height starting after index  0 , so the first snackbar was excluded from  combinedStackHeight .

Fix

Changed the calculation to  heightAfterIndex(-1) , which starts from index  0  and includes every visible snackbar in the expanded stack.

Validations

Verified that  heightAfterIndex(-1)  includes all visible snackbar heights.
Checked efficacy with multiple snackbars in fluent ui and Exported the aar to local word build and checked the print screen message.
Truncation issue resolved:
https://onedrive.cloud.microsoft/:i:/a@w4j39v4s/S/cQqsvXLLbRcrT6DgC4GN7GyMEgUB4ZgAhK55GzQumQCTOrlt3Q

Copilot AI balanced review requested due to automatic review settings September 30, 2026 10:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The focused change correctly includes the previously omitted first snackbar.

Review effort: Balanced
Findings: None

What changed in this PR

Updates expanded snackbar stack height calculation to include the first visible snackbar.

Changes:

  • Calculates total height from before index 0, preventing clipping and incorrect positioning.
File Description
StackableSnackbar.kt Includes all visible snackbars in expanded stack height.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@pranjal-glowingstar
Pranjal Singh (pranjal-glowingstar) merged commit 207ae68 into master Oct 6, 2026
5 of 6 checks passed
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.

4 participants