cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Get Started Discussions
Start your journey with Databricks by joining discussions on getting started guides, tutorials, and introductory topics. Connect with beginners and experts alike to kickstart your Databricks experience.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Cells only shows 20 lines

andersloren
Visitor

Hello,

Suddenly, the visible portion of the cells in all of my notebooks have shrinked to only 20 lines of code. I know this is a feature when a cell stretches over hundreds of lines. But makes no sense why this should happen to a cell with only 22 lines (please see embedded picture). How do I fix this?

andersloren_1-1790084682437.png

 

 

4 REPLIES 4

Ashwin_DSA
Databricks Employee
Databricks Employee

Hi @andersloren,

Thanks for flagging this. Having checked this internally, I can see this isnโ€™t the intended collapsed-cell behaviour. A recent notebook UI change introduced a fixed-height editor with an internal scrollbar, which can affect even relatively short cells. The code itself is still there, but the display is being capped.

The team has identified the issue, and a fix is being rolled out. As a temporary workaround, try opening the cell in focus or full-screen mode, which should display the full cell. Sorry for the inconvenience, and thanks for calling it out.

 

Regards,
Ashwin | Delivery Solution Architect @ Databricks
Helping you build and scale the Data Intelligence Platform.
***Opinions are my own***

aayush_410
New Contributor II

A few things worth checking before assuming a bug, since none of these are the auto-collapse-on-hundreds-of-lines feature you're already aware of, but any of them can make a genuinely short cell render taller than its line count and trip that same collapse threshold:

  • Check line wrapping. If Wrap lines is on (Profile โ†’ Settings โ†’ Developer settings โ†’ Wrap lines) and any of your 22 lines are long, each wrapped line counts toward the rendered line count the collapse feature measures โ€” not your actual code line count. A handful of long lines wrapping to 2-3 visual rows each can easily push a 22-line cell past the same internal threshold meant for hundred-line cells. Try toggling it off and see if the cell expands fully.
  • Check your editor font size. Same mechanism from a different angle โ€” Settings โ†’ Developer โ†’ Editor font size. A larger font increases the pixel height per line, which can trip a pixel-based max-height cap sooner than expected even without wrapping.
  • Try toggling the New cell UI. View โ†’ Developer settings โ†’ New cell UI (experimental). If you're on the new cell UI, try switching back to classic (or vice versa) โ€” this is a newer feature and layout/height behavior differs between the two; if the shrink only happens on one, that narrows it to a UI-specific regression rather than something in your control.
  • Confirm it's every notebook, not just one. Since you said "all of my notebooks," that argues against a per-notebook setting and toward a workspace-level Developer setting (or a browser cache/zoom issue) โ€” worth also checking your browser zoom level is at 100%, since a non-100% zoom can distort the pixel math the same way font size does.

If none of the above changes the behavior, this looks like a rendering bug rather than an intended feature working as designed (a 20-22 line cell shouldn't hit the same limit as a 700-line one) โ€” worth filing it with Databricks support/the community moderators with a screenshot and your notebook UI version (classic vs. new), since there's no documented manual override for that collapse threshold.

Aayush Sharma

Ashwin_DSA
Databricks Employee
Databricks Employee

Hi @andersloren,

 I believe this is now fixed and you should be able to view the full cell now. Let me know if that's not the case.

 

Regards,
Ashwin | Delivery Solution Architect @ Databricks
Helping you build and scale the Data Intelligence Platform.
***Opinions are my own***

Hello @Ashwin_DSA,

The fix seems to work fine on my end. Thank you for the quick respons.

/Anders