fork-dev / Tracker

Bug and issue tracker for Fork for Mac
512 stars 12 forks source link

Cannot search by commit SHA #1350

Open xaphod opened 3 years ago

xaphod commented 3 years ago

Did searching for a commit by SHA accidentally get bork3d / removed? Fork for mac version: 2.6

STEPS:

  1. In left sidebar, click magnifying glass icon

  2. See search field with placeholder text "Commit Message"

  3. Paste in SHA: "8ec8fd89f94abcef6b464d39e4ba67a815e06bf5" Expected: see commit Actual: no results

  4. Click the dropdown under the search field "Commit Message" Expected: expect any one of these to mention SHA Actual: no mention of SHA anywhere

DanPristupov commented 3 years ago

Cmd+F, still works

xaphod commented 3 years ago

Yeah that works but if you don't know the keyboard shortcut, how do you discover this? I could not. And if you have a "Search Commits" area, it must offer some way of searching by SHA, because that's what i'm doing -- i'm searching commits.

DanPristupov commented 3 years ago

Yeah that works but if you don't know the keyboard shortcut, how do you discover this? I could not.

How can we improve this?

xaphod commented 3 years ago

I can think of three ways off the top of my head, i'm sure your designer could do better?

  1. Stop using the default 'Edit' top menu that is Edit -> Find -> Find, and expose your own dedicated 'Find' menu. You can make it clear that there are two paths, both accessible from this new menu: one for the left pane, one for the center pane (which includes SHA searches like I was after)
  2. Merge the left pane search and center pane search into one search modal that pops over top, or move it all to the left pane (similar to vscode)
  3. (simplest) just add SHA search to left pane and do nothing else

On Tue, Apr 13, 2021 at 11:48 AM Dan @.***> wrote:

Yeah that works but if you don't know the keyboard shortcut, how do you discover this? I could not.

How can we improve this?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fork-dev/Tracker/issues/1350#issuecomment-818842549, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4Z6LTNJLQ4TINMSV7LUVDTIRRWDANCNFSM423SXJLA .

DanPristupov commented 3 years ago

Merge the left pane search and center pane search into one search modal that pops over top, or move it all to the left pane (similar to vscode)

VSCode also has two searches: the advanced search on the sidebar and the context search by Cmd+F.

Stop using the default 'Edit' top menu that is Edit -> Find -> Find, and expose your own dedicated 'Find' menu.

We can do this, but I'm not sure if it will make the context search more discoverable. I never even noticed the 'Find' menu in XCode until now, but may be it's only me.

(simplest) just add SHA search to left pane and do nothing else

Yes, we can probably do that. The sidebar search is not very suitable for search by SHA, but at least it's discoverable.

Tricertops commented 2 years ago

Came here to request "search by SHA", but reading this I learned that there are two different search fields! I was only using the sidebar search, which I find useful and didn’t know there is a separate search opened via ⌘F.

I would very much like the sidebar search to also search commits SHAs, either when in "Commit Message" mode or with a new mode, e.g. "Commit SHA". Keep in mind that it might be useful to search both SHA and message together, because some commits actually mention SHA of some other commits in their message.

For example, when searching for "4e67129", I would like to see both of these commits:

SHA       Message
-----------------------------
68e4130   Revert "4e67129"
4e67129   Fix a bug
ADTC commented 1 year ago

@DanPristupov I like what Tricertops mentioned, to search both message and SHA. This is actually useful, because many commits could mention other commits in the message. Revert commits automatically do so.

I think the simplest solution would be to change the option Commit Message on the left pane search to Commit Message and SHA and make that effectively do that.

As for the discoverability of context search, there's plenty of space below the search box to show a tip when there are no search results:

image

(Or it could be right side or right pane, whatever sounds right. 😄)

CC: @fork-dev

jarodsmk commented 1 year ago

I too struggled with this for a bit before discovering this post 😮

I saw the Help > Keyboard Shortcuts link which is quite informative - but I must agree, having a specific kind of commit search hidden behind a keyboard shortcut while having other commit searching functionality is quite frustrating

chrkon commented 2 months ago

I fully agree with @jarodsmk. I had to search for a commit by SHA and I didn't know this short cut until I read this post. So I ended up with searching manually by scrolling through the right window. Why is this search field hidden by default. Just add an option to make it visible all the time. Then the user can decide by himself.