Style: Adjust tooltip positioning in main.css.#1497
Open
DSingh0304 wants to merge 1 commit intozulip:mainfrom
Open
Style: Adjust tooltip positioning in main.css.#1497DSingh0304 wants to merge 1 commit intozulip:mainfrom
main.css.#1497DSingh0304 wants to merge 1 commit intozulip:mainfrom
Conversation
57cc3b7 to
ca0b0ef
Compare
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.
ca0b0ef to
ea59a02
Compare
Collaborator
|
@shubham-padia Is this a good approach? |
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.
This PR aligns the
.server-tooltipspacing 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
leftoffset of all tooltips to58pxand 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:
Platforms this PR was tested on:
Self-review checklist
(variable names, code reuse, readability, etc.).
Communicate decisions, questions, and potential concerns.
Individual commits are ready for review (see commit discipline).
Completed manual review and testing of the following: