Skip to content

fix: update explorer subtitle text color for theme support#1281

Merged
VaiTon merged 1 commit intoopenfoodfacts:mainfrom
omarKenawi:fix-explorer-subtitle-theme
Apr 2, 2026
Merged

fix: update explorer subtitle text color for theme support#1281
VaiTon merged 1 commit intoopenfoodfacts:mainfrom
omarKenawi:fix-explorer-subtitle-theme

Conversation

@omarKenawi
Copy link
Copy Markdown
Contributor

@omarKenawi omarKenawi commented Apr 1, 2026

Summary

This PR addresses issue #1280.

What I changed

  • Updated the Explorer subtitle text color to use text-primary.
  • Ensured consistent visibility across light and dark themes.
  • Removed hardcoded colors to follow the DaisyUI theme system.

Screenshots

Open Food Facts Explorer - Profile 1 - Microsoft​ Edge 4_1_2026 4_10_22 AM

fixes: #1280.

Summary by CodeRabbit

  • Style
    • Updated subtitle styling on the Explore page for improved visual appearance.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 1, 2026

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

Project Deployment Actions Updated (UTC)
explorer Ready Ready Preview, Comment Apr 1, 2026 2:34am

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 1, 2026

📝 Walkthrough

Walkthrough

The Explorer page subtitle styling was updated by changing its CSS class from text-secondary-content to text-primary. This single-line modification addresses visibility and contrast issues across different themes without altering the page's structure or functionality.

Changes

Cohort / File(s) Summary
Theme Color Enhancement
src/routes/explore/+page.svelte
Updated subtitle CSS class from text-secondary-content to text-primary for improved theme-aware contrast and readability.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A tiny hop, a color's shift,
The subtitle glows with themed gift,
No more hiding in the dark or light,
Explorer's text now reads just right! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: updating the Explorer subtitle text color to support different themes, which matches the single-line CSS class modification.
Description check ✅ Passed The PR description covers the key sections: summary of changes, what was changed, and includes relevant screenshots. However, it lacks the formal checklist items from the template.
Linked Issues check ✅ Passed The PR successfully addresses issue #1280 by changing the subtitle class from text-secondary-content to text-primary, ensuring consistent visibility across light and dark themes as required.
Out of Scope Changes check ✅ Passed All changes are directly related to the linked issue #1280. The single CSS class modification to the subtitle styling is within scope and addresses the theme adaptation problem.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@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.

🧹 Nitpick comments (1)
src/routes/explore/+page.svelte (1)

22-22: Fix for contrast is correct, but inconsistent with subtitle styling elsewhere in the codebase.

The change from text-secondary-content to text-primary correctly addresses issue #1280. text-secondary-content was semantically incorrect for text on a bg-base-100 background, and the theme configuration confirms excellent contrast in both light and dark modes (dark brown #201a17 on light cream #faf7f5, and vice versa).

However, the explore page's subtitle styling differs from the pattern used consistently across other pages:

  • Landing page (+page.svelte): uses text-base-content/80
  • Folksonomy page: uses text-base font-normal opacity-70
  • Preferences form: uses text-base-content/70

For consistency with the existing design system, consider aligning the explore subtitle with this established muted-text pattern:

Suggested alignment with codebase pattern
-	<p class="text-primary mb-6 max-w-2xl text-center text-lg">
+	<p class="text-base-content/80 mb-6 max-w-2xl text-center text-lg">
 		{$_('explore.subtitle')}
 	</p>

This maintains visual hierarchy (heading in primary, subtitle muted) and aligns with the rest of the codebase.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/routes/explore/`+page.svelte at line 22, Replace the explore page
subtitle's class on the <p class="text-primary mb-6 max-w-2xl text-center
text-lg"> element: swap text-primary for the project’s muted-text utility (e.g.,
text-base-content/80 to match the landing page pattern or text-base-content/70
if you prefer the slightly stronger muted tone used elsewhere) so the subtitle
follows the established design system while keeping the heading as text-primary;
update the class string accordingly and verify visual contrast in both themes.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/routes/explore/`+page.svelte:
- Line 22: Replace the explore page subtitle's class on the <p
class="text-primary mb-6 max-w-2xl text-center text-lg"> element: swap
text-primary for the project’s muted-text utility (e.g., text-base-content/80 to
match the landing page pattern or text-base-content/70 if you prefer the
slightly stronger muted tone used elsewhere) so the subtitle follows the
established design system while keeping the heading as text-primary; update the
class string accordingly and verify visual contrast in both themes.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0aa16914-3ed9-4795-8ccc-0ff5bda41f9d

📥 Commits

Reviewing files that changed from the base of the PR and between a5b0f82 and b4464bf.

📒 Files selected for processing (1)
  • src/routes/explore/+page.svelte

@VaiTon VaiTon merged commit 4551c12 into openfoodfacts:main Apr 2, 2026
11 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in OFF Explorer - Primetime ! Apr 2, 2026
@VaiTon
Copy link
Copy Markdown
Member

VaiTon commented Apr 2, 2026

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants