Add a more discoverable "Create Snippet" button


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?


Andrey Levchenko
June 8, 2020, 1:24 PM

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.

Mohammed Davoodi
June 8, 2020, 9:49 PM

A location I was also thinking would be here:

Right next to the create branch and pull request buttons.

Mohammed Davoodi
June 8, 2020, 9:52 PM

Another option here is My Snippets:

Mohammed Davoodi
June 8, 2020, 9:53 PM

do you have a counter to what Andrey saying? What are the use cases of making a snippet from a PR line.

George V @Mohami
June 8, 2020, 9:56 PM

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.


Andrey Levchenko


George V @Mohami



Bitbucket URL