atlas-engineer / nyxt

Nyxt - the hacker's browser.
https://nyxt-browser.com/
9.82k stars 410 forks source link

Rethink prompt buffer UI #2687

Closed aadcg closed 1 year ago

aadcg commented 1 year ago

When users invoke the prompt buffer, the suggestions are their main focus.

Between the input area and the suggestions, (in the most general case) there are two headers that draw the users' attention.

In other words, the suggestions start at the 4th line of the prompt buffer's UI. Given that it's the main focus, it takes some time to understand that those are the spotlight.

Obviously, the first line (input area) needs to be there.

Input Area
Source Header
  Source Attributes Header
  Suggestion 1
  Suggestion 2
  ...
  Suggestion N

Notice that the indentation between Source Header and Source Attributes Header hints at the fact that those Suggestions are part of that Source.

When looking at the Source Header, it's not obvious that its content refers to source names.

2022-12-02_15:55:00

Issue PA 1 - inconsistent buffer focus selectors

The interaction:

  1. is not consistent with the expectation users bring from other apps;
  2. does not have a visible status;
  3. causes errors in other places when users type things in random websites intending to type in the Prompter of our Prompt Area.
aadcg commented 1 year ago

@lansingthomas, any preliminary comment?

lansingthomas commented 1 year ago

Idea for execute commands menu

Problem 1 - too many lines before relevant information

Problem 2 - I do not understand this yet. Let's talk about it over voice.

aadcg commented 1 year ago

