"Toggle Half Screen" mode for text editors #2870
Zak Siddiqui opened 1 day ago

Summary

Add a Half Screen toggle to all text input fields across OneDev (issue descriptions, comments, code review comments, wiki pages, etc.), similar to the existing full-screen toggle. This would pin the editor to the bottom 50% of the viewport while leaving the top half visible for scrolling and reference.

Current Behavior

Text editors currently offer a full-screen toggle, which expands the editor to fill the entire viewport. While useful for focusing on long content, it completely obscures the rest of the page. When editing a comment or description that references content elsewhere on the same page, the user must repeatedly scroll up to read, scroll back down to type, and repeat — a frustrating and time-consuming workflow.

Proposed Behavior

Add a new Half Screen icon/button placed alongside the existing full-screen toggle. When activated:

  • The text editor expands and locks to the bottom 50% of the viewport
  • The top 50% remains visible and scrollable, allowing the user to browse page content above
  • The editor remains fully functional (typing, formatting, scrolling within the editor)
  • Clicking the button again (or the full-screen toggle) exits back to normal or switches modes accordingly

Use Case

When writing a comment, issue update, or code review note that references information elsewhere on the same page (e.g., earlier comments, diff lines, or issue metadata), the user needs to simultaneously read content above and edit below. The half-screen mode eliminates the constant back-and-forth scrolling, making the workflow significantly more efficient.

  • OneDev commented 23 hours ago

    State changed as build OD-7780 is successful

  • OneDev changed state to 'Closed' 23 hours ago
    Previous Value Current Value
    Open
    Closed
  • Zak Siddiqui commented 15 hours ago

    @robin I believe this is mistakenly marked as fixed?

  • Zak Siddiqui commented 15 hours ago

    There is no explanation about why it was closed, so I suspect it was mistakenly marked as fixed.

  • Zak Siddiqui changed state to 'Open' 15 hours ago
    Previous Value Current Value
    Closed
    Open
  • Robin Shen commented 9 hours ago

    This has already been implemented:

    image_2.png

    Nevertheless, the referenced build is obsolete, as I deleted previous one and build a new one: build OD-7784 (16.2.3)

  • Zak Siddiqui commented 8 hours ago

    Referencing the relevant merge commit.

    https://code.onedev.io/onedev/server/~commits/7796a2e7c2ff11dfdd306711ea08f3944008d465

    CC @robin FYI

    I'm at a loss to understand why there are no references in this issue to the work that was done.

  • Robin Shen commented 7 hours ago

    I messed commits locally. But the feature is implemented. See the half screen toggle besides the full screen toggle in the comment editor.

  • Zak Siddiqui commented 7 hours ago

    @robin My apologies... after seeing the implementation I realized there's better wording I could have used.

    I should not have said the bottom 50% of the viewport, since this covers the entire view area.

    This means that the bottom part of the menu on the left has items that are not accessible.

    Therefore, whilst we need to retain the bottom 50% as an absolute position, the bottom half of screen should not be related to the whole screen, but only to the visible bottom half of the viewport within the issue-activities class.

    My understanding of CSS is limited, as you can imagine, but I hope that helps to explain what I was after.

    My reason for being so finicky about this is because the current implementation of "Toggle Half Screen" is too close to the full screen mode to be of any distinct advantage.

    image_3.png

  • Robin Shen commented 7 hours ago

    This does make a lot of sense as I can see the previous comments while writing in a large panel. It is true that part of left side navbar is not visible, but I don't think it is a big deal as seldomly we need to access that while writing comments.

  • Zak Siddiqui commented 7 hours ago

    seldomly we need to access that while writing comments

    I think that's true, however, I'd like to introduce another reason. There is a significant benefit from a UX point of view, to have the width of a text box, being in a Goldilocks zone that's not too big and not too small.

    The problem with it being too big is that the user's eyes need to scan widely and this reduces and this increases workload and reduces productivity.

  • Zak Siddiqui commented 7 hours ago

    seldomly we need to access that while writing comments

    I think that's true, however, I'd like to introduce another reason. There is a significant benefit from a UX point of view to have the width of a text box being in a Goldilocks zone that's not too big and not too small.

    The problem with it being too big is that the user's eyes need to scan widely and this increases workload and reduces productivity.

    Whereas making it a little bit more square keeps it within the usability of the original width of the text box, and it's just more functional from a UX point of view.

    My intention is to improve the UX with this feature rather than adding a feature that degrades the UX.

  • Robin Shen commented 7 hours ago

    If a too wide screen is an issue, we may just turn on the live preview. This is by default, and actually needs a wide pane for edit and preview.

    image_4.png

  • Zak Siddiqui commented 6 hours ago

    Happy with this.

  • Zak Siddiqui changed state to 'Closed' 6 hours ago
    Previous Value Current Value
    Open
    Closed
1/1
Type
New Feature
Priority
Normal
Assignee
Labels
No labels
Issue Votes (0)
Watchers (3)
Reference
OD-2870
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover