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

Activation Button on Activity Sidebar #75

Closed
kirill-d-lappo opened this issue May 15, 2019 · 12 comments
Closed

Activation Button on Activity Sidebar #75

kirill-d-lappo opened this issue May 15, 2019 · 12 comments
Assignees
Labels
feature request Feature request nice to have A feature request that is nice to have (lower priority)

Comments

@kirill-d-lappo
Copy link

Is that possible to add activation button on the Activity Bar, which is on the left side of VS Code window? So it could be easily found with other system buttons (Explorer, Search, Source Control etc).

@mhutchie
Copy link
Owner

Thanks for this suggestion, I'll check to see if this is possible.

@mhutchie mhutchie added the nice to have A feature request that is nice to have (lower priority) label May 15, 2019
@mhutchie
Copy link
Owner

After looking into this and doing some tests, it appears that in order to add a button/icon to the Activity Bar, the extension must contribute a view container with at least one view to the VS Code Sidebar, as described here. The Activity Bar buttons/icons cannot be used to trigger an arbitary extension command (like StatusBarItem's can).

Creating a Side Bar view is not something I intend to do with this extension in the near future, as I haven't found any functionality that can't be incorporated best, intuitively & visually in the Webview (not a sidebar view) that Git Graph uses.

I'll keep an eye out for if the VS Code API allows this in the future, in which case I can add it then, or if new Git Graph functionality is requested that would be best suited to a new Side Bar view.

@mhutchie
Copy link
Owner

FYI: #76 will be available in the next release, and adds a Git Graph icon to each Source Code Provider title in the built-in SCP Sidebar View, which when clicked opens Git Graph to the corresponding repository. There is a screenshot of my working POC of this here.

@mindplay-dk
Copy link

For the record, I never would have found this without poking through docs and finally finding this issue with the POC screenshot. ☺️

What do you think about maybe (optionally) docking Git Graph in a panel below the tabs, rather than in an actual tab? This is where it's traditionally located in many other IDEs.

Perhaps then, it "contributes" to the UI and is permitted an entry in the activity bar, where I would have expected to find it?

(The Git graph is a primary feature in my world and definitely belongs in a prominent spot - it's definitely not a secondary feature that should be relegated to a tiny corner somewhere...)

@mhutchie
Copy link
Owner

Hi @mindplay-dk,

Unfortunately Visual Studio Code currently only allows extensions to display a Webview in the Git Graph View’s currently location. If / when Visual Studio Code supports Webviews in a panel below the tabs, I definitely want to integrate with it as an option.

As mentioned in one of my previous comments in this thread, Visual Studio Code only allows extensions to add an icon to the Activity Bar if they contribute a View Container to the Sidebar (where the Explorer and built-in VSCode Git Extension View is, not in a below the tabs as you’re requesting). Hence a Git Graph entry can’t currently be in the Activity Bar.

FYI: I’m continually monitoring the new integrations Visual Studio Code provide to extensions, especially ones that make Git Graph more discoverable and make it a more flexible tool for users.

@kirill-d-lappo
Copy link
Author

@mhutchie love ya, one more thanks for the extension

@mindplay-dk
Copy link

As mentioned in one of my previous comments in this thread, Visual Studio Code only allows extensions to add an icon to the Activity Bar if they contribute a View Container to the Sidebar (where the Explorer and built-in VSCode Git Extension View is, not in a below the tabs as you’re requesting).

Ah, right - I understand now. The buttons on the left are essentially vertical "tab headers" for a bunch of "tabs" in the area next to them - it's like a sideways tab-view.

I've only recently started making VS code my full-time workbench, so I'm still getting used to the UI.

Hmm, what about the bottom panel? (Output, Console, Problems, Terminal) ... is there any way to (optionally) dock the panel there? That's where it's located in e.g. Jetbrains IDEs.

@mhutchie
Copy link
Owner

Hi @mindplay-dk, Visual Studio Code currently only allows extensions to display a Webview in the Git Graph View’s current location, nowhere else.

@mindplay-dk
Copy link

They're tracking a (somewhat obscure) feature request here:

microsoft/vscode#41686

@mindplay-dk
Copy link

@mhutchie contributing to the bottom panel should now be possible - will you reopen this issue? 🙂

@mhutchie
Copy link
Owner

Hi @mindplay-dk,

That’s great news if this functionality will now be available in Visual Studio Code! I’ll start experimenting with the new functionality to see how it works, and what possible integrations it will enable. I’m really looking forward to releasing these changes!

I won’t re-open this feature request just yet, as it is not a point that it’s releasable in Git Graph. This is because I can’t just use the latest features of Visual Studio Code as soon as it becomes available, as it would require me to upgrade the minimum Visual Studio Code version requirement of Git Graph. Every time I do this, it prevents all of the Git Graph users that haven’t upgraded Visual Studio Code to the required version from receiving any new updates to Git Graph (and all the new features they include). Once the percentage of Git Graph users on compatible versions of Visual Studio Code for this feature increases to a suitable level, I’ll then re-open and implement this feature.

@AnthonyLenglet
Copy link

randomly remembered this issue 2 years later, is there a way to display the graph in a panel with the features available today ? I would love the ability to open in in a small panel in the git tab 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Feature request nice to have A feature request that is nice to have (lower priority)
Projects
None yet
Development

No branches or pull requests

4 participants