Skip to content

Discussion window should be opened immediately #510

@jakubbortlik

Description

@jakubbortlik

Prerequsities

  • I'm on the latest version of the plugin
  • I've installed the required dependencies
  • I've run :h gitlab.nvim.troubleshooting and followed the steps there

Bug Description

When [starting a review[(https://github.com/harrisoncramer/gitlab.nvim/blob/0add185d8961b481eee8c10215cfa04d0acdeafa/lua/gitlab/init.lua#L75-L75) with settings.discussion_tree.auto_open set to true, the discussion split is only opened after the discussion and other data have been loaded.

This causes a unpleasant delay between opening the reviewer and opening the discussion tree when the user can already start some work, like navigating the file panel, going to local file in a new tab, etc. and only after a couple seconds the focus is stolen to the discussion tree, or it can be even opened in the wrong tab page.

Reproduction Steps

  1. Check out the feature branch
  2. Open Neovim
  3. type glS to start a review
  4. in the Diffview file panel press gf which will take you to a new tab
  5. observe that the discussion tree is opened in the new tab

Expected behaviour

The discussion tree split is opened immediately together with the Diffview windows and it is refreshed (without stealing focus) as soon as the data is loaded.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions