Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Ignore whitespace by default?

Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 10, 2014

In the diff views on the Stash web interface, there is an option to ignore whitespace. This is off by default and has to be switched on every time one visits the web interface.(*)

Is it possible to change the global default setting from off to on in the server's config file or somewhere else?

(*) Feature suggestion: store this in a cookie or the user profile so it persists for every user.

1 answer

1 accepted

2 votes
Answer accepted
Adam
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 13, 2014

There's no setting for changing the default or persisting it longer, unfortunately. The setting is persisted, but only for the life of a browser tab (and any tabs opened from it).

This limited persistence is by design, but I suspect we'll eventually end up extending the persistence to the whole browser indefinitely (as you are not the first to want it). You can track a related issue for side-by-side diff preference here https://jira.atlassian.com/browse/STASH-4693

UPDATE: If you look at that ticket, we've switch to storing this per-browser. So you won't have to update it when returning to Stash Dev in the same browser, but you will have to update it when switching browser

Mark Schlitz October 1, 2018

Hi @Adam. I saw your last "UPDATE" but it does not seem to persist the "Ignore whitespace by default" option. As soon as I go to a new page and compare a different diff, the option reverts to default and I have to enabled the "ignore" again.

Adam
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 1, 2018

There could be a few things going on:

1. You've disabled localStorage, so that we can't store the option between page loads.

2. Your localStorage is full. Usually this won't be because of Bitbucket Server, but localStorage space is shared across a whole domain, so any other pages/apps that run on the same domain as Bitbucket Server could be filling it up.

3. It's been long enough since the last time you viewed a PR that we cleaned up the stored option preferences (we do this to conserve space in localStorage). The timeout is 28-56 days (we run every 28 days and remove anything older than 28 days).

4. You're on an old version of Stash.

5. Some other error is occurring in your JS that is stopping us from loading the options.

 

Don't hesitate to open a support case and we can help you debug. It would be useful to see your JS console and whether there are any errors displayed there to see if that is part of the problem.

 

Cheers,

Adam

Mark Schlitz October 2, 2018

It is just the Bitbucket cloud server as far as I know.

  1. Nothing abnormal disabled. Adblocker is turned off for testing purposes.
  2. LocalStorage looks normal. Cleared it manually from the Chrome console and tried again without success.
  3. same as above
  4. Bitbucket Server: http://bitbucket.org/companyName
  5. No errors, just warnings

Capture.PNG

Steps:

  1. I cleared my local storage
  2. did a hard refresh on the page.
  3. View a diff of my branch versus another branch.
  4. Set "Ignore whitespace"
  5. Click on branches page
  6. Navigate to the same branch
  7. Compare again this branch to another branch (same as step 3)
  8. "Ignore whitespace" is no longer checked.
Adam
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 3, 2018

Ah right! This question was originally about Bitbucket Server, which is a different codebase with sometimes different behaviors. Sorry for the confusion there. I think our redesign of these forums made the cloud/server distinction less apparent.

Bitbucket Cloud/bitbucket.org unfortunately hasn't implemented sticky options yet. So what you're seeing is expected.  https://bitbucket.org/site/master/issues/13309/user-setting-to-always-ignore-whitespace looks to be a good issue to track for that. They're putting a lot of effort into improving their PR and diff experience, so I wouldn't be too surprised if they incorporated this if you make your voice heard there.

Cheers!

Adam

Like Jack Hao likes this
Like Ron MacCracken likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events