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

Rich text bubbles have massive paragraph breaks when authored with RTE. #1673

Closed
Tracked by #1940
ara4n opened this issue Sep 9, 2023 · 2 comments
Closed
Tracked by #1940
Labels
A-Rich-Text-Editor O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect Team: Element X Feature Z-Labs A defect in a feature that is behind a labs flag.

Comments

@ara4n
Copy link
Member

ara4n commented Sep 9, 2023

Steps to reproduce

  1. Send a single-spaced multiline message in the RTE by hitting 'enter' at the end of every line
  2. Observe that the rendered bubble is shown with double-spacing.

It's as if the <p/> tags created by the RTE are rendered with CSS with margin-bottom: 1em or something, whereas either they should be emitted as <br/> tags, or there should be no bottom margin or other padding on rendering <p/> tags.

RPReplay_Final1694192760.mp4

Outcome

What did you expect?

Sent bubble should visually match the authored preview in the RTE precisely.

What happened instead?

All the linefeeds got doublespaced.

Your phone model

No response

Operating system version

No response

Application version

380

Homeserver

No response

Will you send logs?

No

@ara4n
Copy link
Member Author

ara4n commented Sep 30, 2023

matrix-org/matrix-rich-text-editor#832 is the root cause here:

the problem is that the default and correct handling of paragraph tags is to put a linebreak of padding after them, like in a book
i don’t think we’ve ever specced or suggested that matrix clients should override that padding to 0px
so i would argue that we are doing the wrong semantic thing in RTE if every return is seen as a paragraph break rather than a <br/> line break
given the intention of the author will be a linebreak. (and they’ll prolly write two linebreaks if they intend a paragraph break).

@stefanceriu stefanceriu added S-Minor Impairs non-critical functionality or suitable workarounds exist O-Occasional Affects or can be seen by some users regularly or most users rarely Team: Element X Platform Team: Element X Feature and removed Team: Element X Platform labels Oct 4, 2023
@kittykat kittykat added the Z-Labs A defect in a feature that is behind a labs flag. label Nov 16, 2023
@jonnyandrew
Copy link

Fixed in RTE v2.15.0 (matrix-org/matrix-rich-text-editor#834).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rich-Text-Editor O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect Team: Element X Feature Z-Labs A defect in a feature that is behind a labs flag.
Projects
None yet
Development

No branches or pull requests

4 participants