35

Since (I think) the invention of the left side bar on Stack Overflow, the display behavior when posting an answer has changed. Before, the posted answer was displayed with exactly the same width and formatting as in the preview while editing. Now, the width narrows and the formatting consequently changes, i. e. lines are wrapped at different positions, and code blocks carefully arranged to not need scroll bars suddenly do. (I'm not quite sure, but perhaps previously the editing space did not cover the left margin where the up-/downvotes are; anyway now it extends over this margin while editing, but of course no longer after posting.)

One may say that I should not care for or expect the formatting to stay the same, but I very much dislike this change. Therefore, I propose to make the answer editing preview space the same width as the normal view space.

13
  • Do you have any example(s) of this? Aug 17, 2018 at 13:54
  • @André Kool - One can easily check by looking at the "Your Answer" section at the page bottom - the preview space is wider than the space where posted answers are displayed, and so the formatting must change after editing.
    – Armali
    Aug 17, 2018 at 13:59
  • 25
    @AndréKool, i.stack.imgur.com/o60FN.png. RedHandCircle proof. Aug 17, 2018 at 14:07
  • 8
    Welcome to WWW. If you need layout to stay consistent across all devices/OS/browsers you should use PDF. HTML does not really guarantee WYSIWYG... Even if preview is 100% the same as view in your browser there is no guarantee that anyone else will see page with the same layout as yours. So not really sure how valuable this request is... Aug 17, 2018 at 18:18
  • 1
    The width of the code blocks and snippets has been changed before (to have more whitespace next to the other whitespace), so you can't really count on not having scroll bars. See e.g. meta.stackoverflow.com/questions/326035/… Aug 17, 2018 at 21:36
  • I don't think this is limited to when the left sidebar came up, I observed something very similar for questions when they did the design refit in 2014 (an example is on my answer here
    – Ajean
    Aug 17, 2018 at 22:09
  • 6
    @DragandDrop I think you might need to consider changing your spell check extension :D
    – 41686d6564
    Aug 19, 2018 at 3:16
  • 6
    @Alexei Levenkov: That doesn't really justify the width of the client-side post preview not being consistent with actual posts. Otherwise what point is there in any consistency anywhere in the UI? Why do sidebar items all have the same width on the same page on the same device if font metrics are going to be different across different devices? (If that question reads nonsensically to you, that's because it is - different devices aren't relevant to how consistent a UI looks on each device.)
    – BoltClock
    Aug 19, 2018 at 16:19
  • While this might have become more noticeable to you at this time, it's actually been an issue that's existed for a long time (years). I know because I like to not have horizontal scrolling on code I have in my posts. Thus, I created custom CSS for myself a long time ago to have the display while editing break at the same point as horizontal scrolling. Note: the number of characters rendered in each line varies from browser to browser, even on the same OS. Thus, optimizing for no horizontal scrolling needs to target the shortest rendered line across all browsers/OS in which you are interested.
    – Makyen Mod
    Aug 19, 2018 at 17:34
  • Related: Could preview display scrollbar in code format correctly? It's not a duplicate, as that question is talking about vertical scrolling, not horizontal.
    – Makyen Mod
    Aug 19, 2018 at 17:36
  • 1
    I just hit this with this answer during the initial preview, no horizontal scrolling was required. After posting, it had new scrollbars and I had to re-edit to hide them. Check revision history for additional changes required due to the change of width. Aug 20, 2018 at 13:50
  • Depending on the width of anything in responsive design is a little bit of a no-no. Doing so means you are just setting yourself up for unintended overflow or scrolling.
    – zero298
    Aug 20, 2018 at 14:13
  • 1

0

You must log in to answer this question.

Browse other questions tagged .