Skip to content

PR diffs, and git commits, are harder to read than they could be #2463

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

Closed
kpinc opened this issue Mar 21, 2025 · 5 comments · Fixed by #2470
Closed

PR diffs, and git commits, are harder to read than they could be #2463

kpinc opened this issue Mar 21, 2025 · 5 comments · Fixed by #2470
Assignees
Labels
DaWGs Good discussion item for the DaWGs

Comments

@kpinc
Copy link

kpinc commented Mar 21, 2025

Hi,

I notice that the convention, in at least some files, is to line-break at the end of paragraphs. This makes diffs harder to read.

For example, look at the diff of PR #2416 at lines 245/248 (old/new). The change is that a new sentence was added to the end of the paragraph. But this is hard to see without close reading. If some comma was added somewhere in the middle of the paragraph it would be difficult to notice.

While this might be improved by a change to the git web interface, that does not help when using git itself, doing diffs while developing, etc.

So, I write this to suggest that the source code for the docs have line breaks after every sentence. I've seen this convention elsewhere, but can't recall where.

Enforcing this suggestion might be too much to ask, but it wouldn't hurt to consider adopting the practice and encouraging it's use.

Regards,
Karl

@ansible-documentation-bot ansible-documentation-bot bot added the needs_triage Needs a first human triage before being processed. label Mar 21, 2025
@webknjaz
Copy link
Member

Yeah, you're right. That's quite irritating indeed. AFAIR, this is dictated by some weird i18n tooling that is external to this project.

@oraNod oraNod added the DaWGs Good discussion item for the DaWGs label Mar 21, 2025
@oraNod
Copy link
Contributor

oraNod commented Mar 21, 2025

@kpinc Thanks for raising this. I'm a big fan of the "one sentence per line" convention, which is also referred to as semantic line breaks or ventilated prose. That convention has many benefits apart from making diffs more readable and improving the experience of reviewing docs. Dan Allen has a really good summary for asciidoc but the same points apply to RST and MD (although it can depend on where the markdown gets rendered).

We've talked about this before and, as you suggest, enforcing the one sentence per line rule is difficult. But I totally agree that encouraging the use is a good thing and should be revisited. I've tagged this issue for discussion at the next DaWGs meeting. Feel free to join us on Matrix and let's talk about it. Here's the link to the next DaWGs meeting: https://forum.ansible.com/t/documentation-wg-weekly-meeting/7229

@oraNod
Copy link
Contributor

oraNod commented Mar 21, 2025

Also, just to point it out, the one sentence per line convention applies to the getting started content: https://github.com/ansible/ansible-documentation/tree/devel/docs/docsite/rst/getting_started

@oraNod oraNod self-assigned this Mar 25, 2025
@oraNod oraNod removed the needs_triage Needs a first human triage before being processed. label Mar 25, 2025
oraNod added a commit to oraNod/ansible-documentation that referenced this issue Mar 25, 2025
@oraNod
Copy link
Contributor

oraNod commented Mar 25, 2025

@kpinc Thanks again for opening this issue, I've created a PR to add this to the style guide so we can start recommending the one sentence per line technique. Please feel free to take a look and add your thoughts or comments.

@felixfontein
Copy link
Collaborator

felixfontein commented Apr 9, 2025

BTW, there's also https://sembr.org/: Semantic Line Breaks

That's even more fine-grained than "one line per sentence".
I haven't properly used it yet (I guess), @gotmax23 mentioned and used it somewhere else (I think one of the antsibull projects) before.

(Edit: sorry, I only noticed now that it already got mentioned in the PR...)

samccann added a commit that referenced this issue Apr 29, 2025
* issue #2463 one sentence per line style guide

* Apply suggestions from code review

---------

Co-authored-by: Sandra McCann <[email protected]>
@github-project-automation github-project-automation bot moved this from 🆕 Triage to ✅ Done in Ansible Documentation Apr 29, 2025
patchback bot pushed a commit that referenced this issue Apr 29, 2025
* issue #2463 one sentence per line style guide

* Apply suggestions from code review

---------

Co-authored-by: Sandra McCann <[email protected]>
(cherry picked from commit 6aacf90)
patchback bot pushed a commit that referenced this issue Apr 29, 2025
* issue #2463 one sentence per line style guide

* Apply suggestions from code review

---------

Co-authored-by: Sandra McCann <[email protected]>
(cherry picked from commit 6aacf90)
patchback bot pushed a commit that referenced this issue Apr 29, 2025
* issue #2463 one sentence per line style guide

* Apply suggestions from code review

---------

Co-authored-by: Sandra McCann <[email protected]>
(cherry picked from commit 6aacf90)
samccann added a commit that referenced this issue May 6, 2025
* issue #2463 one sentence per line style guide

* Apply suggestions from code review

---------


(cherry picked from commit 6aacf90)

Co-authored-by: Don Naro <[email protected]>
Co-authored-by: Sandra McCann <[email protected]>
samccann added a commit that referenced this issue May 6, 2025
* issue #2463 one sentence per line style guide

* Apply suggestions from code review

---------


(cherry picked from commit 6aacf90)

Co-authored-by: Don Naro <[email protected]>
Co-authored-by: Sandra McCann <[email protected]>
samccann added a commit that referenced this issue May 6, 2025
* issue #2463 one sentence per line style guide

* Apply suggestions from code review

---------


(cherry picked from commit 6aacf90)

Co-authored-by: Don Naro <[email protected]>
Co-authored-by: Sandra McCann <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DaWGs Good discussion item for the DaWGs
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants