Skip to content

Style: Adjust tooltip positioning in main.css.#1497

Open
DSingh0304 wants to merge 1 commit intozulip:mainfrom
DSingh0304:fix-server-tooltip-spacing
Open

Style: Adjust tooltip positioning in main.css.#1497
DSingh0304 wants to merge 1 commit intozulip:mainfrom
DSingh0304:fix-server-tooltip-spacing

Conversation

@DSingh0304
Copy link
Collaborator

This PR aligns the .server-tooltip spacing with the other buttons in the sidebar to ensure visual consistency and maintain the application's security boundary.

Why this fix is important:
Previously, an older PR (#1465) attempted to fix the tooltip spacing by moving the tooltip entirely to left: 60px. As noted by @timabbott, doing so broke the "Line of Death" security boundary by pushing the tooltip wholly into the untrusted webview area, opening the possibility for malicious chat content to spoof native tooltips.

This PR implements the correct architectural approach by standardizing the left offset of all tooltips to 58px and the arrow offsets to -8px. As a result, the tip of the server tooltip arrow now explicitly overlaps the 54px trusted avatar box boundary by exactly 4 pixels.

This completely resolves the original author's reported visual inconsistency (#1087) while strictly enforcing the native UI security bounds.

Fixes: #1087

Screenshots and screen captures:

Screenshot from 2026-03-04 21-37-41 Screenshot from 2026-03-04 21-37-38 Screenshot from 2026-03-04 21-37-32

Platforms this PR was tested on:

  • Windows
  • macOS
  • Linux (Ubuntu)
Self-review checklist
  • Self-reviewed the changes for clarity and maintainability
    (variable names, code reuse, readability, etc.).

Communicate decisions, questions, and potential concerns.

  • Explains differences from previous plans (e.g., issue description).
  • Highlights technical choices and bugs encountered.
  • Calls out remaining decisions and concerns.
  • Automated tests verify logic where appropriate.

Individual commits are ready for review (see commit discipline).

  • Each commit is a coherent idea.
  • Commit message(s) explain reasoning and motivation for changes.

Completed manual review and testing of the following:

  • Visual appearance of the changes.
  • Responsiveness and internationalization.
  • Strings and tooltips.
  • End-to-end functionality of buttons, interactions and flows.
  • Corner cases, error conditions, and easily imagined bugs.

@DSingh0304 DSingh0304 force-pushed the fix-server-tooltip-spacing branch from 57cc3b7 to ca0b0ef Compare March 4, 2026 16:16
Previously, the server tooltip was positioned too far to the right,
leaving a gap that entirely disconnected it from the trusted native
sidebar (breaking the 'Line of Death' security boundary).

This aligns the server tooltip's positioning with other sidebar
tooltips (like Settings and DND) by standardizing the 'left' offset
while ensuring the tooltip arrow explicitly overlaps the trusted
sidebar area. This maintains the visual security boundary while
fixing the visual inconsistency that was reported.

Fixes zulip#1087.
@DSingh0304 DSingh0304 force-pushed the fix-server-tooltip-spacing branch from ca0b0ef to ea59a02 Compare March 4, 2026 16:32
@alya
Copy link
Collaborator

alya commented Mar 4, 2026

@shubham-padia Is this a good approach?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No spacing between tooltips of organisations.

3 participants