Skip to content

style: update dashboard UI and fix canonical Tailwind v4 classes#277

Merged
ViktorSvertoka merged 2 commits into
developfrom
fix/ui-text-and-dashboard
Feb 5, 2026
Merged

style: update dashboard UI and fix canonical Tailwind v4 classes#277
ViktorSvertoka merged 2 commits into
developfrom
fix/ui-text-and-dashboard

Conversation

@TiZorii
Copy link
Copy Markdown
Collaborator

@TiZorii TiZorii commented Feb 5, 2026

  • Replace dashboard background with DynamicGridBackground
  • Fix suggestCanonicalClasses warnings across multiple components

Summary by CodeRabbit

  • Style

    • Redesigned dashboard with a cleaner, minimalist layout, streamlined header, and responsive grid background
    • Updated color tokens, spacing, and button styles across ProfileCard, StatsCard, and banners for consistent light/dark theming
    • Modernized 404 page and various UI controls to tokenized styling
  • Documentation

    • Refined English, Polish, and Ukrainian UI text and punctuation for clarity
    • Added product max-stock localization strings

  - Replace dashboard background with DynamicGridBackground
  - Fix suggestCanonicalClasses warnings across multiple components
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Feb 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
devlovers-net Ready Ready Preview, Comment Feb 5, 2026 3:09pm

@netlify
Copy link
Copy Markdown

netlify Bot commented Feb 5, 2026

Deploy Preview for develop-devlovers ready!

Name Link
🔨 Latest commit ffb9d68
🔍 Latest deploy log https://app.netlify.com/projects/develop-devlovers/deploys/6984b249435e4f00087dc1eb
😎 Deploy Preview https://deploy-preview-277--develop-devlovers.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 5, 2026

📝 Walkthrough

Walkthrough

Replaced decorative dashboard background with DynamicGridBackground and simplified page layout; migrated dashboard, stats, and banner components to neutral color tokens and accent variables; updated Q&A and shared components to use parenthesized CSS variable token syntax; normalized translations across en/pl/uk (punctuation and minor phrasing).

Changes

Cohort / File(s) Summary
Dashboard Page
frontend/app/[locale]/dashboard/page.tsx
Replaced decorative layered background with DynamicGridBackground, simplified outer container and header, added support link using updated outline styles, and reorganized banner/profile/stats into a streamlined layout.
Dashboard Components
frontend/components/dashboard/ProfileCard.tsx, frontend/components/dashboard/StatsCard.tsx, frontend/components/dashboard/QuizSavedBanner.tsx
Migrated Tailwind classes to neutral gray tokens and CSS variable-based accents; adjusted borders, blurs, typography, hover states, and avatar/gradient usages without changing component APIs.
Q&A & Floating UI
frontend/components/q&a/AIWordHelper.tsx, frontend/components/q&a/FloatingExplainButton.tsx
Replaced bracketed CSS var syntax and gradient utilities with parenthesized token forms (e.g., bg-(--accent-primary)), updated hover/focus/loader color refs and minor spacing rule syntax.
Shared Components & Error Page
frontend/components/shared/LanguageSwitcher.tsx, frontend/app/not-found.tsx
Converted bracketed var usages to tokenized forms, adjusted z-index and hover/active token classes, and swapped some explicit size/gradient utilities for token equivalents.
Localization Files
frontend/messages/en.json, frontend/messages/pl.json, frontend/messages/uk.json
Normalized punctuation and phrasing (removed trailing periods), adjusted several CTA and descriptive strings, introduced maxStock placeholders, and changed sort labels to arrow notation.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

UI, refactor

Suggested reviewers

  • AM1007
  • ViktorSvertoka

Poem

🐰 New tokens hop, the grid unfolds,
Soft grays replace the rainbow holds,
Buttons gleam with tidy lines,
Translations trimmed to fit like vines,
I nibble bugs and polish gold.

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: updating dashboard UI styling and fixing Tailwind v4 class syntax issues across multiple components.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/ui-text-and-dashboard

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 Fix all issues with AI agents
In `@frontend/app/not-found.tsx`:
- Around line 29-31: The decorative divs use custom utilities (w-xl, h-88, w-88,
h-104, w-104) that are not defined — update your Tailwind/theme setup in
frontend/app/globals.css by adding the missing size tokens (e.g. --spacing-xl,
--spacing-88, --spacing-104) inside the `@theme` block and ensure your Tailwind
theme/spacing extension maps those tokens to concrete values (or add matching
spacing keys like xl, 88, 104 in the Tailwind config) so the width/height
utilities referenced by w-xl, h-88, w-88, h-104 and w-104 are generated and
usable.

