A discussion about inconsistent internal onebox spacing in Discourse is ongoing. jomaxro initially pointed out that the spacing between internal links is inconsistent, depending on whether a blank line is present. awesomerobot explained that the issue arises from how Discourse treats oneboxes as input versus output, resulting in incorrect rendering.
A related issue was brought up by stance455, who noted that internal onebox links lack formatting by default, making them difficult to read. codinghorror explained that this is by design, as it allows for more text to fit in the box. However, stance455 argued that proper formatting would make oneboxes more readable and inviting, potentially increasing engagement.
When two internal links are added to a topic the spacing between them is inconsistent. If no blank line is between the links the spacing is significantly greater than if a blank line is provided.
Ah, I understand why this happens now (bear with me here)…
If I type:
word
word
…I intentionally put a single carriage return there, so it correctly renders as:
<p>
word
<br>
word
</p>
When I type:
word
word
…this is two returns, so the markup is correctly output as two paragraphs:
<p>
word
</p>
<p>
word
</p>
But with oneboxes, we’re treating them as they’re input (two strings with a single carriage return) and not as they’re output (two separate HTML elements)…
This is technically correct for the input. I entered two lines with a carriage return between them… but I was required to put that carriage return there for the oneboxes to exist. We shouldn’t count that carriage return because it’s a prerequisite to generate oneboxes. I’m not doing it for the purpose of creating a new line of text (so there shouldn’t be a <br> there).
This would be correct if they were two paragraphs, which is how the text is input, but not how it’s output. We should add a <br> here, because I’m adding a space that doesn’t need to be there (intentionally dividing the content).
Ah I see, I imagine it’s been that way for a while.
IMHO, from a UI perspective, wouldn’t it be “cleaner” to see what post Im getting into , instead of the scrunched up version.
If the OP of the post wants to highlight specfic text , he can quote and it looks great.
I feel like if they’re linking the post, they may want us to click the post, or at least expand and get some context.
From a pure numbers game, I imagine more people would click or expand a post with proper formatting. Just easier to look at.
Lets not forget the majority of discourse users are not coders or programmers. Seeing text bunched up in a box like that is not something they’re used to seeing.