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

Lines in API reference XML files are too long #1230

Open
svick opened this issue Apr 18, 2017 · 6 comments
Open

Lines in API reference XML files are too long #1230

svick opened this issue Apr 18, 2017 · 6 comments
Labels
area-Infrastructure external Not related to content Pri2 Indicates issues/PRs that are medium priority Pri3 Indicates issues/PRs that are low priority

Comments

@svick
Copy link
Contributor

svick commented Apr 18, 2017

The lines in XML files in API reference are way too long. This causes several fairly minor, but noticeable annoyances to contributors like me:

My questions (similar to those in dotnet/docs#1951):

  • Is this something that's worth fixing (considering it would change many files)?
  • Would a PR by me be welcome, or do you have a better way to deal with this?
  • Should it be fixed all at the same time, or would some kind of gradual process make more sense?
  • Would it help to fix this in the same PR as Text after list is part of list incorrectly in API reference docs#1951?

I have a work-in-progress code that would fix this here. In case this is deemed worth doing, I would finish it and submit a PR.

@mairaw
Copy link
Contributor

mairaw commented Apr 18, 2017

That's an interesting issue. I think before you invest any more of your time, let me discuss this with the rest of the team. I did have to manually scan the text for PR #1930 to spot the differences.

/cc @BillWagner @rpetrusha @wh-alice @dend @yishengjin1413

@guardrex
Copy link
Contributor

guardrex commented Apr 19, 2017

Just plz keep in mind a few things:

  1. When line lengths are set, they're set permanently everywhere, for everyone, and forever. I work in an IDE, and I usually need to scroll vertically twice as much to compensate for all of these returns all over the place. I prefer to set my window (or IDE pane) to the width of text that I want to see and have the text flow into that space, and the width is frequently variable ... sometimes I'm working wide, sometimes narrow. My preferred width is at least twice what I commonly see in docs where returns have been introduced. When I need to access text on a mobile device that can't handle the pre-determined line length, then that introduces half-lines all over the place.
  2. If GH is having a prob with unified mode and highlighting diffs, then that's an issue with GH ... not with docs. If the primary prob is GH, then I suggest a shout out to GH MCP with a feature request to fix GH before taking any drastic actions. A simple soft wrap feature for non-.md docs would be a great benefit the entire GH universe. I'm aware that this has been suggested to them, but maybe if MS asks.

@svick
Copy link
Contributor Author

svick commented Apr 19, 2017

@guardrex Yeah, if there's a good chance GitHub's UI will be improved in a reasonable timeframe, that is the best solution.

Otherwise, when it comes to line length, I was thinking of setting it to the highest value, which works on GitHub without scrolling, which seems to be about 120.

@guardrex
Copy link
Contributor

guardrex commented Apr 19, 2017

Display of text in the code files relies on HTML's <pre>-style formatting. For example, they use ...

.blob-code-inner { white-space: pre }

... which results in lines not breaking. One can hack it, such as by using something like Stylebot to override the GH style and set ...

.blob-code-inner { white-space: pre-wrap; word-wrap: break-word }

That one simple hack wraps many lines. In XML, the hack isn't completely effective: It still won't work inside of Value attribute values. Fortunately, the hack does seem to work with diffs in unified view. I think with some additional CSS Ninja Tricks:tm: one should be able to have a 100% effective CSS-based workaround. Even if it works tho, I still wish GH would do more for everyone.

RE: Those lines not highlighting changes in diffs. Yeah, that one's on them. Seems like their algorithm that applies the styles, such as .blob-code-addition, just isn't smart enough to catch them all ... or perhaps they do shut it off on very long lines. I think that one should be a bug report to GH.

@BillWagner BillWagner transferred this issue from dotnet/docs Nov 28, 2018
@BillWagner BillWagner added external Not related to content triaged Pri2 Indicates issues/PRs that are medium priority labels Nov 28, 2018
@carlossanlop
Copy link
Member

@svick a workaround I suggest is to install the browser extension "Wide GitHub", which will increase the width of the textarea containers to the full width of the window.
You can find the extension in Chrome (which can also be installed in Edge Insiders) and in Firefox.

@carlossanlop
Copy link
Member

Tagging @mimisasouvanh @joelmartinez for triaging.

@PRMerger13 PRMerger13 added the Pri3 Indicates issues/PRs that are low priority label Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Infrastructure external Not related to content Pri2 Indicates issues/PRs that are medium priority Pri3 Indicates issues/PRs that are low priority
Projects
None yet
Development

No branches or pull requests

8 participants