Inconsistent internal onebox spacing

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.

https://meta.discourse.org/t/discourse-2-0-0-beta4-release-notes/82446
https://meta.discourse.org/t/discourse-2-0-0-beta5-release-notes/83881
https://meta.discourse.org/t/discourse-2-0-0-beta4-release-notes/82446

https://meta.discourse.org/t/discourse-2-0-0-beta5-release-notes/83881

cc @awesomerobot

7개의 좋아요

Oddly enough, when there’s no line between the two we add a <br> to the markup and when there is a line between the two we don’t.

4개의 좋아요

Hmm, what do you recommend to fix?

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)…

For example, when I type:

https://meta.discourse.org/t/discourse-2-0-0-beta4-release-notes/82446
https://meta.discourse.org/t/discourse-2-0-0-beta5-release-notes/83881

…the output is:

<aside>
</aside>
<br>
<aside>
</aside>

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

When I type:

https://meta.discourse.org/t/discourse-2-0-0-beta4-release-notes/82446

https://meta.discourse.org/t/discourse-2-0-0-beta5-release-notes/83881

…the output is:

<aside>
</aside>
<aside>
</aside>

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

10개의 좋아요

아마도 아직 문제가 있는 것 같다 :slight_smile:

3개의 좋아요

이 주제를 다시 꺼내서 죄송하지만, 새 주제를 만드는 대신 이 토픽에 편승해서 질문을 드려도 될 것 같아서요… (새 주제를 만들지 않고…)

잘 알려진 사실일 수 있지만, 원박스(Onebox) 내부 링크를 확장하면 보기 좋게 표시되지만, 기본적으로는 미리보기에 포맷이 적용되지 않습니다.

확장 전…

확장하면 보기 좋습니다.

OP가 텍스트를 인용하지 않는 한, 미리보기는 가능한 한 많은 텍스트를 박스에 맞추려는 대신 포맷을 유지해야 하지 않나요?

아니면 제가 무언가를 놓치고 있는 건가요? 아니면 이 모든 것이 의도된 동작인가요?

맞습니다. 확장 전에 포맷팅이 없는 이유는, 그렇지 않으면 그 안에 텍스트를 많이 넣을 수 없기 때문입니다.

2개의 좋아요

아, 그렇군요. 아마도 꽤 오래 전부터 그랬을 것 같아요.

개인적으로, UI 관점에서는 눌려 보이는 버전 대신 어떤 게시물에 참여하게 되는지 직접 보는 것이 더 깔끔하지 않을까 싶습니다.

게시물의 작성자가 특정 텍스트를 강조하고 싶다면 인용(quote)을 사용하면 되고, 그렇게 하면 보기에도 좋습니다.

게시물을 링크하는 경우, 그 게시물을 클릭하거나, 최소한 펼 쳐서 맥락을 파악하기를 원할 수 있다고 생각합니다.

단순히 숫자만 놓고 보면, 적절한 포맷으로 표시된 게시물을 클릭하거나 펼치는 사람이 더 많을 것 같습니다. 그냥 보기에도 훨씬 편하니까요.

다수의 디스코스(Discourse) 사용자는 코더나 프로그래머가 아니라는 점도 잊지 말아야 합니다. 그런 방식으로 텍스트가 한 덩어리로 뭉쳐 있는 박스 안의 모습은 그들이 익숙하지 않은 형태입니다.

vs

..다시 말하지만, 그냥 개인적인 의견입니다.

1개의 좋아요