Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@sfc-gh-pchiu
Copy link
Contributor

@sfc-gh-pchiu sfc-gh-pchiu commented Apr 4, 2025

Describe your changes

With guidance from design (and from the discussion here), the PR consolidated the primitive color codes (red/green/blue/etc...) used in our themes with the Markdown text's color so that they are consistent across the app.

Specifically, I replaced red/blue/green/yellow in the base (light) and dark themes with the definition here.
RFC if we need change the gray color as well. I left it out due to it having multiple variants already.

GitHub Issue Link (if applicable)

Testing Plan

  • E2E Tests

Contribution License Agreement

By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.

@snyk-io
Copy link
Contributor

snyk-io bot commented Apr 4, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

@github-actions
Copy link
Contributor

github-actions bot commented Apr 4, 2025

✅ PR preview is ready!

Name Link
📦 Wheel file https://core-previews.s3-us-west-2.amazonaws.com/pr-11033/streamlit-1.44.1-py3-none-any.whl
🕹️ Preview app pr-11033.streamlit.app (☁️ Deploy here if not accessible)

@sfc-gh-pchiu sfc-gh-pchiu added security-assessment-completed Security assessment has been completed for PR change:chore PR contains maintenance or housekeeping change impact:users PR changes affect end users labels Apr 4, 2025
@sfc-gh-pchiu sfc-gh-pchiu changed the title use md text colors [chore] use markdown text colors for primitives Apr 4, 2025
@sfc-gh-pchiu sfc-gh-pchiu marked this pull request as ready for review April 4, 2025 02:09
@sfc-gh-pchiu sfc-gh-pchiu changed the title [chore] use markdown text colors for primitives [theming] use markdown text colors for primitives Apr 4, 2025
sfc-gh-lmasuch
sfc-gh-lmasuch approved these changes Apr 4, 2025
Copy link
Collaborator

@lukasmasuch lukasmasuch left a comment

Choose a reason for hiding this comment

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

LGTM 👍

But It might be good to also directly use these colors within getMarkdownTextColors, e.g.:

export function getMarkdownTextColors(theme: EmotionTheme): any {
  const lightTheme = hasLightBackgroundColor(theme)
  const primary = theme.colors.primary
  const red = theme.colors.red
  const yellow = theme.colors.yellow
  const green = theme.colors.green
  const blue = theme.colors.blue
  const orange = lightTheme ? theme.colors.orange100 : theme.colors.orange60
  const violet = lightTheme ? theme.colors.purple80 : theme.colors.purple50
  const purple = lightTheme ? theme.colors.purple100 : theme.colors.purple80
  const gray = lightTheme ? theme.colors.gray80 : theme.colors.gray70
  ....

@sfc-gh-pchiu sfc-gh-pchiu force-pushed the chore/unify-primitive-colors branch from 3ccb19a to bfd112a Compare April 4, 2025 18:01
@sfc-gh-pchiu sfc-gh-pchiu enabled auto-merge (squash) April 4, 2025 19:05
@sfc-gh-pchiu sfc-gh-pchiu force-pushed the chore/unify-primitive-colors branch from 2c8c8d7 to 7975083 Compare April 4, 2025 19:27
@sfc-gh-pchiu sfc-gh-pchiu merged commit e70d98e into develop Apr 4, 2025
33 checks passed
@sfc-gh-pchiu sfc-gh-pchiu deleted the chore/unify-primitive-colors branch April 4, 2025 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:chore PR contains maintenance or housekeeping change impact:users PR changes affect end users security-assessment-completed Security assessment has been completed for PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants