Tooltip bacgkround incorrect width
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 67/100
Research direction
Start with the tooltip component used by Tooltip::new in the reproduction, then trace how its content width and background size are laid out. Reproduce the issue with the supplied long tooltip text and compare the background with the text bounds. Done when the tooltip background correctly covers the longer text.
Written by the indexing model from the issue text.
Description
Description
Incorrect tooltip background size for longer texts
Environment
- GPUI: gpui-fast: 0.1.12
- GPUI Component: 0.8.1
- Platform: Linux wayland
Steps to Reproduce
Compile this:
use gpui_kit::component::{ActiveTheme, tooltip::Tooltip};
use gpui_kit::*;
struct Repro;
impl Render for Repro {
fn render(&mut self, _: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
div()
.size_full()
.flex()
.items_center()
.justify_center()
.bg(cx.theme().background)
.text_color(cx.theme().foreground)
.child(div().id("trigger").child("Hover here").tooltip(|window, cx| {
Tooltip::new("Band AD_WBGT_20240621T00-20240621T23 - WBGT [time=477499]")
.max_w_96()
.build(window, cx)
}))
}
}
fn main() {
gpui_kit::application().run(|cx| {
gpui_kit::init(cx);
if let Err(error) = gpui_kit::open_window(WindowOptions::default(), cx, |_, cx| cx.new(|_| Repro)) {
eprintln!("Failed to open window: {error}");
cx.quit();
return;
}
cx.set_quit_mode(QuitMode::LastWindowClosed);
cx.activate(true);
});
}
Hover the mouse over "Hover here"
Inspect the tooltip
Screenshots
Expected
Correct tooltip background
Actual
Incorrect tooltip background
- Dominant language
- Rust
- Stars
- 18.9k
- Forks
- 1.2k
- Avg merge
- 23h 26m
- Merged PRs (30d)
- 269
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from longbridge/gpui-kit
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
longbridge/gpui-kit#3795 ·
Maintainers usually reply within 1 day
-
DataTable: Tab and Shift+Tab can't leave a focused tablePossibly taken @huacnlee claimed this 2 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
longbridge/gpui-kit#3788 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
longbridge/gpui-kit#3711 ·
Maintainers usually reply within 1 day
-
bundle: ignores the manifest entryPossibly taken @huacnlee claimed this 13 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
longbridge/gpui-kit#3675 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
longbridge/gpui-kit#3630 ·
Maintainers usually reply within 1 day
All issues in longbridge/gpui-kit
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
pop-os/cosmic-applets#1619 ·
Maintainers usually reply within 3 days
-
binding:python bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
coollabsio/orbit#72 ·
Maintainers usually reply within 1 day
-
swc_common: Mark::least_ancestor never returns when the answer is the root mark (ANT-2026-JYDQGGRT)Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
swc-project/swc-ai-issues#137 ·
-
Synth suite fails unless run from the repo root: signal_flow's default machine path is cwd-relativeOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
Nimblesite/osprey#370 ·
Maintainers usually reply within 1 day