Skip to content

enhance code block language picker - #3214

Merged
kulmann merged 3 commits into
mainfrom
feat/code-block-native-language-select
Aug 25, 2026
Merged

kulmann merged 3 commits into
mainfrom
feat/code-block-native-language-select

Conversation

@AlexAndBear

@AlexAndBear AlexAndBear commented Aug 24, 2026 •

Copy link
Copy Markdown
Member

Description

Before

image

After

image

This change replaces the oc-select in the code block node view with a native <select> to achieve a cleaner, code-editor-like language picker without heavy style overrides.

It also updates the local styling and keeps explicit disabled-state visuals (color + cursor), and adapts unit tests to the native select behavior.

Related Issue

  • Fixes N/A

How Has This Been Tested?

  • test environment: local development environment (macOS)
  • test case 1: pnpm test:unit --run packages/web-pkg/tests/unit/editor/components/CodeBlockComponent.spec.ts
  • test case 2: verified readonly/disabled visual state and cursor behavior in the code block language select

Types of changes

  • Bugfix
  • Enhancement (a change that doesn't break existing code or deployments)
  • Breaking change (a modification that affects current functionality)
  • Technical debt (addressing code that needs refactoring or improvements)
  • Tests (adding or improving tests)
  • Documentation (updates or additions to documentation)
  • Maintenance (like dependency updates or tooling adjustments)

@AlexAndBear AlexAndBear changed the title Use native select for code block language picker enhance code block language picker Aug 24, 2026
@AlexAndBear

AlexAndBear commented Aug 24, 2026 •

Copy link
Copy Markdown
Member Author

This PR is debatable, but the native select with minor styling looks much cleaner and better aligned with the current UI. Using oc-select here would require a lot of CSS overrides, which adds unnecessary complexity and increases the risk of styling issues

@kulmann
kulmann merged commit def15cd into main Aug 25, 2026
31 checks passed
@kulmann
kulmann deleted the feat/code-block-native-language-select branch August 25, 2026 07:02
@openclouders openclouders mentioned this pull request Aug 25, 2026
1 task
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