Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/pkgsite: no horizontal scroller on <pre> text containing function signature on overflow #46678

Open
ghost opened this issue Jun 10, 2021 · 6 comments
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite UX Issues that involve UXD/UXR input

Comments

@ghost
Copy link

ghost commented Jun 10, 2021

What is the URL of the page with the issue?

All package's page

What is your user agent?

Mozilla/5.0 (Linux; Android 9; Unspecified Device) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.0.0 Mobile Safari/537.36

Screenshot

Not necessary

What did you do?

I visited a package's docs on a mobile device

What did you expect to see?

pre text containing function signature to have horizontal scroller on overflow due to longer line length

What did you see instead?

Those pre text don't have horizontal scroller on overflow, text are wrap around.

@gopherbot gopherbot added this to the Unreleased milestone Jun 10, 2021
@ghost
Copy link
Author

ghost commented Jun 10, 2021

It also has #46519

@jamalc jamalc added the UX Issues that involve UXD/UXR input label Jun 12, 2021
@jamalc jamalc modified the milestones: Unreleased, pkgsite/unplanned Jun 12, 2021
@jamalc
Copy link

jamalc commented Jun 12, 2021

/cc @fflewddur and @Joanne881107 for UX input

@ghost

This comment has been minimized.

@fflewddur
Copy link

@inet56 Could you provide a screenshot to help us understand the issue? I believe the line wrapping is by design, so that people don't need to manually horizontally scroll to view function signatures. This screenshot from https://pkg.go.dev/golang.org/x/crypto/ssh is a good example:
Screen Shot 2021-06-14 at 9 40 51 AM
We don't want key information to require horizontal scrolling. That said, I noticed the lines are breaking at odd places; if that's the reason for this issue, I completely agree. @jamalc , could we look at adjusting the line wrapping so that it only breaks at word boundaries?

@ghost
Copy link
Author

ghost commented Jun 14, 2021

We don't want key information to require horizontal scrolling.

Types has horizontal scrolls. Aren't they key information?

could we look at adjusting the line wrapping so that it only breaks at word boundaries?

removing word-break: break-all would do that.

@jamalc
Copy link

jamalc commented Jun 14, 2021

@inet56 You have expressed a personal preference for this text to scroll horizontally. We're happy to take it into consideration but our UX team should review the request.

@fflewddur I also remember the choice to wrap function signatures was intentional to reduce the amount of horizontal scrolling that takes place on the page. It would be simple enough to break on whole words instead.

I believe that types have horizontal scroll because they are already multiline and it can make the content more difficult to track visually.

@julieqiu julieqiu added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jun 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite UX Issues that involve UXD/UXR input
Projects
None yet
Development

No branches or pull requests

4 participants