fix: Fix HyperDX primary button styling and SSR hydration#1706
Merged
elizabetdev merged 4 commits intomainfrom Feb 6, 2026
Merged
fix: Fix HyperDX primary button styling and SSR hydration#1706elizabetdev merged 4 commits intomainfrom
elizabetdev merged 4 commits intomainfrom
Conversation
When NEXT_PUBLIC_THEME was explicitly set to 'hyperdx', primary buttons displayed with Mantine's default styling instead of the custom theme styling. This was caused by the theme class not being applied during server-side rendering, leading to a hydration mismatch. This fix adds the theme class (e.g., 'theme-hyperdx') to the HTML element in _document.tsx, ensuring CSS variables are correctly applied from the first render. Co-authored-by: Cursor <cursoragent@cursor.com>
Replaced Mantine's default button styles with custom theme variables for primary buttons. This change enhances consistency in button styling across the application by utilizing defined color tokens for background, hover, and text colors.
…alette Replaced existing primary button color variables with Mantine's green light colors for background, hover, and text. This change ensures a more cohesive design by aligning button styles with the overall theme.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 3b7f9e0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
PR Review✅ No critical issues found. The changes correctly:
The implementation follows Mantine v7 best practices and HyperDX theme architecture patterns. |
Contributor
E2E Test Results✅ All tests passed • 63 passed • 4 skipped • 802s
Tests ran across 4 shards in parallel. |
knudtty
approved these changes
Feb 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
1. Primary Button CSS Variables (
_tokens.scss)Updated primary button variables to use Mantine's green-light colors (properly defined) instead of undefined references:
--color-primary-button-bg: var(--mantine-color-green-light)--color-primary-button-bg-hover: var(--mantine-color-green-light-hover)--color-primary-button-text: var(--mantine-color-green-light-color)Added to both dark mode and light mode mixins.
2. SSR Hydration Fix (
_document.tsx)Added theme class (e.g.,
theme-hyperdx) to the HTML element during server-side rendering. Previously, the theme class was only applied client-side viauseEffect, which could cause a hydration mismatch where CSS variables weren't available on first render.Test Plan
NEXT_PUBLIC_THEME=hyperdxexplicitly set