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

Make issue meta dropdown support Enter, confirm before reloading (#23014) #23102

Merged
merged 2 commits into from
Feb 24, 2023

Commits on Feb 24, 2023

  1. Make issue meta dropdown support Enter, confirm before reloading (go-…

    …gitea#23014)
    
    As the title. Label/assignee share the same code.
    
    * Close go-gitea#22607
    * Close go-gitea#20727
    
    Also:
    
    * partially fix for go-gitea#21742, now the comment reaction and menu work with
    keyboard.
    * partially fix for go-gitea#17705, in most cases the comment won't be lost.
    * partially fix for go-gitea#21539
    * partially fix for go-gitea#20347
    * partially fix for go-gitea#7329
    
    ### The `Enter` support
    
    Before, if user presses Enter, the dropdown just disappears and nothing
    happens or the window reloads.
    
    After, Enter can be used to select/deselect labels, and press Esc to
    hide the dropdown to update the labels (still no way to cancel ....
    maybe you can do a Cmd+R or F5 to refresh the window to discard the
    changes .....)
    
    
    This is only a quick patch, the UX is still not perfect, but it's much
    better than before.
    
    
    ### The `confirm` before reloading
    
    And more fixes for the `reload` problem, the new behaviors:
    
    * If nothing changes (just show/hide the dropdown), then the page won't
    be reloaded.
    * If there are draft comments, show a confirm dialog before reloading,
    to avoid losing comments.
    
    That's the best effect can be done at the moment, unless completely
    refactor these dropdown related code.
    
    Screenshot of the confirm dialog:
    
    <details>
    
    
    ![image](https://user-images.githubusercontent.com/2114189/220538288-e2da8459-6a4e-43cb-8596-74057f8a03a2.png)
    
    </details>
    
    ---------
    
    Co-authored-by: Brecht Van Lommel <brecht@blender.org>
    Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
    3 people authored and yardenshoham committed Feb 24, 2023
    Configuration menu
    Copy the full SHA
    ad252a7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c8977e4 View commit details
    Browse the repository at this point in the history