Word wrapping (soft wrap/"break word") on commit/pull request diff views #45559
Replies: 4 comments
-
@brasic @willsmythe @aharpole @gordey4doronin, tagging you as the parent discussion mentioned this issue a few times recently too, thought almost the same way as another user did here. Sorry if I should have tagged somebody else or not do that at all, I'm not active on this repository much so I can miss a thing. |
Beta Was this translation helpful? Give feedback.
-
Does anyone know what does soft wrap and hard wrap means? |
Beta Was this translation helpful? Give feedback.
-
We at Snowflake use a hell lot of SQL commands and its output in our code. Wrapping the SQL command output with a lot columns is literally SHIT, there is no way today to disable it in pull request diffs. Please prioritize fixing this. |
Beta Was this translation helpful? Give feedback.
-
I made a tiny Chrome extension to fix this since apparently github has no intention to. (It just injects a few lines of css, no javascript.) |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Bug
Body
At the end of the year 2022, word wrapping has been enabled for all (or almost all) code views across GitHub. This issue was reported on #42298, but even despite everyone struggling to gain the staff's attention, it was only fixed for file views, whereas diff views still have word wrapping enabled. This second issue was mentioned before as well, on #8497 (not sure if its author meant this to be an issue, though), but it only touches split diff views; now after a year of that discussion's existence, wrapping is applied to unified diff view too.
I am convinced that code view does not need lines wrapping because it's not just usual text where only the meaning of the text matters. For instance, YAML and Python files rely on the lines offset, and with word wrapping enabled, it can sometimes be hard to say whether you're reading the same line or you're already on the next one; and even remembering that lines are numbered, word wrapping only decreases code readability for (I believe) most developers/users. Please fix this or at least add an option to the gear button menu on the diff page to configure this setting!
Beta Was this translation helpful? Give feedback.
All reactions