Welcome to Codidact Meta!
Codidact Meta is the "town hall" (meta-discussion site) for the Codidact community network and the Codidact software. Whether you have bug reports or feature requests, support questions or rule discussions that touch the whole network – this is the site for you.
Comments on Mobile style voting buttons to match post width to preview width and reduce horizontal scrolling
Post
Mobile style voting buttons to match post width to preview width and reduce horizontal scrolling
On mobile, where width is limited, the voting buttons are above a post rather than to the left. This adds very little additional vertical scrolling but saves a considerable amount of horizontal space being lost, particularly on long posts.
On desktop the horizontal space wasted by voting buttons to the left is not as important, as the screen is usually in landscape format with plenty of width to spare.
However, I would still prefer the voting buttons to be above, to reclaim that full width for the post. My main reason for this is that the edit preview would then match the width of a post (on desktop - it already does on mobile).
If I add a code block to a post, I try to make sure that no horizontal scroll bars are required, splitting long lines if necessary to avoid this. Currently, I need to check what width to aim for in an existing post, because the preview of a post being drafted is a few characters wider. Even if I make code lines short enough to avoid horizontal scrollbars in the preview, they are still long enough to lead to horizontal scrollbars in the saved post.
The difference can be seen by viewing a post with horizontal scroll bars on a code block, such as Setting custom HTTP status code messages in nginx. Note where the paragraph wraps and where the first code line cuts off:
Contrast this with the preview seen when editing that post:
The paragraph wrapping one word later really doesn't matter, but the code block preview suggests an additional 4 characters will be visible without scrolling, when they will not.
Apart from preferring consistency between the preview and the post, I'd also appreciate having 76 characters of code width in a post rather than the current 72. This would reduce the number of posts that happen to have horizontal scroll bars in the code blocks, and would make it easier for people who want to adjust their code to avoid horizontal scroll bars.

2 comment threads