Skip to content

gtk: implement command palette #7167

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

pluiedev
Copy link
Member

Closes #7156

Demo

2025-04-23_04-20-33.mp4

@pluiedev pluiedev requested a review from a team as a code owner April 23, 2025 08:22
@pluiedev pluiedev force-pushed the push-rrqqpwtzvzkp branch from c4c417b to b3d10b3 Compare April 23, 2025 08:24
@pluiedev
Copy link
Member Author

Looks like Ubuntu 24.04's blueprint-compiler is way too old, and that's causing Snap builds to fail. cc @ghostty-org/snap perhaps we have to make the Snap build via a source tarball which has all the blueprints precompiled

@jcollie
Copy link
Member

jcollie commented Apr 23, 2025

Looks like Ubuntu 24.04's blueprint-compiler is way too old, and that's causing Snap builds to fail. cc @ghostty-org/snap perhaps we have to make the Snap build via a source tarball which has all the blueprints precompiled

#6831

Copy link
Member

@jcollie jcollie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few small things, plus need #6831. Otherwise looks awesome!

@mitchellh
Copy link
Contributor

#6831 merged, should fix snap on rebase.

@pluiedev pluiedev force-pushed the push-rrqqpwtzvzkp branch 2 times, most recently from d790359 to b8cb2cc Compare April 23, 2025 14:56
@tristan957
Copy link
Member

I wonder if in the future (another PR), we should add a headerbar button for this.

@jcollie
Copy link
Member

jcollie commented Apr 23, 2025

I wonder if in the future (another PR), we should add a headerbar button for this.

I was thinking about that too, but things are already getting busy up there. Esp if you're an old timer like me and enable the maximize/minimize buttons.

image

@tristan957
Copy link
Member

I checked GNOME Builder to see if there was something there, but nope. Anyway something to keep in the back of the mind.

@tristan957
Copy link
Member

I also wonder if ctrl+enter will catch on for this in the GNOME HIG. That's the keybind that Builder uses.

@mitchellh
Copy link
Contributor

I also wonder if ctrl+enter will catch on for this in the GNOME HIG. That's the keybind that Builder uses.

That seems like a problematic keybind we’d have to diverge from. It’s a very popular binding for shells and editors. One of the first I hear about if I break it :) there are a few like that where we had to diverge since control alone is used for many terminal things.

Copy link
Contributor

@mitchellh mitchellh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small change but the rest looks great!

@tristan957
Copy link
Member

tristan957 commented Apr 23, 2025

I'm not sure how much I like the focus ring for marking focus. I think I like what GNOME Builder does a bit more. It also seems to be what we do in the mac runtime according to this image:

image

I think the most glaring issue is that when the focus ring transits the bottom of the dialog, which can be seen in your video at ~7 seconds, it looks like its just chopped off. Here is GNOME Builder in comparison:

image

To me, it seems a bit cleaner. Give that I mentioned the mac runtime also uses a similar pattern, I'm hoping to generate some discussion.

@tristan957
Copy link
Member

Another design thing: I like what the Builder dialog does where the entry bleeds into the top of the command palette (no visible entry). Again, also seems to be what we do in the mac runtime.

@tristan957
Copy link
Member

Take these design comments with a grain of salt because we could tackle them in a subsequent PR if we think there are improvements to be made :)

@mitchellh
Copy link
Contributor

Just want to note that the UX doesn't need to match macOS exactly. Comparing the two is always a healthy tension but happy to merge this and iterate on it (similar to what macOS is doing now).

@tristan957
Copy link
Member

Just want to note that the UX doesn't need to match macOS exactly

Agree, just wanted to acknowledge prior design art.

@pluiedev
Copy link
Member Author

The thing is that the way GNOME Builder does it is... awfully complex. We're talking a custom reimplementation of the search bar widget, hacking around how selection and focus works, and in general it's super bespoke. I think an off-the-shelf solution is better for now, and we could always reiterate on this later

@pluiedev pluiedev force-pushed the push-rrqqpwtzvzkp branch from b8cb2cc to 2f7089f Compare April 24, 2025 03:59
@pluiedev pluiedev requested a review from mitchellh April 24, 2025 03:59
@pluiedev pluiedev force-pushed the push-rrqqpwtzvzkp branch from 2f7089f to 079d009 Compare April 24, 2025 04:07
@pluiedev pluiedev force-pushed the push-rrqqpwtzvzkp branch from 2b3a187 to 5b37ace Compare April 24, 2025 04:51
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.

GTK: Command Palette
4 participants