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

Comments

@ghost
Copy link

@ghost 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 ghost commented Jun 10, 2021

It also has #46519

@jamalc jamalc added the UX label Jun 12, 2021
@jamalc jamalc removed this from the Unreleased milestone Jun 12, 2021
@jamalc jamalc added this to the pkgsite/unplanned milestone Jun 12, 2021
@jamalc
Copy link

@jamalc jamalc commented Jun 12, 2021

/cc @fflewddur and @Joanne881107 for UX input

@ghost

This comment was marked as off-topic.

@fflewddur
Copy link

@fflewddur fflewddur commented Jun 14, 2021

@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 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 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants