Thank you very much for looking into it a bit deeper. I thought before, of 
hotfixing this on the front end with css, but wanted a cleaner solution in 
the backend. Anyway, in the developers tools it shows as a tab, not spaces, 
and Chrome translates tab to 8 spaces. I managed to change that to 4 with 
javascript code: 
javascript:(function(){document.getElementById("diffs").style.tabSize = 
4;}());

It's not pretty, but I'm glad we came to the bottom of it. Thank you again 
for your help, Christian.
On Wednesday, 9 March 2022 at 00:46:55 UTC+1 Christian Hammond wrote:

> Looking into this a bit, I think the issue is that, really, we don't treat 
> tabs special unless we're showing indentation changes. Instead, we leave it 
> up to the browser. You can check this in your browser's developer tools, 
> see if it's coming up as a tab or a series of spaces.
>
> Given that, a combination of changing TAB_SIZE and setting the tab-size 
> CSS property to what you want might be the way to go.
>
> We can make a note to at the very least output a tab-size property based 
> off TAB_SIZE, for future expansion options.
>
> Christian
>
> On Tue, Mar 8, 2022 at 2:28 AM vale...@gmail.com <vale...@gmail.com> 
> wrote:
>
>> It's just so strange for me. I cleared cache of memcached, local browser, 
>> python pip, deleted all .pyc and .pyo files in folder 
>> ".../reviewboard/diffviewer", restarted apache and memcached, even 
>> uncompiled opcode_generator.pyc to check if TAB_SIZE was indeed different 
>> (it was). But still, when i go to localhost, the intendation hasn't changed.
>>
>> Where else could Review Board or any other service possibly have the old 
>> code stored ??
>>
>> On Monday, 7 March 2022 at 22:14:05 UTC+1 Christian Hammond wrote:
>>
>>> It would ultimately just do the same thing. If changing that number and 
>>> rebuilding caches isn’t working, additional code within the diff viewer 
>>> would need to be added. We’d accept a patch for that, if implemented 
>>> properly, and if it didn’t degrade performance. An extension wouldn’t be 
>>> enough, though.
>>>
>>> Christian
>>>
>>>
>>>
>>> On Mon, Mar 7, 2022 at 02:39 vale...@gmail.com <vale...@gmail.com> 
>>> wrote:
>>>
>>>> Thank you for the response. Would it be any different if I created an 
>>>> extension, like you mentioned in first response? I imagine under the hood 
>>>> it would do the same thing, but I might be missing something.
>>>>
>>>> On Monday, 7 March 2022 at 10:03:30 UTC+1 Christian Hammond wrote:
>>>>
>>>>> You could try clearing memcached and local browser cache, see if that 
>>>>> helps, but otherwise it'd take some digging to debug it. It's really not 
>>>>> designed to be able to be modified, so it's possible that it just isn't 
>>>>> going to work correctly, I'm afraid.
>>>>>
>>>>> We can consider making it customizable in the future, but it wouldn't 
>>>>> be for a while, as our roadmap is packed and fairly set in stone for the 
>>>>> next two major releases.
>>>>>
>>>>> Christian
>>>>>
>>>>> On Mon, Mar 7, 2022 at 12:34 AM vale...@gmail.com <vale...@gmail.com> 
>>>>> wrote:
>>>>>
>>>>>> BUMP.
>>>>>>
>>>>>> On Monday, 21 February 2022 at 14:57:38 UTC+1 vale...@gmail.com 
>>>>>> wrote:
>>>>>>
>>>>>>> Hello,
>>>>>>>
>>>>>>> I found the code in 
>>>>>>> "usr/lib/python2.7/site-packages/reviewboard/diffviewer/opcode_generator.py".
>>>>>>>  
>>>>>>> Is this where I change the TAB_SIZE variable?
>>>>>>>
>>>>>>> I changed it to 2, then restarted apache and memcached, but diff 
>>>>>>> viewer still shows 8 whitespaces. How do I force Review Board to load 
>>>>>>> the 
>>>>>>> newly changed code?
>>>>>>>
>>>>>>> On Wednesday, 7 July 2021 at 23:18:19 UTC+2 Christian Hammond wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> Unfortunately, no, there's no ability to control this in any 
>>>>>>>> official way at this time. It's something we've considered adding, but 
>>>>>>>> we'd 
>>>>>>>> want a way to make it configurable in a fine-grained manner (per-path, 
>>>>>>>> per-repository, etc.), and we just don't have anything suitable in 
>>>>>>>> place 
>>>>>>>> for that today.
>>>>>>>>
>>>>>>>> The only option would be modifying the code (or writing an 
>>>>>>>> extension that overrides a variable). The tab size is configured in 
>>>>>>>> reviewboard.diffviewer.opcode_generator.DiffOpcodeGEnerator.TAB_SIZE, 
>>>>>>>> which 
>>>>>>>> is currently set to 8.
>>>>>>>>
>>>>>>>> Christian
>>>>>>>>
>>>>>>>> On Mon, Jul 5, 2021 at 10:51 PM vale...@gmail.com <
>>>>>>>> vale...@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> (bump?)
>>>>>>>>>
>>>>>>>>> On Monday, 21 June 2021 at 08:08:25 UTC+2 vale...@gmail.com wrote:
>>>>>>>>>
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> In our code, we have tab set to 4 spaces, while in Review Board 
>>>>>>>>>> Diff Viewer, tabs are translated to 6 spaces. Is there an option in 
>>>>>>>>>> Review 
>>>>>>>>>> Board to set tab to 4 spaces?
>>>>>>>>>>
>>>>>>>>>> Thanks!
>>>>>>>>>>
>>>>>>>>> -- 
>>>>>>>>> Supercharge your Review Board with Power Pack: 
>>>>>>>>> https://www.reviewboard.org/powerpack/
>>>>>>>>> Want us to host Review Board for you? Check out RBCommons: 
>>>>>>>>> https://rbcommons.com/
>>>>>>>>> Happy user? Let us know! https://www.reviewboard.org/users/
>>>>>>>>> --- 
>>>>>>>>> You received this message because you are subscribed to the Google 
>>>>>>>>> Groups "Review Board Community" group.
>>>>>>>>> To unsubscribe from this group and stop receiving emails from it, 
>>>>>>>>> send an email to reviewboard...@googlegroups.com.
>>>>>>>>> To view this discussion on the web visit 
>>>>>>>>> https://groups.google.com/d/msgid/reviewboard/6ad0eabb-bb1f-4d60-be97-0789b812859cn%40googlegroups.com
>>>>>>>>>  
>>>>>>>>> <https://groups.google.com/d/msgid/reviewboard/6ad0eabb-bb1f-4d60-be97-0789b812859cn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>>>>> .
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> -- 
>>>>>>>> Christian Hammond
>>>>>>>> President/CEO of Beanbag <https://www.beanbaginc.com/>
>>>>>>>> Makers of Review Board <https://www.reviewboard.org/>
>>>>>>>>
>>>>>>> -- 
>>>>>> Supercharge your Review Board with Power Pack: 
>>>>>> https://www.reviewboard.org/powerpack/
>>>>>> Want us to host Review Board for you? Check out RBCommons: 
>>>>>> https://rbcommons.com/
>>>>>> Happy user? Let us know! https://www.reviewboard.org/users/
>>>>>> --- 
>>>>>> You received this message because you are subscribed to the Google 
>>>>>> Groups "Review Board Community" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it, 
>>>>>> send an email to reviewboard...@googlegroups.com.
>>>>>>
>>>>> To view this discussion on the web visit 
>>>>>> https://groups.google.com/d/msgid/reviewboard/8ec1d299-c10d-4a94-835a-4f0393bca443n%40googlegroups.com
>>>>>>  
>>>>>> <https://groups.google.com/d/msgid/reviewboard/8ec1d299-c10d-4a94-835a-4f0393bca443n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>> .
>>>>>>
>>>>>
>>>>>
>>>>> -- 
>>>>> Christian Hammond
>>>>> President/CEO of Beanbag <https://www.beanbaginc.com/>
>>>>> Makers of Review Board <https://www.reviewboard.org/>
>>>>>
>>>> -- 
>>>> Supercharge your Review Board with Power Pack: 
>>>> https://www.reviewboard.org/powerpack/
>>>> Want us to host Review Board for you? Check out RBCommons: 
>>>> https://rbcommons.com/
>>>> Happy user? Let us know! https://www.reviewboard.org/users/
>>>> --- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "Review Board Community" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>> an email to reviewboard...@googlegroups.com.
>>>>
>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/reviewboard/7a9941db-ed02-44a6-943c-df74e70da765n%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/reviewboard/7a9941db-ed02-44a6-943c-df74e70da765n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> -- 
>>> -- 
>>> Christian Hammond
>>> President/CEO of Beanbag
>>> Makers of Review Board
>>>
>> -- 
>> Supercharge your Review Board with Power Pack: 
>> https://www.reviewboard.org/powerpack/
>> Want us to host Review Board for you? Check out RBCommons: 
>> https://rbcommons.com/
>> Happy user? Let us know! https://www.reviewboard.org/users/
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Review Board Community" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to reviewboard...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/reviewboard/47de6011-6bfd-40c9-8530-2b050412eaa8n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/reviewboard/47de6011-6bfd-40c9-8530-2b050412eaa8n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> -- 
> Christian Hammond
> President/CEO of Beanbag <https://www.beanbaginc.com/>
> Makers of Review Board <https://www.reviewboard.org/>
>

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"Review Board Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/reviewboard/517af0cf-3f7c-414d-a14a-df864f0db688n%40googlegroups.com.

Reply via email to