8000 chore(devex): remove text-3000 color, replace with text-primary by adamleithp · Pull Request #31391 · PostHog/posthog · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

chore(devex): remove text-3000 color, replace with text-primary #31391

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

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

adamleithp
Copy link
Contributor

Problem

Part of the "reduce colors" initiative, which moves the needle to a more controlled color space (better contrast, aka a11y)

Changes

Replace all instances of the classes/vars text-3000 with text-primary where applicable.

How did you test this code?

Storybook, tested components that changes

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

35 snapshot changes in total. 0 added, 35 modified, 0 deleted:

Triggered by this commit.

👉 Review this PR's diff of snapshots.

Copy link
Contributor
@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR replaces instances of text-3000 color variable with text-primary across the codebase to improve color contrast and accessibility by reducing the number of color variables used.

  • Removes deprecated color variables (text-3000-light, text-3000-dark, muted-3000-light) from tailwind.config.js and vars.scss
  • Updates text color in navigation components (TopBar, KeyboardShortcut, Navigation) to use --text-primary for better contrast
  • Modifies Lemon UI components (LemonButton, LemonInput, LemonTag, etc.) to use standardized text-primary color variable
  • Changes text color in data visualization components (FunnelBarHorizontal, RetentionTable, HeatMapCell) to ensure proper contrast based on background saturation
  • Updates toolbar and modal components to use consistent text-primary color for better accessibility

62 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings | Greptile

@@ -37,7 +37,7 @@ export const ActionResult = ({ result, focused }: SearchResultProps): JSX.Elemen
>
<div className="px-2 py-3 w-full gap-y-0.5 flex items-center">
<result.icon className="text-muted-3000" />
Copy link
Contributor

Choose a reason for hiding this comment

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

style: text-muted-3000 class is still being used here while other -3000 classes are being replaced. Consider if this should also be updated for consistency

Comment on lines 91 to +92
color: #fff;
background-color: var(--text-3000);
background-color: var(--text-primary);
Copy link
Contributor

Choose a reason for hiding this comment

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

style: The white text color is hardcoded to #fff rather than using a CSS variable. Consider using var(--text-inverted) for consistency with the design system.

@@ -942,7 +939,6 @@
--color-graph-crosshair: var(--primitive-neutral-cool-650);

// Deprecated colors (Dark mode)
--text-3000: var(--text-3000-dark);
--text-secondary-3000: var(--text-secondary-3000-dark);
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: This line references a removed variable --text-3000-dark which will cause undefined variable errors

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

6 snapshot changes in total. 0 added, 6 modified, 0 deleted:

Triggered by this commit.

👉 Review this PR's diff of snapshots.

Copy link
Contributor

Size Change: -64 B (0%)

Total Size: 13.6 MB

ℹ️ View Unchanged
Filename Size Change
frontend/dist/toolbar.js 13.6 MB -64 B (0%)

compressed-size-action

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.

2 participants
34B4 @adamleithp @posthog-bot
0