zulip-terminal icon indicating copy to clipboard operation
zulip-terminal copied to clipboard

Panel Search Box UI Enhancements

Open Rohitth007 opened this issue 3 years ago • 6 comments

This PR deals UI enhancements related to display and reattempting search. While reattempting search:

  • The caption sets to empty string
  • The previous edit_text does not get erased so that users can edit typos.

Display:

  • Aligns the text inside search box with the rest of the panel
  • Displays edit text on new line, which reads clearer and helps render long searches properly

Rohitth007 avatar Jun 29 '21 06:06 Rohitth007

The last commit fixes a bug caused by mouse clicking on search, but I'm not entirely sure about the solution.

Rohitth007 avatar Jun 29 '21 09:06 Rohitth007

@preetmishra @neiljp I have split the PR as discussed and also dropped the mouse-fix commit as I think it would automatically get resolved with the keypress refactor. This PR only contains the Panel Search UI improvement features. (3 commits)

Rohitth007 avatar Jul 08 '21 09:07 Rohitth007

The rest of the commits can be found at #1072.

Rohitth007 avatar Jul 08 '21 15:07 Rohitth007

Heads up @Rohitth007, we just merged some commits that conflict with the changes your made in this pull request! You can review this repository's recent commits to see where the conflicts occur. Please rebase your feature branch against the upstream/main branch and resolve your pull request's merge conflicts accordingly.

zulipbot avatar Jul 15 '21 05:07 zulipbot

@Rohitth007 I just merged the first two of these separately since they are a definite improvement :tada:

However, there's been little feedback or testing of the other change, which could possibly be more convincing accompanied by other changes - such as adding hotkey hints, using a horizontal bar of color to indicate results, and whether we want a search 'prompt' (the >).

There is also scope for unifying some parts of the message search UI, at least in terms of how it is presented, after this change.

neiljp avatar Jul 15 '21 05:07 neiljp

I'm marking this as a PR completion candidate, but this will likely need some rounds of iteration to generate a consistent design, or perhaps a proposal and discussion beforehand to eg. consider how hotkeys currently work and how to represent that.

The main hotkey hinting issue here is how once we enter a search state then users get no hints (at a minimum of) how to

  • exit the search
  • edit the search

So, dynamically showing the appropriate keys would be useful for that.

For the multi-line layout, my previous concern was re the search UI jumping; I'm not sure there's a way around that.

Re a 'prompt' (like the >), at this point I'd be mostly concerned whether it looks like part of the search text. Styling that, or having a indent with a space or two, may be sufficient and clean.

Note that some of the original PR here has been merged already, but was discussed at #zulip-terminal>Panel search box UI.

neiljp avatar Feb 04 '24 02:02 neiljp