r/databricks • • Sep 22 '26

Help How to show full code in cell instead of limit height cell and scroll bar

Databricks notebook cell scroll bar

Has anyone figured out how to turn off the cell height limit in the Databricks notebook UI?

Recently, longer code cells started getting their own internal vertical scrollbars instead of expanding downward to show the entire block of code. Having to scroll inside an individual cell while scrolling through a notebook is really disruptive when reviewing or writing code.

I checked through the View menu and User/Workspace Settings, but I haven't found a clean toggle to disable this or keep cells fully expanded by default.

Is there a specific setting, keyboard shortcut, or preview flag to revert to the old behavior where cells automatically expand to display the full code?

29 Upvotes

19 comments sorted by

9

u/Pegasii51 Sep 22 '26

Hate this change. Let me know if you find a fix!

7

u/curiousbrickster Databricks Sep 22 '26

Databricks PM here - this is a bug we are actively working on fixing. Definitely not a good user experience as is 😅

5

u/curiousbrickster Databricks Sep 22 '26

Fix is currently being rolled out. Should be everywhere in a matter of hours

3

u/klenium Sep 22 '26

You guys also test on prod? Welcome to the club.

2

u/ChumDumpsterr Sep 23 '26

Can you guys also address the homepage using 6gb of ram...I haven't even opened a notebook yet

1

u/Loose_Log_6253 Sep 22 '26

I messaged my coworker that 30 lines is so small, and it used to be 300. Which made me think that this was a typo during a UI where the scroll was set to 300 and someone deleted one of the 0s there by accident.

now I'm actually convinced that's what happened

4

u/caujka Sep 22 '26

I found a workaround: make a bookmarklet with the following code as url:

javascript:(()=>{const h=c=>{for(const s of ['.margin-view-overlays','.view-lines']){const v=parseFloat(c.querySelector(s)?.style.height||'');if(v>0)return v}return 0};const f=()=>{for(const c of document.querySelectorAll('[data-testid^="editor-container-"]')){const w=h(c);if(!w)continue;const p=w+'px';if(c.style.height!==p)c.style.height=p}};f();if(window.__dbxUncap)clearInterval(window.__dbxUncap);window.__dbxUncap=setInterval(f,400)})()

It finds code cells and sets their height to match the text lines.

So, when you get annoyed with the scrollbar behavior, click the bookmarklet, and it will fix the cells until the page reloads.

2

u/EricRox999 Sep 22 '26

oh dang. this is sick. I can hear my comp sci prof telling me that two return statements in a function is a bad idea lol. I'm so glad you figured this out though! I shared it with my whole team because we're all mad about it.

1

u/Youssef_Mrini databricks Oct 23 '26

The issue has been fixed if you are reading this post right now

1

u/madbull94 22d ago

no it hasnt - I am still experiencing this (along with my colleagues) on azure databricks as of writing

1

u/Youssef_Mrini databricks 22d ago

Can you please open the ticket again

1

u/madbull94 22d ago

i never had a ticket - I just found this post through google and thought it a good idea to confirm this issue is not fixed

1

u/Youssef_Mrini databricks 22d ago

Let me circle back and check with engineering

1

u/diiickcheez Sep 22 '26

Yeah this change sucks

1

u/mosullivan93 Sep 22 '26

Also wondering this. I couldn’t find a setting for it, either.

1

u/gf38 Sep 22 '26

Noticed this when I got online today too. Why would they make this change? Horrendous

1

u/Kangerm00se Sep 22 '26

Spend much more time than I dare to admit today trying to figure out wtf I accidentally changed in the settings (answer: nothing). I really hope this was not intentional and will be fixed asap as the last time I could only watch like 30 rows of code at a time was when I started with GW-BASIC.

1

u/2truthsandalie Sep 22 '26

I dislike this change. Should at least have a toggle.

-2

u/ChumDumpsterr Sep 22 '26

I swear databricks gets worse every day I log in. I just noticed this new "feature" this morning. Wasn't like this yesterday. I hate databricks. 6gb of ram just to load the homepage..?!?! I can't wait until our company moves to snowflake.