sourcegraph / sourcegraph-public-snapshot

Code AI platform with Code Search & Cody
https://sourcegraph.com
Other
10.11k stars 1.29k forks source link

Reference panel: Horizontal overflow on results #40720

Open scalabilitysolved opened 2 years ago

scalabilitysolved commented 2 years ago

I'm not sure if this is expected behaviour or not, when you search for a result that returns a match within HystrixCodaHaleMetricsPublisherCommand.java there is a long line which in search results means a horizontal scoll-bar is shown as below:

CleanShot 2022-08-23 at 11 02 58

When you have that same reference within the ref panel we have no horizontal scroll and the line is cut off mid word. Is this the expected behaviour?

CleanShot 2022-08-23 at 11 03 27

When you click on the result you can see with the preview pane expansion the line is cut off earlier (also note the precise tag listing for each line grows vertically).

CleanShot 2022-08-23 at 11 04 02

The precise tag listing doesn't always grow vertically:

CleanShot 2022-08-23 at 11 24 21

jjinnii commented 2 years ago

Thanks for filing @scalabilitysolved ! I know I mentioned the precise tag bg wrapping somewhere, but I'm not sure where I've left the comment 😄

I don't think this needs full-on designs, just design guidance:

Screen Shot 2022-08-23 at 8 45 21 PM Screen Shot 2022-08-23 at 8 45 23 PM Screen Shot 2022-08-23 at 8 53 34 PM
jjinnii commented 2 years ago

Oh, I had filed this as #39480. I will close that issue out in favor of this one.

@macraig I'm going to bump this to a P1, as it's a very sloppy looking UI that will occur consistently for users, essentially every time a user opens the preview pane for any longer file path (see screenshot for example)

Image

peterguy commented 7 months ago

@fkling There are some current issues with file path wrapping that exist in the current web app and can likely be addressed in the web app prototype. @taiyab you may want to take a peek at this to see if you have any input.

Summary:

Sample search I was using for testing: https://sourcegraph.com/search?q=context:global+HystrixCodaHaleMetricsPublisherCommand&patternType=keyword&sm=0

It relies on the https://github.com/Netflix/Hystrix repo.

Here's a walkthrough of the current behavior; apologies for the long-winded video.

https://github.com/sourcegraph/sourcegraph/assets/129280/48a67cff-10e0-486f-a1bf-1f1f6243c7d7