Skip to content

Fix bottom sheet peek height to use resolveBottomSheetPeekHeight consistently#6216

Draft
Claude wants to merge 2 commits intofix/bottomsheet-edge-to-edgefrom
claude/sub-pr-6192
Draft

Fix bottom sheet peek height to use resolveBottomSheetPeekHeight consistently#6216
Claude wants to merge 2 commits intofix/bottomsheet-edge-to-edgefrom
claude/sub-pr-6192

Conversation

@Claude
Copy link
Contributor

@Claude Claude AI commented Mar 12, 2026

Addresses automated review feedback on bottom sheet safe-area handling. The peek height calculations were bypassing the base class's resolveBottomSheetPeekHeight() helper, causing inconsistent bottom inset handling between initial and dynamic updates.

Changes

  • Remove manual navigationBarHeight from bottom margins - resolveBottomSheetPeekHeight() already handles safe-area insets, so manual addition caused double-counting
  • Route dynamic peek height updates through resolveBottomSheetPeekHeight() - Ensures consistent safe-area behavior across gesture/button navigation devices

Before:

binding.opLl.updateLayoutParams<ViewGroup.MarginLayoutParams> {
    bottomMargin = requireContext().navigationBarHeight() + 24.dp
}
behavior?.peekHeight = binding.title.height + binding.scrollContent.height - ...

After:

binding.opLl.updateLayoutParams<ViewGroup.MarginLayoutParams> {
    bottomMargin = 24.dp
}
val contentHeight = binding.title.height + binding.scrollContent.height - ...
behavior?.peekHeight = requireContext().resolveBottomSheetPeekHeight(contentView, contentHeight)

Applies to both UserBottomSheetDialogFragment and GroupBottomSheetDialogFragment.

…istently

- Remove manual navigationBarHeight addition from bottom margins (safe area now handled by resolveBottomSheetPeekHeight)
- Update UserBottomSheetDialogFragment and GroupBottomSheetDialogFragment to use resolveBottomSheetPeekHeight when setting peek height
- Ensure consistent safe-area inset handling between initial and dynamic peek height updates

Co-authored-by: crossle <1675131+crossle@users.noreply.github.com>
@Claude
Copy link
Contributor Author

Claude AI commented Mar 12, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • dl.google.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED -XX:&#43;UseParallelGC -Xmx10g -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en (dns block)
  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh gh pr view --json number,title,body,reviews,comments /home/REDACTED/.nvm/bash_completion /home/REDACTED/.nvm/install.sh /home/REDACTED/.nvm/nvm-exec /home/REDACTED/.nvm/nvm.sh /home/REDACTED/.nvm/package.json /home/REDACTED/.nvm/rename_test.sh /home/REDACTED/.nvm/test (http block)

If you need me to access, download, or install something from one of these locations, you can either:

@Claude Claude AI changed the title [WIP] Update bottom margin for user/group bottom sheets Fix bottom sheet peek height to use resolveBottomSheetPeekHeight consistently Mar 12, 2026
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.

2 participants