Skip to content

Explain balloon height calculation logic - #126

Closed
azayrahmad wants to merge 1 commit into
mainfrom
explanation-balloon-height-13342805500431599024
Closed

azayrahmad wants to merge 1 commit into
mainfrom
explanation-balloon-height-13342805500431599024

Conversation

@azayrahmad

Copy link
Copy Markdown
Owner

I have provided a detailed explanation of the balloon height calculation logic in src/ui/Balloon.ts.

The gaps occur because:

  1. Many characters (including Clippy) default to a minimum height of 2 lines (numLines: 2) if the BalloonSizeToText flag is absent.
  2. The code enforces this minimum height by multiplying the line height (1.4x font size) by the number of lines.
  3. An additional 17px of padding is always reserved at the bottom to prevent text from overlapping with the balloon's tip.

No code changes were made as per the user's request for an explanation first.


PR created automatically by Jules for task 13342805500431599024 started by @azayrahmad

Explained the interaction between `numLines`, `lineHeight`, and tip padding in `Balloon.ts` that causes gaps below single-line text in some characters.

Co-authored-by: azayrahmad <10110227+azayrahmad@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@azayrahmad azayrahmad closed this Mar 31, 2026
@azayrahmad
azayrahmad deleted the explanation-balloon-height-13342805500431599024 branch March 31, 2026 05:19
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.

1 participant