Wrap single lines of code; horizontally scroll multi-line code blocks
What does this MR do?
Original problem: code blocks were wrapping in issue body
- Multi-line code blocks (```) should scroll horizontally
- Single lines of code (`) should wrap
Why was this MR needed?
Inconsistent scrolling vs wrapping behavior
What are the relevant issue numbers?
Closes #19619 (closed)
Screenshots (if relevant)
Merge request reports
Activity
Added 1 commit:
- 1a50a822 - Wrap single lines of code; horizontally scroll multi-line code blocks
Added 1 commit:
- c4d8c6eb - Remove unneeded code
14 14 margin-top: 0; 15 15 } 16 16 17 // Single code lines should wrap 17 18 code { 18 19 font-family: $monospace_font; 19 white-space: pre; 20 white-space: pre-wrap; Looks good.
Edited by Jacob Schatz@annabeldunstone @jschatz1 is this correct?
@alfredo1 I see what you mean. It looks like that's how it currently functions in production as well, but we should address that in https://gitlab.com/gitlab-org/gitlab-ce/issues/20640. The goal will be to have the comment box scrolling independently of the diff table
Edited by Annabel Gray@annabeldunstone alright so this LGTM then!
Reassigned to @iamphill
Reassigned to @jschatz1
Added 318 commits:
-
c4d8c6eb...11eefba8 - 316 commits from branch
master
- 3eba2e4f - Wrap single lines of code; horizontally scroll multi-line code blocks
- 4d757ea5 - Remove unneeded code
-
c4d8c6eb...11eefba8 - 316 commits from branch
mentioned in commit 39c44977
mentioned in commit 24477045
@annabeldunstone I don't know if this is related, but adding a code block with a really long line in a comment makes all of the comments (and the code) scroll. I'd expect code blocks to scroll separately from their containers.
See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5968#note_14451132 for an example.
@smcgivern Yeah we're aware of that issue. That's going to be the case until we can pull the comment blocks completely out of the tables (there's an issue for that somewhere)
OK, thanks! I'm guessing this is the issue: https://gitlab.com/gitlab-org/gitlab-ce/issues/20640