Skip to content

Conversation

@create-issue-branch
Copy link
Contributor

@create-issue-branch create-issue-branch bot commented Oct 22, 2025

Status

closes #1259, #1253

What's changed

  • Remove border on code output blocks
  • Fix alignment of line numbers in code blocks by
    • Using variables to set fonts consistently in the interface
    • Fixing line spacing in a number of spots using the typography mixins supplied by the design system.

This also unifies the list of fonts used in the Editor to the list in settings/fonts. They can be added-to/changed by setting --editor-font-family-sans-serif and --editor-font-family-monospace.

Screenshots

Problem Before After
Emojis breaking highligting image image
Another example image image
Fixes border on output image image

@patch0 patch0 temporarily deployed to previews/1264/merge October 22, 2025 08:56 — with GitHub Actions Inactive
@patch0 patch0 temporarily deployed to previews/1264/merge October 22, 2025 11:48 — with GitHub Actions Inactive
@patch0 patch0 temporarily deployed to previews/1264/merge October 24, 2025 08:12 — with GitHub Actions Inactive
@patch0 patch0 temporarily deployed to previews/1264/merge October 24, 2025 08:48 — with GitHub Actions Inactive
@patch0 patch0 temporarily deployed to previews/1264/merge October 24, 2025 11:28 — with GitHub Actions Inactive
@patch0 patch0 temporarily deployed to previews/1264/merge October 24, 2025 16:02 — with GitHub Actions Inactive
@patch0 patch0 temporarily deployed to previews/1264/merge October 24, 2025 16:07 — with GitHub Actions Inactive
@patch0 patch0 temporarily deployed to previews/1264/merge October 24, 2025 16:17 — with GitHub Actions Inactive
@patch0 patch0 requested review from Copilot and loiswells97 October 24, 2025 17:36
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes line number alignment issues in code blocks throughout the editor by standardizing font usage and applying consistent typography styles. The changes address problems where emojis and other content would cause line highlighting to misalign, and removes an unwanted border from code output blocks.

Key changes:

  • Centralized font family definitions in a new _fonts.scss file with CSS custom properties for consistent font application
  • Applied design system typography mixins to ensure consistent line spacing across code blocks and instruction panels
  • Removed border styling from code output blocks in the instructions panel

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/assets/stylesheets/settings/_fonts.scss New file defining standardized sans-serif and monospace font stacks
src/assets/stylesheets/index.scss Migrated to use centralized font variables via CSS custom properties
src/assets/stylesheets/InternalStyles.scss Added font variable definitions with fallbacks for web component customization
src/assets/stylesheets/Instructions.scss Applied typography mixins for consistent line spacing and removed border from code output
src/assets/stylesheets/EditorPanel.scss Applied typography mixin to code editor scroller for consistent line height
src/assets/stylesheets/Button.scss Updated to use centralized sans-serif font variable
src/assets/stylesheets/AstroPiModel.scss Updated to use centralized monospace font variable
src/assets/stylesheets/App.scss Updated to use centralized sans-serif font variable
CHANGELOG.md Documented new features and fixed issues

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -0,0 +1,2 @@
$font-family-sans-serif: Roboto, -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
$font-family-monospace: RobotoMono, source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My only concern with this is that it might change the fonts we're using in places like within codemirror, as we were using different monospace fonts in different places - maybe that's okay though?

Copy link
Contributor

@loiswells97 loiswells97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few thoughts/questions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CC Projects] Lines are sometimes off by one line

5 participants