Skip to content

fix(frontend): keep codicon glyph for SQL editor fold control - #419

Open
Coooolfan wants to merge 1 commit into
ClouGence:mainfrom
Coooolfan:fix/sql-editor-fold-glyph
Open

Coooolfan wants to merge 1 commit into
ClouGence:mainfrom
Coooolfan:fix/sql-editor-fold-glyph

Conversation

@Coooolfan

Copy link
Copy Markdown
Contributor

Summary

Monaco's fold control in the SQL editor gutter renders as a hollow box (□) instead of the fold chevron on every foldable line (e.g. SELECT, FROM).

The regression comes from the typography override added to frontend/src/styles/global.less by #251:

.sql-editor-typography {
  .view-lines *,
  .margin-view-overlays * {
    font-family: inherit;
    ...
  }
}

That selector also matches Monaco's fold control element div.cldr.codicon.codicon-folding-expanded. Its codicon icon font gets replaced by Menlo, Monaco, 'Courier New', which has no glyph for the chevron, so the browser draws tofu.

This PR excludes .codicon elements from the override, so icon fonts stay intact while code text and line numbers keep the SQL typography:

.view-lines *:not(.codicon),
.margin-view-overlays *:not(.codicon) {
  font-family: inherit;
  ...
}

Screenshots

Before After
Before: the fold control renders as a hollow box After: the fold chevron is rendered by the codicon font

Related Issues

Regression introduced by #251 (which fixed #241). No existing issue tracks this visual defect; found while reviewing the SQL workspace.

Test Plan (Required)

  • Frontend lint / build
  • Manual verification

Details:

Build
  cd package && ./all_build.sh web                                -> BUILD SUCCESSFUL
  cd backend && ./gradlew :cgdm-web:jar -PbuildFrontend=true -Pprofile=output
                                                                  -> clouddm-js.jar (8.3 MB)

CSS output check
  The emitted chunk-vendors CSS now contains:
    .sql-editor-typography .margin-view-overlays :not(.codicon),
    .sql-editor-typography .view-lines :not(.codicon)
  so Monaco's .cldr.codicon elements are no longer rewritten to Menlo/Monaco.

Manual verification
  Replaced libs/clouddm-js.jar on a local deployment and reloaded the SQL workspace.
  Hovering the gutter of foldable lines shows the fold chevron instead of a hollow box,
  and code text / line numbers keep the SQL typography (see screenshots above).

Checklist

  • The PR title clearly describes the change.
  • The change follows the repository coding standards.
  • Documentation was updated when behavior or usage changed. (N/A: no user-facing docs describe the gutter icon.)
  • Tests were added or updated for behavior changes. (N/A: CSS-only change, no test covers editor chrome.)
  • I confirmed that generated files, dependency directories, logs, and local build artifacts are not included.

The SQL typography override introduced in ClouGence#251 applies the code font to
every descendant of the editor gutter, which also hits Monaco's fold
control (div.cldr.codicon.codicon-folding-expanded). The codicon icon
font is replaced by Menlo/Monaco, which has no glyph for the chevron, so
the gutter shows a hollow box instead of the fold arrow.

Exclude .codicon elements from the view-lines / margin-view-overlays
typography override so icon fonts keep working.
@Coooolfan
Coooolfan requested review from a team and a balanced review from Copilot October 20, 2026 02:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@bucketli bucketli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

OK

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.

[Feature] Bundle Fonts for Air-Gapped Deployments

3 participants