Skip to content

feat(ui): apply text styles from settings to MessageEditor #8360

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

matthewevans
Copy link
Contributor

🧢 Changes

  • Passed user diff settings (font family, tab size, ligatures) from MessageEditor.svelte down to the CSS layer using CSS custom properties (--code-block-font, --code-block-tab-size, --code-block-ligatures).
  • Updated standard-theme.css to consume these new custom properties for code blocks (.StandardTheme__code), inline code (.StandardTheme__textCode), and the plain text container (.lexical-container.plain-text). Sensible defaults are provided in case the properties are not set.

☕️ Reasoning

To apply a consistent visual representation of text styling across components.

Copy link

vercel bot commented Apr 30, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
gitbutler-components ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 30, 2025 10:27pm

Copy link

vercel bot commented Apr 30, 2025

@matthewevans is attempting to deploy a commit to the GitButler Team on Vercel.

A member of the Team first needs to authorize it.

@PavelLaptev
Copy link
Contributor

Thanks @matthewevans!

I was checking the PR and noticed that when I change the font in the input, only the font in the hunk header reflects the change — there’s no effect on anything else:

Hunk Header

Also, there are no changes in the editor itself:

Editor Screenshot

Does it work as expected on your end?

@matthewevans
Copy link
Contributor Author

matthewevans commented Apr 30, 2025

@PavelLaptev Oh nice catch. The settings dialog preview has apparently not worked... ever? I've added the relevant prop so it's applied now

Screenshot 2025-04-30 at 3 27 20 PM
Screenshot 2025-04-30 at 3 27 34 PM

@PavelLaptev
Copy link
Contributor

Thanks! Works now :-)

@PavelLaptev PavelLaptev merged commit 12de011 into gitbutlerapp:master Apr 30, 2025
19 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants