Skip to content

Conversation

@ToMESSKa
Copy link
Contributor

@ToMESSKa ToMESSKa commented Dec 17, 2025

INSTUI-4879

ISSUE:
SourceCodeEditor needs to be migrated to the new theming system

TEST PLAN:

  • check if all tokens are used in styles.ts
  • check if the component works the same as before, should no visual change compared to v11
  • check if focus ring works the same

@ToMESSKa ToMESSKa self-assigned this Dec 17, 2025
@github-actions
Copy link

github-actions bot commented Dec 17, 2025

PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-01-23 14:59 UTC

@ToMESSKa ToMESSKa changed the title feat(ui-source-code-editor): rework SourceCodeEditor [v12] feat(ui-source-code-editor): rework SourceCodeEditor Dec 19, 2025
@adamlobler
Copy link
Collaborator

There are a lot of raw hex values in this component that doesn't have good contrast in the dark theme, I would add these as tokens if you agree..

@ToMESSKa ToMESSKa force-pushed the INSTUI-4879-sourcecode-editor-rework branch from a102a40 to a57f948 Compare January 15, 2026 14:54
Copy link
Collaborator

@matyasf matyasf left a comment

Choose a reason for hiding this comment

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

The contrast looks very bad in dark theme when something is selected:

Image

I think you are setting the selection color wrong, this works for me: https://stackoverflow.com/a/78037621/319473

'.cm-selectionBackground, .cm-editor::selection': {
    backgroundColor: componentTheme.focusedSelectionBackgroundColor + ' !important'
      },

@ToMESSKa ToMESSKa force-pushed the INSTUI-4879-sourcecode-editor-rework branch from a57f948 to fbabe26 Compare January 16, 2026 08:21
@ToMESSKa
Copy link
Contributor Author

The contrast looks very bad in dark theme when something is selected:

Image I think you are setting the selection color wrong, this works for me: https://stackoverflow.com/a/78037621/319473
'.cm-selectionBackground, .cm-editor::selection': {
    backgroundColor: componentTheme.focusedSelectionBackgroundColor + ' !important'
      },

Thanks, I fixed this, please check.

@ToMESSKa ToMESSKa requested a review from matyasf January 16, 2026 08:35
Copy link
Collaborator

@matyasf matyasf left a comment

Choose a reason for hiding this comment

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

looks good now!

Copy link
Collaborator

@adamlobler adamlobler left a comment

Choose a reason for hiding this comment

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

The activeLineColor should be applied that we discussed on slack, but other than that, I think it’s okay

@ToMESSKa ToMESSKa force-pushed the INSTUI-4879-sourcecode-editor-rework branch from fbabe26 to 8afb7ae Compare January 21, 2026 10:51
@ToMESSKa
Copy link
Contributor Author

ToMESSKa commented Jan 21, 2026

The activeLineColor should be applied that we discussed on slack, but other than that, I think it’s okay

@adamlobler Updated it with the activeLineColor token, please check it

@ToMESSKa ToMESSKa requested a review from adamlobler January 21, 2026 11:04
Copy link
Collaborator

@adamlobler adamlobler left a comment

Choose a reason for hiding this comment

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

Just one minor thing, the cursor is still black in dark mode as well, but if you insert this style it should work:

'&.cm-focused .cm-cursor': { borderLeftColor: componentTheme.color },

@ToMESSKa ToMESSKa force-pushed the INSTUI-4879-sourcecode-editor-rework branch from 8afb7ae to 54bd94e Compare January 22, 2026 13:36
@ToMESSKa
Copy link
Contributor Author

Just one minor thing, the cursor is still black in dark mode as well, but if you insert this style it should work:

'&.cm-focused .cm-cursor': { borderLeftColor: componentTheme.color },
@adamlobler Thanks, I fixed this.

@ToMESSKa ToMESSKa requested a review from adamlobler January 22, 2026 13:47
Copy link
Collaborator

@adamlobler adamlobler left a comment

Choose a reason for hiding this comment

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

Perfect 🙌 Thank you!

@ToMESSKa ToMESSKa merged commit d6f5a21 into v12 Jan 23, 2026
8 of 9 checks passed
@ToMESSKa ToMESSKa deleted the INSTUI-4879-sourcecode-editor-rework branch January 23, 2026 14:59
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.

5 participants