fix: inline connector dot alignment for tooltip-above-target#47
Merged
Conversation
When titleInlineWithConnector is enabled and the tooltip appears above the target, the connector dot now renders at the bottom of the tooltip Column, aligning with the content start. The connector line draws from the cutout edge to this measured dot position.
The connector dot offset should match the target center for both tooltip-above and tooltip-below cases, avoiding a diagonal connector line to the far-left edge.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes inline connector dot misalignment when
titleInlineWithConnectoris enabled and the tooltip renders above the target. Previously, inline mode only activated for tooltip-below; now it supports both directions.Before / After
targetCenter.x, misaligned with titleKey behavioral differences (tooltip-above):
Before:
isInlineTitleActivewasfalse— fell back to canvas-drawn dottargetCenter.xdidn't match title text positionAfter:
isInlineTitleActiveistruefor all vertical connectorsconnectorDotOffsetX = 0.dp)Changes
Internal
CoachmarkTooltip.kt: AddedisTooltipBelowparameter. When below → existing top Row (dot + title). When above → title renders normally, bottom Row with dot added after footerCoachmarkScrim.kt: Removed&& isTooltipBelowgate fromisInlineTitleActive. ExtractedisTooltipBelowto outer scope. Passed throughTooltipContainer→CoachmarkTooltip. SetconnectorDotOffsetX = 0.dpfor above caseBreaking Changes
None
Platform Support
Testing
./gradlew :lumen:compileKotlinJvm(commonMain)./gradlew :sample:assembleDebug(sample app)titleInlineWithConnector = trueon a target where tooltip appears above, verify dot at bottom aligns with connectorRelease Notes
Features