It should be possible to hide diff of some of the files by default

Piotrek Dabrowski July 12, 2017

When reviewing PR it's offen problematic if the PR contains big autogenerated changes. Especially in files like `yarn.lock` or `package-lock.json`. Those files are totally not interesting for me and I'd prefer them to be collapsed by default.

All of the files are expanded by default and with many lines to show (around few thousands) it starts to be really troublesome to navigate (page is lagging)

Can you guys make it collapsed by default and save the reviewers pain of looking at massive and not interesting diffs?

yarnlocks.PNG

Example above

5 comments

Eric Henry
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 12, 2017
Like # people like this
Jordan Day January 16, 2018

I disagree, the linked feature request is not really the same. Especially since bitbucket doesn't auto-load some files once a diff has reached a certain size. So if I have a project with files

```

package.json

package-lock.json

sourcefile1

sourcefile2

````

 

`sourcefile1` and `sourcefile2` always get stuck with the annoying `Oops! You've got a lot of code in this diff and it couldn't load with the page. Click here to give it another chance.` message.

 

It seems like bitbucket should be smart enough to recognize common files like `package-lock.json` use extremely common and almost always have a very log signal:noise ratio, and collapse them accordingly. Or at least move them to the end of the diff, which presumably would make them more likely to get the `Oops!` message than the actual source code.

Like # people like this
mullery1 October 17, 2018

I agree that this issue is distinct from 7086. I'd really like to see files above a certain size either collapsed by default, or pushed to the end of the list. It would make it much easier to skim a PR and quickly identify areas that will require closer review.

Like Reece Daniels likes this
Aaron Beall January 15, 2019

+1, almost all our PRs fail to load anything because the first file is often a large `package-lock.json` file that fails, and all subsequent files fail. The linked issue is not the same, it was quite easy to create a Tampermonkey script that adds collapse/expand of individual file diffs, but the failure to load file diffs at all is quite annoying.

anselmdk January 17, 2019

Same here, can't believe, we're in 2019, and I'm not able to see the diff of my javascript project.

If this doesn't get fixed soon, this would be a real reason for me to move back to Github.

Like # people like this
mullery1 January 22, 2019

The new PR experience "lab" is amazing and just what I was hoping to see! I acknowledge that it's in beta but looks like it will significantly improve my workflow.

For anyone else coming here, here's how to enable:

  • Click your profile image in the bottom-left
  • Choose “Bitbucket settings”
  • Choose “Apps and features > Labs” from left-hand menu
  • Enable “New pull request experience”

Right off the bat I can see that it hides my package-lock.json which was causing the most trouble, but correctly displays all other files. I'm seeing a 404 when I click "Configure excluded files" but I'm assuming that this will be fixed soon.

Well done Atlassian 👏

Like # people like this
yhnavein January 23, 2019

I am sorry but using a new PR experience is no way to be fix for that. 

First of all there are multiple functionalities missing there. This one alone does make it unusable in our company. Tasks for example

But there's more: big PRs are totally not usable, whereas in the "old experience"  it was slow but eventually page would load (WTF)

mullery1 January 23, 2019

Oh, for sure. I'm definitely going to be flipping back and forth between the two implementations, since I frequently need to add tasks and create comment permalinks. This is annoying but fortunately these features seem to be on their roadmap.

I haven't seen it barf yet for big PRs but will keep that in mind.

Tom Kane
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 24, 2019

We’ve released a new feature called Excluded files. You can now exclude files in large diffs on pull requests for which you are the admin, so the review process is easier for everyone involved. To enable the new feature, go to the repository containing the pull request and click Settings > Excluded files in the Pull Requests section. Learn more.

The Excluded files filter is only available in the new pull request experience.

Like # people like this
Denis Golyakov February 4, 2019

Any chance for this to be included in commit diffs as well?

Like # people like this
Tom Kane
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 4, 2019

That's a great idea. We are gathering feedback and usage metrics on excluded files in the new pull request experience. We also have some improvements we want to add to the feature. After that we may consider supporting excluded files in other diff contexts.

Danil Moroz February 2, 2021

Hi!

We definitely need it in commit diffs too!
Thanks)

Tom Kane
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 4, 2019

You can read about this feature on the Bitbucket blog.

Like Reece Daniels likes this
Reece Daniels October 25, 2019

Thanks Tom. Useful answers to this thread.

Danil Moroz February 2, 2021

Hi there!

Are there any plans to implement `Excluded files` feature for commit diffs also?
thanks

Tom Kane
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 12, 2021

Hi, @Danil. We don't have any immediate plans to implement Excluded files for commit diffs. There is a request for that feature if you would like to comment or vote on int.

Like Danil Moroz likes this

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events