Skip to content

[V2 Bottomsheet] Fixed Bottomsheet Not Appearing in Office #786

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 16, 2025

Conversation

Dhruv-Mishra
Copy link
Collaborator

@Dhruv-Mishra Dhruv-Mishra commented Jun 5, 2025

Problem

Due to delayed loading of the Bottomsheet, the Box added for smooth resizing was not initialized in time since it was in animation causing the sheet height to be set to 0 and anchors to be set accordingly. Fixing this would require calling the Sheet Open function again. Removing Animation on content size and replacing Box with Column Spacer fixes the issue.

Screenshots

Before After
image image

Pull request checklist

This PR has considered:

  • Light and Dark appearances
  • Automated Tests
  • Documentation and demo app examples
  • VoiceOver and Keyboard Accessibility
  • Internationalization and RTL layouts
  • Size classes and window sizes (notched devices, multitasking, different window sizes, etc)

@Dhruv-Mishra Dhruv-Mishra marked this pull request as ready for review June 8, 2025 14:15
@Copilot Copilot AI review requested due to automatic review settings June 8, 2025 14:15
@Dhruv-Mishra Dhruv-Mishra requested a review from a team as a code owner June 8, 2025 14:15
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes an issue where the BottomSheet failed to appear due to delayed size animation by removing the animation and switching to a static spacer for layout.

  • Removed the animateContentSize import and modifier to prevent delayed initialization
  • Replaced an empty Box with a Spacer to reserve layout space reliably
Comments suppressed due to low confidence (3)

fluentui_drawer/src/main/java/com/microsoft/fluentui/tokenized/bottomsheet/BottomSheet.kt:369

  • Consider adding a test to verify that the BottomSheet renders correctly without animateContentSize, ensuring the sheet appears as expected in all orientations.
.animateContentSize()

fluentui_drawer/src/main/java/com/microsoft/fluentui/tokenized/bottomsheet/BottomSheet.kt:548

  • [nitpick] Add a comment explaining why the Box was replaced with Spacer to clarify the intention and guide future maintainers.
Spacer(

fluentui_drawer/src/main/java/com/microsoft/fluentui/tokenized/bottomsheet/BottomSheet.kt:13

  • [nitpick] Verify if the AnimationSpec import is still needed after removing animateContentSize and clean up any unused imports to reduce clutter.
import androidx.compose.animation.core.AnimationSpec

@Dhruv-Mishra Dhruv-Mishra merged commit 1654d5f into master Jun 16, 2025
2 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.

3 participants