@lansingthomas you already helped. Ignore the rest of this discussion (you don't have enough background to follow it yet).

I was going to say that @lansingthomas's idea doesn't make much sense since he didn't understand the difference between sources and its attributes. But actually his observation is spot on. Why can't we have the first source attribute (the first column in prompt buffer) coincide with the source name? Is there a counter example in our codebase?

CC @aartaka.

aadcg commented 1 year ago

Actually we can't do this. set-url-new-buffer serves as a counter example.

Well, we actually can. With some attribute renaming.

aartaka commented 1 year ago

@lansingthomas you already helped. Ignore the rest of this discussion (you don't have enough background to follow it yet).

It might still be related to Thomas' expertize, let'd not exclude him :P

Some terms so that we're on the same page:

I was going to say that @lansingthomas's idea doesn't make much sense since he didn't understand the difference between sources and its attributes. But actually his observation is spot on. Why can't we have the first source attribute (the first column in prompt buffer) coincide with the source name? Is there a counter example in our codebase?

We cannot, I'm guessing. Sources and their attributes are totally separate semantically, and should not be conflated unless we are willing to confuse the person using them. It's often the case that source name conicides with the first attribute name, but that's mostly because we tend to collect things into sources based a certain identity grouping that manifests itself both in source name and default/first attribute name. It's more than intuitive that if you collect books you'd have source named "Books" and the first attribute being simply "Book" or "Name".

So what we need it not hierarchy collapse, what we need is hierarchy highlighting. Like "This is a set of books, they belong to the same place, and here are individual books with their specific propreties" as an interface-induced takeaway. We can use some background that unites all of the suggestions for a source, and some visible nesting (instead of almost-invisible indentation) so that sources' names and attributes make much more sense.

Or we can have a good descriptive text for those and forget about tweaking interface in the places where only a good text could explaing things.

aadcg commented 1 year ago

So what we need it not hierarchy collapse, what we need is hierarchy highlighting.

I agree with everything you say, but that doesn't seem to bring us any closer to de-cluttering the prompt buffer UI.

Perhaps you think that Problem 1 is not a problem?

aartaka commented 1 year ago

Perhaps you think that Problem 1 is not a problem?

Indeed, I don't see it as a problem.

aadcg commented 1 year ago

@lansingthomas after our session yesterday, you should be able to follow this discussion from top to bottom.

I've assigned you to this issue since you're iterating on a new specification for the prompt buffer.

lansingthomas commented 1 year ago

The form of the prompt buffer (prompt area) is evolving. Let's try to take out the easy stuff first -- one at a time.

Some issues related to this:

lansingthomas commented 1 year ago

Proposal for a UI enhancement

these few changes to the prompt buffer will:

  1. add clickable exit functionality
  2. visually connect the status bar and the input buffer area.

this image displays the destination

Clickable exit (5)

this image highlights the changes

Clickable exit (highlighted)

how we got here

specifications for the elements

clickable exit shape

chamfer and bar along the right side

@aadcg @aartaka

Are you good with clickable exit?

Are you good with side bar & chamfer?

Are we clear about the changes?

aadcg commented 1 year ago

All great ideas in my view @lansingthomas!

Ambrevar commented 1 year ago

All good on my end!

lansingthomas commented 1 year ago

Nice! We are aligned!

Now who wants to tackle this one?

aartaka commented 1 year ago

@lansingthomas, sorry for the late reply. I have two complains here:

aadcg commented 1 year ago

First, the area you're suggesting putting this X into is already used to list modes enabled in prompt buffer. Adding to or replacing those will likely be quite confusing.

Notice that @lansingthomas said:

further UI changes are in process (including modes and other status bar elements) -- the changes here accommodate the upcoming changes.

In my understanding, he and @jmercouris are re-thinking the way modes are displayed in the prompt buffer. Later, there will be further instructions on how to handle them.

I don't know what are their plans on that but, personally, I think that the modes enabled in the prompt buffer should be displayed in a radical different way than we do now.

Why two options at the same time? Either of those is clear enough and should be mostly sufficient as the way to close prompt buffer.

Do you mean that there would be a keyboard and mouse based way to close the prompt buffer? In my understanding that's exactly the goal: provide an additional and intuitive (mouse-based) way to close the prompt buffer.

aartaka commented 1 year ago

Why two options at the same time? Either of those is clear enough and should be mostly sufficient as the way to close prompt buffer.

Do you mean that there would be a keyboard and mouse based way to close the prompt buffer? In my understanding that's exactly the goal: provide an additional and intuitive (mouse-based) way to close the prompt buffer.

No, what I meant is that there's too much mouse-based ways: the cross and the chevron, both doing the same thing. It feels redundant. I don't understand why we need both of those.

aadcg commented 1 year ago

No, what I meant is that there's too much mouse-based ways: the cross and the chevron, both doing the same thing. It feels redundant. I don't understand why we need both of those.

I didn't interpret the proposed changes like that. The cross is displayed inside the chevron, but that's a single close button. @lansingthomas is my understanding accurate?

aartaka commented 1 year ago

Ah chevron/chamfer, I confused those (*/∇\*)

I mean, why we need this-area-with-a-cross-on-the-top-of-prompt-buffer and this-small-triangle-in-the-bottom-right-corner, if they are doing the same thing?

aadcg commented 1 year ago

I mean, why we need this-area-with-a-cross-on-the-top-of-prompt-buffer and this-small-triangle-in-the-bottom-right-corner, if they are doing the same thing?

I don't think they are doing the same thing, and I'd suggest going through @lansingthomas' proposal again!

The cross embedded in the chevron is a button to close the prompt buffer. The small triangle + the thin line on the right are aesthetical details that communicate continuity between the status buffer and the input area (I'm just rephrasing @lansingthomas' specification).

lansingthomas commented 1 year ago

Yes, can confirm -- the hover-able area behind the X (within the chevron) should be the clickable exit.

lansingthomas commented 1 year ago

update: @aartaka and I started to speak on video today but connection issues prevented meaningful exchange.

Why the chamfer you ask?

jmercouris commented 1 year ago

Just a heads up, I am working on this :-)

aadcg commented 1 year ago

@lansingthomas could you re-read and conclude whether there is any actionable task left to squeeze from this thread?

aadcg commented 1 year ago

@lansingthomas friendly ping :)

lansingthomas commented 1 year ago

looks fantastic. Well done all.