nyxt icon indicating copy to clipboard operation
nyxt copied to clipboard

Display source count

Open Ambrevar opened this issue 1 year ago • 8 comments

I believe we need a way to display the number of sources in the prompt buffer, otherwise we might be let to believe there is only one source.

The problem is that sources already display the number of suggestions in square brackets.

So how to we display yet another number that's self-explanatory?

Ambrevar avatar Sep 10 '22 10:09 Ambrevar

Maybe display the names of neighbor sources above and below the current one?

aartaka avatar Sep 10 '22 11:09 aartaka

Indeed, could fix together with #2033.

Ambrevar avatar Sep 12 '22 06:09 Ambrevar

Maybe display the names of neighbor sources above and below the current one?

I don't think I understood your suggestion.

My suggestion is as depicted below. If the sources would be shown right below the input area, it would be clear there are several of them. I suggest a familiar tab-like UI, where it's visible which source is currently active.

2022-09-12_09:40:16

aadcg avatar Sep 12 '22 06:09 aadcg

No, not tabs, please ‎(٭°̧̧̧ω°̧̧̧٭) They are a pain to implement in HTML...

What I meant in my previous suggestion is showing the source headers for the next and previous source below and above (respectively) the displayed contents of the current source. This way, we can both show that there's something below, while preserving the simplicity of the current interface.

This is not perfect, though—these ghost headers can confuse one about the contents of the current source being less than in fact.

aartaka avatar Sep 12 '22 16:09 aartaka

Actually what doesn't convince me about your suggestions is the fact that you'll burn precious lines of the prompt buffer.

Fair enough about tabs. I guess we could do something very simple in the vein of "tabs". List the sources horizontally and highlight the current source.

aadcg avatar Sep 12 '22 17:09 aadcg

How about a little button on the left of every source that the user can click on to jump to the next/previous source?

A up and down arrow that they can press?

jmercouris avatar Sep 13 '22 03:09 jmercouris

Since we have some padding to the left, I guess John's suggestion addresses André's concern.

Ambrevar avatar Sep 13 '22 07:09 Ambrevar

Indeed, I like John's idea.

aadcg avatar Sep 13 '22 07:09 aadcg