I used to work on a Bitbucket instance that had snippets installed, and I never noticed that the snippets feature existed until someone sent me a snippet. Also, I remember thinking it was hard to find the button for creating snippets.
We should add a more visible button to see if it'll address growth issues.
Another idea: Can we make it so when people highlight code in the browser view, a "create snippet" suggestion pops up?
I checked cloud versions of Gitlab, Github and Bitbucket.
All of them use menu like:
to add a snippet. Should we add something like that?
As for adding snippet using highlighted text. From user perspective it’s more simple to send reference to particular line rather then creating a snippet. (Do you see another use case here?) Though we can add button to insert snippet to pull request comments. (Along with attaching a file or adding code macro)
This way anyone who works with pull request will know about snippet feature.
Anyway just adding ideas before starting actual implementation.
A location I was also thinking would be here:
Right next to the create branch and pull request buttons.
Another option here is My Snippets:
do you have a counter to what Andrey saying? What are the use cases of making a snippet from a PR line.
It was just an idea, how when you highlight some text in confluence you can add an embedded comment. People highlight text all the time while looking at code, so I think it’d definitely help with discoverability. Not sure how likely people are to create a snipped that way vs copy-pasting though.
One nice thing about a snippet vs just sending a link to a line is that you can add comments and context to the snippet. Also, snippets are static, while the default URL links that Bitbucket creates always point to the tip of the branch, so as commits are made the link can become invalid. When creating documentation, snippets would work better.
I’m not convinced it’s something we should do, it depends on effort involved.