zed icon indicating copy to clipboard operation
zed copied to clipboard

Better ui design when hovering over words

Open mateo-meillon opened this issue 1 year ago • 11 comments

Check for existing issues

  • [x] Completed

Describe the feature

It would be nice if the popup and text would be one :))

If applicable, add mockups / screenshots to help present your vision of the feature

Before: Screenshot 2024-02-15 at 16 26 08

After: Screenshot 2024-02-15 at 16 26 08

mateo-meillon avatar Feb 15 '24 15:02 mateo-meillon

No one's currently working on this right? @JosephTLyons

SouravInsights avatar Feb 22 '24 02:02 SouravInsights

No one's currently working on this right? @JosephTLyons

Nope, not to my knowledge. Would you like me to assign it to you?

JosephTLyons avatar Feb 22 '24 02:02 JosephTLyons

Would love to work on this but I haven't explored the codebase fully yet! It's my first time trying to contribute to Zed so I guess I'll have to spend some more time exploring the codebase first.. If it's not too much to ask, can you please point me to the right crate dir I should be looking at for this enhancement?

SouravInsights avatar Feb 22 '24 02:02 SouravInsights

You're looking for https://github.com/zed-industries/zed/blob/e5d971f4c71aa2bb3c3aaea9d0838502c194992c/crates/editor/src/hover_popover.rs file, there are multiple flavors of those with their own render method responsible for drawing the thing.

SomeoneToIgnore avatar Feb 22 '24 09:02 SomeoneToIgnore

You're looking for https://github.com/zed-industries/zed/blob/e5d971f4c71aa2bb3c3aaea9d0838502c194992c/crates/editor/src/hover_popover.rs file, there are multiple flavors of those with their own render method responsible for drawing the thing.

Yep found it out! But thanks anyway.. 🙂

SouravInsights avatar Feb 22 '24 09:02 SouravInsights

CleanShot 2024-02-22 at 19 08 03@2x

What happens in a scenario like this? If the Popover Anchor & the Popover Element is combined together, do you think it will look odd? @JosephTLyons @mateo-meillon

SouravInsights avatar Feb 22 '24 13:02 SouravInsights

@SouravInsights Haha, good question. Let me think about that

mateo-meillon avatar Feb 22 '24 14:02 mateo-meillon

@SouravInsights I would probably just make the top one artificially longer

mateo-meillon avatar Feb 23 '24 12:02 mateo-meillon

@SouravInsights I would probably just make the top one artificially longer

Could probably work!! How do we get some concrete feedback on this? @mateo-meillon @JosephTLyons

SouravInsights avatar Feb 23 '24 14:02 SouravInsights

Good question - Going to lean on @SomeoneToIgnore for some advice here!

JosephTLyons avatar Feb 26 '24 21:02 JosephTLyons

VSCode: image image

RustRover: image image

It looks like we can add some padding, customize the border a bit, and maybe add more contrast? Not sure we need to get into anything fancy as that arrow-like edge of the bubble though.

SomeoneToIgnore avatar Feb 26 '24 21:02 SomeoneToIgnore