Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhancement: code snippet colors should depend on native theme #4566

Merged
merged 1 commit into from
Feb 4, 2025

Conversation

urmauur
Copy link
Member

@urmauur urmauur commented Feb 4, 2025

Describe Your Changes

This pull request includes several changes to the theme configurations and styles for code blocks, as well as updates to the MarkdownTextMessage component to improve consistency and appearance.

Theme Configuration Updates:

  • Removed the code-block color definition from multiple theme files, including dark-dimmed, joi-dark, joi-light, and night-blue (themes/dark-dimmed/theme.json [1] themes/joi-dark/theme.json [2] themes/joi-light/theme.json [3] themes/night-blue/theme.json [4].

Component Style Updates:

  • Updated the MarkdownTextMessage component to use hsla(var(--app-code-block)) and hsla(var(--text-primary)) for better theme consistency (web/screens/Thread/ThreadCenterPanel/TextMessage/MarkdownTextMessage.tsx [1] [2] [3] [4].

Code Block Style Improvements:

  • Added !important to various color definitions in code-block.scss to ensure they are applied correctly (web/styles/components/code-block.scss [1] [2] [3] [4] [5].
  • Commented out an unnecessary color definition in code-block.scss (web/styles/components/code-block.scss web/styles/components/code-block.scssL162-R171).

Main Style Updates:

  • Added and updated CSS variables for app-code-block and various highlight colors in main.scss (web/styles/main.scss [1] [2].

Fixes Issues

image
image

Self Checklist

  • Added relevant comments, esp in complex areas
  • Updated docs (for bug fixes / features)
  • Created issues for follow-up changes or refactoring needed

@urmauur urmauur added the type: enhancement Improves a current feature label Feb 4, 2025
@urmauur urmauur added this to the v0.5.16 milestone Feb 4, 2025
@urmauur urmauur requested a review from louis-menlo February 4, 2025 07:53
@urmauur urmauur self-assigned this Feb 4, 2025
Copy link
Contributor

github-actions bot commented Feb 4, 2025

Barecheck - Code coverage report

Total: 67.61%

Your code coverage diff: 0.00% ▴

Uncovered files and lines
FileLines
web/screens/Thread/ThreadCenterPanel/TextMessage/MarkdownTextMessage.tsx32, 36-37, 41, 49-52, 54, 58, 65-67, 73, 76-78, 80, 85-86, 89, 140, 142-143, 148-149, 208, 223

Copy link
Contributor

github-actions bot commented Feb 4, 2025

This is the build for this pull request. You can download it from the Artifacts section here: Build URL.

@urmauur urmauur merged commit e99cbd9 into dev Feb 4, 2025
21 checks passed
@urmauur urmauur deleted the enhancement/code-snippet branch February 4, 2025 12:12
@github-actions github-actions bot modified the milestones: v0.5.16, v0.5.15 Feb 4, 2025
@imtuyethan imtuyethan modified the milestones: v0.5.15, v0.5.16 Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Improves a current feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

enhancement: Code snippets should follow global theme settings
3 participants