Make notebook cells follow global font and markdown styling - #57567
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR removes custom text-style refinement configuration from notebook cell editors, likely to let editors inherit styling from defaults/themes and to reduce theme-specific coupling.
Changes:
- Removed
ThemeSettingsdependency from notebook cells. - Removed
TextStyleRefinementsetup (font, size, foreground, transparent background) for Markdown and Code cell editors. - Cleaned up imports accordingly.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Jannik Rosendahl.
|
f59f9b0 to
cfd837d
Compare
|
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Jannik Rosendahl.
|
cfd837d to
7de1fe7
Compare
|
Reviewed and the PR is good, small focused change. However, I will be updating the title and description as the the current title and description do not fully capture the scope of the changes. Thank you for the contribution! |
…stries#57567) Notebook cells are currently not responding to changes in font-family (`zed://settings/buffer_font_family`) and font-size (`zed://settings/buffer_font_size`). Currently, `MarkdownCell` and `CodeCell` create and set a `TextStyleRefinement` on their `Editor`, creating copies of font-family and font-size in the process. As a result, these do not get updated when the global font-family or font-size change. By not setting the refinement manually and letting the editor handle these value instead, these values get updated when the global settings change. This behaviour is consistent with how the inline repl already behaves and in my opinion is according to the users expectations. After Review: this PR changes the rendered preview of MarkdownCells to use the themed MarkdownStyle instead of an empty Markdown Style Before: https://github.com/user-attachments/assets/e70b9346-8fa1-4d66-aa85-07e987c56ff2 After: https://github.com/user-attachments/assets/4957e20e-9b5b-4cb9-a9df-3b33538bc686 Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [ ] Tests cover the new/changed behavior - not sure if this needs test or how they should look like... - [x] Performance impact has been considered and is acceptable ~~Closes #ISSUE~~ Release Notes: - Fixed notebook cells not responding to appearance settings changes
…stries#57567) Notebook cells are currently not responding to changes in font-family (`zed://settings/buffer_font_family`) and font-size (`zed://settings/buffer_font_size`). Currently, `MarkdownCell` and `CodeCell` create and set a `TextStyleRefinement` on their `Editor`, creating copies of font-family and font-size in the process. As a result, these do not get updated when the global font-family or font-size change. By not setting the refinement manually and letting the editor handle these value instead, these values get updated when the global settings change. This behaviour is consistent with how the inline repl already behaves and in my opinion is according to the users expectations. After Review: this PR changes the rendered preview of MarkdownCells to use the themed MarkdownStyle instead of an empty Markdown Style Before: https://github.com/user-attachments/assets/e70b9346-8fa1-4d66-aa85-07e987c56ff2 After: https://github.com/user-attachments/assets/4957e20e-9b5b-4cb9-a9df-3b33538bc686 Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [ ] Tests cover the new/changed behavior - not sure if this needs test or how they should look like... - [x] Performance impact has been considered and is acceptable ~~Closes #ISSUE~~ Release Notes: - Fixed notebook cells not responding to appearance settings changes


Notebook cells are currently not responding to changes in font-family (
zed://settings/buffer_font_family) and font-size (zed://settings/buffer_font_size).Currently,
MarkdownCellandCodeCellcreate and set aTextStyleRefinementon theirEditor, creating copies of font-family and font-size in the process. As a result, these do not get updated when the global font-family or font-size change.By not setting the refinement manually and letting the editor handle these value instead, these values get updated when the global settings change.
This behaviour is consistent with how the inline repl already behaves and in my opinion is according to the users expectations.
After Review: this PR changes the rendered preview of MarkdownCells to use the themed MarkdownStyle instead of an empty Markdown Style
Before:
origin_main.mov
After:
fix.mov
Self-Review Checklist:
Closes #ISSUERelease Notes: