Skip to content

feat(ui-source-code-editor): add python language support - #2799

Draft
AlexKichkailo wants to merge 1 commit into
masterfrom
feat/source-code-editor-python
Draft

AlexKichkailo wants to merge 1 commit into
masterfrom
feat/source-code-editor-python

Conversation

@AlexKichkailo

Copy link
Copy Markdown
Contributor

Summary

  • Add python to the language prop of SourceCodeEditor (v1 and v2), using the Python mode from @codemirror/legacy-modes, which the package already depends on for shell and YAML.
  • Add a Python sample to the Language support example in both READMEs.
  • Python tokens map onto the existing highlight tags, so they use the same theme colors as the other languages (keyword #770088, definition #0000ff, string #aa1111 in the default theme).
  • Bundle size: the Python mode adds 6,469 B minified, 2,723 B minified and gzipped (esbuild, @codemirror/* external). It is imported statically like the YAML mode (728 B gzipped), so every SourceCodeEditor consumer pays it.

Part of INSTUI-5223. This covers the Python option only; jql and plaintext are still open on the ticket.

Test Plan

  • On the SourceCodeEditor docs page, pick python in the Language support example and check the highlighting in the light, dark and high contrast themes.
  • Check that the other languages in that example still highlight as before.

@AlexKichkailo AlexKichkailo self-assigned this Nov 13, 2026
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.2

QR code for preview link

🚀 View preview at
https://instructure.design/pr-preview/pr-2799/

Built to branch gh-pages at 2026-11-13 19:33 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-actions

Copy link
Copy Markdown
Contributor

Visual regression report

Cypress suite: ✅ Passing

Visual diff: ⚠️ Changes detected.

Status Count
Unchanged 110
Changed 1
New 0
Removed 0

Accessibility (axe): ✅ No violations.

📊 View full report — click a screenshot's ⚠ badge to see each violation boxed on the image, with the offending element named and contrast failures shown as color swatches.

Diff images (1)

tooltip-dark.png — 15191 pixels differ

Baselines come from the visual-baselines branch. They refresh on every merge to master. The Cypress suite line covers the a11y and console-error assertions — a ❌ there means the suite found real issues even if the visual diff is clean.

github-actions Bot pushed a commit that referenced this pull request Nov 13, 2026

This branch has not been deployed

No deployments
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.

2 participants