golang / vscode-go

Go extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=golang.Go
Other
3.85k stars 736 forks source link

Test code lenses for subtests interfere with editor's indentation guides UI #2583

Open wtask opened 1 year ago

wtask commented 1 year ago

Is your feature request related to a problem? Please describe. Could you improve UI for test runnner which currently breaks other extensions. Check the screenshot. The guidline built by brackets-pair feature is broken.

Describe the solution you'd like Move available actions into gutter if you can. Add an icon, where we can click and get popup with test runner actions.

Describe alternatives you've considered Add source actions, available for t.Run() line when we make right click on it.

Additional context Name: Go Id: golang.go Description: Rich Go language support for Visual Studio Code Version: 0.37.0 Publisher: Go Team at Google 2022-12-22_105759

hyangah commented 1 year ago

Thanks for the feedback.

Do you find the test code lens not useful? If so, disabling it and using the test explorer UI is an option.

     "go.enableCodeLens": {
        "runtest": false
    },

Or do you find the test code lens on top of each test function or package still useful, but these code lenses on top of the subtest too noisy? In that case, we can consider a separate codelens configuration for the subtest (added in https://github.com/golang/vscode-go/issues/2536) cc @devuo

devuo commented 1 year ago

Not entirely sure what's the issue the author is reporting.

The sub-test codelens behaviour as implemented is consistent with many other test runner extensions in vscode available for many different languages and runners which is a desirable trait to have.

However, an optional configuration option to disable codelens might be an interesting feature to have for users that do not wish to use codelens or encounter some incompatibility or issue with some other extension they might be using.

wtask commented 1 year ago

@hyangah The feature is useful. Before, I was forced to comment out part of the subtests in order to run only the one I needed. Currently the GUI of this feature is ugly or has primitive UI. You added virtual lines for editor viewport view instead of using gutter column or pupups.

hyangah commented 1 year ago

@wtask This extension itself doesn't control the virtual lines. ("editor.guides.highlightActiveIndentation": false if you prefer to get rid of the highlight). The indentation guides seemed to look separated because the code lenses. If you want both guides and code lenses, please open an issue in the vscode project. The test explorer already uses the gutter-based test indicator and we don't have any plan to invest on this legacy part of test UI (test codelenses).