Skip to content

Place overlay debug panels on the side that fits#853

Open
vibhor1102 wants to merge 5 commits into
Nain57:masterfrom
vibhor1102:codex/adaptive-debug-panel-placement
Open

Place overlay debug panels on the side that fits#853
vibhor1102 wants to merge 5 commits into
Nain57:masterfrom
vibhor1102:codex/adaptive-debug-panel-placement

Conversation

@vibhor1102
Copy link
Copy Markdown

Summary

Fixes #850.

This PR makes horizontal debug/result panels choose a side around the floating overlay buttons instead of always assuming that the panel can open to the right.

It applies to:

  • the main running toolbar live debug panel
  • the try-event live debug panel
  • the try-image-condition result/threshold panel

Behavior

Right-side placement remains the default. The panel flips left only when all of these are true:

  • the panel cannot fully fit on the right side of the button cluster
  • the panel can fully fit on the left side
  • the left side has more available room than the right side

When the panel flips left, the button cluster remains the user's visual anchor. The overlay window shifts left so the buttons stay where the user placed them.

Other Details

  • Placement is rechecked after the user releases the move button, not continuously during drag.
  • The stored overlay position remains the logical button-cluster anchor, not the shifted left-panel window edge.
  • The panel is reordered inside the same rounded CardView rather than split into a second overlay window.
  • Debug separators move to the inner edge when the panel is on the left.
  • Try-event and try-image-condition placement calculations now use the actual panel widths from their layouts.

Animation Caveat

This improves the clipping/placement logic and reduces a few right-side assumptions in the transition path. The resize animation may still benefit from maintainer-side visual tuning on a real device: when the panel is on the left and the buttons are anchored on the right, Android's layout-change transition can still feel like it is folding from the larger debug panel instead of perfectly from the button anchor. I am calling this out because the mechanical placement behavior is covered here, while the final motion polish is much easier to judge with live overlay feedback.

Validation

  • ./gradlew.bat --no-daemon --max-workers=3 --console=plain :core:common:overlays:testFDroidDebugUnitTest :feature:smart-config:compileFDroidDebugKotlin :feature:smart-debugging:compileFDroidDebugKotlin

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.

Live debug panel can be clipped near landscape screen edges

1 participant