Skip to content

Commit bb3fb2f

Browse files
All this time our editor has used monospace. Use a real code font (#8076)
* All this time our editor has used `monospace`....wow Better late then never I guess! We use Source Code Pro elsewhere, so all this PR does is apply it to the CodeMirror instance. Source Code Pro is much more suitable for small font sizes, so I actually felt the need to scale down the base font for the editor after changing it. It was a little debatable but I went with `text-xs` for higher density. This has made me realize that we really should make settings for the following when we have time: - [ ] setting for app font-size - [ ] setting for editor font-size - [ ] setting for editor font-family (maybe could take a URL?) * Update snapshots * Actually add Source Code Variable font to the repo * Move "Inter" font into a public/fonts/ dir * Fix up CSP merge * Update snapshots * Update snapshots * Fix loft E2E test that broke from text size decrease Oy vey * Fix E2E test that broke with font change Unsure why * Fix E2E test that broke because it clicked on some random code location And deleting in another spot after the font size changed happened to not cause the error this test expected to occur * Update snapshots * Update snapshots --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 293b80c commit bb3fb2f

File tree

131 files changed

+363
-33
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+363
-33
lines changed

e2e/playwright/code-pane-and-errors.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ test.describe('Code pane and errors', () => {
1212
homePage,
1313
scene,
1414
cmdBar,
15+
editor,
1516
}) => {
1617
const u = await getUtils(page)
1718

@@ -41,7 +42,7 @@ extrude001 = extrude(sketch001, length = 5)`
4142

4243
// Delete a character to break the KCL
4344
await u.openKclCodePanel()
44-
await page.getByText('extrude(').click()
45+
await editor.codeContent.getByText('sketch001').last().click()
4546
await page.keyboard.press('Backspace')
4647

4748
// Ensure that a badge appears on the button

e2e/playwright/point-click.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,9 +1160,10 @@ extrude001 = extrude(profile001, length = 100)`
11601160
}) => {
11611161
const circleCode1 = `circle(center = [0, 0], radius = 30)`
11621162
const circleCode2 = `circle(center = [0, 0], radius = 20)`
1163-
const initialCode = `sketch001 = startSketchOn(XZ)
1163+
const initialCode = `offset001 = 50
1164+
sketch001 = startSketchOn(XZ)
11641165
|> ${circleCode1}
1165-
plane001 = offsetPlane(XZ, offset = 50)
1166+
plane001 = offsetPlane(XZ, offset = offset001)
11661167
sketch002 = startSketchOn(plane001)
11671168
|> ${circleCode2}
11681169
`

e2e/playwright/regression-tests.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,6 @@ extrude001 = extrude(sketch001, length = 50)
286286
await page.keyboard.press('ArrowUp')
287287
await page.keyboard.press('ArrowUp')
288288
await page.keyboard.press('ArrowUp')
289-
await page.keyboard.press('ArrowUp')
290289
await page.keyboard.press('End')
291290
await page.keyboard.up('Shift')
292291
await page.keyboard.press('Backspace')
-1.1 KB
-209 Bytes
-3.71 KB

0 commit comments

Comments
 (0)