In `@frontend/components/q`&a/AIWordHelper.tsx:
- Line 773: The Tailwind class `**:my-2` in the div inside AIWordHelper.tsx is
invalid and does nothing; replace it with the intended child-selector variant
like `[&>*]:my-2` so direct children receive vertical margins. Locate the div
with className "leading-relaxed whitespace-pre-wrap text-gray-800 **:my-2
dark:text-gray-200" in the AIWordHelper component and change `**:my-2` to
`[&>*]:my-2` (preserving other classes and the dark variant).

In `@frontend/components/shared/LanguageSwitcher.tsx`:
- Line 72: The dropdown div in LanguageSwitcher.tsx uses a non-existent Tailwind
class `z-60`; replace it with a valid class like `z-50` (or remove it) or add a
custom z-index entry to your Tailwind config. Locate the element rendering the
dropdown (the div with className containing "absolute right-0 ... z-60 ...") and
either change `z-60` to `z-50` for proper stacking or update tailwind.config.js
to define a `60` zIndex key if you need that exact value.

In `@frontend/messages/en.json`:
- Around line 52-56: Update the two message strings with incorrect
capitalization: in the messages object entries "1" and "5" (currently "No
pressure, Just start" and "You clicked, That counts"), change "Just" to "just"
and "That" to "that" so commas are followed by lowercase words.
🧹 Nitpick comments (2)
frontend/components/dashboard/StatsCard.tsx (2)

20-25: Inconsistent CSS variable syntax with other components.

This file uses the bracket arbitrary value syntax [var(--accent-primary)] while other components in this PR (ProfileCard, page.tsx) use the Tailwind v4 canonical parentheses syntax (--accent-primary). Since the PR objective is to fix suggestCanonicalClasses warnings, this should be updated for consistency.

♻️ Proposed fix to use canonical Tailwind v4 syntax
   const cardStyles = `
     relative overflow-hidden rounded-2xl
     border border-gray-100 dark:border-white/5
     bg-white/60 dark:bg-neutral-900/60 backdrop-blur-xl
-    p-8 transition-all hover:border-[var(--accent-primary)]/30 dark:hover:border-[var(--accent-primary)]/30
+    p-8 transition-all hover:border-(--accent-primary)/30 dark:hover:border-(--accent-primary)/30
     flex flex-col items-center justify-center text-center
   `;

28-33: Same inconsistency in button styles.

The primaryBtnStyles also uses bracket syntax for CSS variables, which should be updated to the canonical form.

♻️ Proposed fix
   const primaryBtnStyles = `
     group relative inline-flex items-center justify-center rounded-full
     px-8 py-3 text-sm font-semibold tracking-widest uppercase text-white
-    bg-[var(--accent-primary)] hover:bg-[var(--accent-hover)]
+    bg-(--accent-primary) hover:bg-(--accent-hover)
     transition-all hover:scale-105
   `;

Comment on lines +29 to +31
<div className="absolute -top-32 left-1/2 h-96 w-xl -translate-x-1/2 rounded-full bg-(--accent-primary)/20 blur-3xl" />
<div className="absolute -bottom-48 left-1/4 h-88 w-88 rounded-full bg-(--accent-hover)/15 blur-3xl" />
<div className="absolute -bottom-40 right-0 h-104 w-104 rounded-full bg-(--accent-primary)/25 blur-3xl" />
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# Find Tailwind configuration files
fd -E node_modules -type f -name 'tailwind.config.*' -o -name 'tailwind.js'

Repository: DevLoversTeam/devlovers.net

Length of output: 241


🏁 Script executed:

# Check for common config locations and list the repository root
git ls-files | head -30

Repository: DevLoversTeam/devlovers.net

Length of output: 913


🏁 Script executed:

# Look for postcss or other config files that might define Tailwind extensions
fd -E node_modules -type f \( -name 'postcss.config.*' -o -name 'tsconfig.json' -o -name 'next.config.*' \)

Repository: DevLoversTeam/devlovers.net

Length of output: 241


🏁 Script executed:

# Find tailwind config files
find . -name "tailwind.config.*" -o -name "tailwind.js" 2>/dev/null

Repository: DevLoversTeam/devlovers.net

Length of output: 53


🏁 Script executed:

# Check the frontend directory structure
ls -la frontend/ | grep -E "config|tailwind"

Repository: DevLoversTeam/devlovers.net

Length of output: 483


🏁 Script executed:

# Also check for CSS files that might define these tokens
find frontend -name "*.css" -o -name "globals.css" 2>/dev/null | head -20

Repository: DevLoversTeam/devlovers.net

Length of output: 95


🏁 Script executed:

# Check postcss config
cat frontend/postcss.config.mjs

Repository: DevLoversTeam/devlovers.net

Length of output: 164


🏁 Script executed:

# Check globals CSS file
cat frontend/app/globals.css

Repository: DevLoversTeam/devlovers.net

Length of output: 12494


🏁 Script executed:

# Search for tailwind configuration in all files
rg "tailwindConfig|theme.*extend" frontend/ -A 5 -B 2

Repository: DevLoversTeam/devlovers.net

Length of output: 53


🏁 Script executed:

# Also search for these specific size definitions
rg "w-xl|h-88|h-104|w-104" frontend/ --type ts --type tsx --type css

Repository: DevLoversTeam/devlovers.net

Length of output: 98


🏁 Script executed:

# Read the not-found.tsx file to see the actual code
cat -n frontend/app/not-found.tsx

Repository: DevLoversTeam/devlovers.net

Length of output: 3959


🏁 Script executed:

# Search for custom size definitions in CSS or config files
rg "w-xl|h-88|w-88|h-104|w-104|spacing|width|height" frontend/app/globals.css

Repository: DevLoversTeam/devlovers.net

Length of output: 141


🏁 Script executed:

# Search across entire frontend for these custom classes
rg "w-xl|h-88|w-88|h-104|w-104" frontend/ -t css

Repository: DevLoversTeam/devlovers.net

Length of output: 53


🏁 Script executed:

# Search for any other file that might define these custom sizing tokens
rg "@theme|extend.*spacing|extend.*width|extend.*height" frontend/ -A 10

Repository: DevLoversTeam/devlovers.net

Length of output: 1328


🏁 Script executed:

# Check if there are any CSS module files that might define these
find frontend -name "*.module.css" -o -name "*.module.scss" 2>/dev/null

Repository: DevLoversTeam/devlovers.net

Length of output: 53


🏁 Script executed:

# Verify these are not standard Tailwind v4 defaults by checking what h-96 maps to
rg "h-96|w-80" frontend/app/globals.css

Repository: DevLoversTeam/devlovers.net

Length of output: 53


Add missing custom size tokens to Tailwind configuration.

The custom size utilities used in the decorative elements—w-xl, h-88, w-88, h-104, w-104—are not defined in the Tailwind v4 theme configuration in frontend/app/globals.css. These classes will not be generated, causing the blur divs to fail to render with intended dimensions.

Add these spacing definitions to the @theme block in frontend/app/globals.css:

--spacing-xl: /* define appropriate size */
--spacing-88: /* define appropriate size */
--spacing-104: /* define appropriate size */

Alternatively, if using custom names, ensure they map correctly to width/height utilities in the Tailwind configuration.

🤖 Prompt for AI Agents
In `@frontend/app/not-found.tsx` around lines 29 - 31, The decorative divs use
custom utilities (w-xl, h-88, w-88, h-104, w-104) that are not defined — update
your Tailwind/theme setup in frontend/app/globals.css by adding the missing size
tokens (e.g. --spacing-xl, --spacing-88, --spacing-104) inside the `@theme` block
and ensure your Tailwind theme/spacing extension maps those tokens to concrete
values (or add matching spacing keys like xl, 88, 104 in the Tailwind config) so
the width/height utilities referenced by w-xl, h-88, w-88, h-104 and w-104 are
generated and usable.

{explanation && !isLoading && !error && (
<div className="prose prose-sm dark:prose-invert max-w-none">
<div className="leading-relaxed whitespace-pre-wrap text-gray-800 dark:text-gray-200 [&>*]:my-2">
<div className="leading-relaxed whitespace-pre-wrap text-gray-800 **:my-2 dark:text-gray-200">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Invalid Tailwind selector **:my-2 will not apply styles.

The **:my-2 syntax is not a valid Tailwind variant. Based on the AI summary, this appears to be replacing [&>*]:my-2 which targets direct children. The ** prefix has no meaning in Tailwind and will be ignored, causing the vertical margin on child elements to not be applied.

🔧 Proposed fix
-                  <div className="leading-relaxed whitespace-pre-wrap text-gray-800 **:my-2 dark:text-gray-200">
+                  <div className="leading-relaxed whitespace-pre-wrap text-gray-800 [&>*]:my-2 dark:text-gray-200">
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<div className="leading-relaxed whitespace-pre-wrap text-gray-800 **:my-2 dark:text-gray-200">
<div className="leading-relaxed whitespace-pre-wrap text-gray-800 [&>*]:my-2 dark:text-gray-200">
🤖 Prompt for AI Agents
In `@frontend/components/q`&a/AIWordHelper.tsx at line 773, The Tailwind class
`**:my-2` in the div inside AIWordHelper.tsx is invalid and does nothing;
replace it with the intended child-selector variant like `[&>*]:my-2` so direct
children receive vertical margins. Locate the div with className
"leading-relaxed whitespace-pre-wrap text-gray-800 **:my-2 dark:text-gray-200"
in the AIWordHelper component and change `**:my-2` to `[&>*]:my-2` (preserving
other classes and the dark variant).

Comment thread frontend/components/shared/LanguageSwitcher.tsx Outdated
Comment thread frontend/messages/en.json Outdated
  Changes:
  - LanguageSwitcher.tsx: Replace z-60 with valid z-50
  - en.json: Fix capitalization after commas
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