Skip to content

fix: dark theme styling issues#1418

Open
IceeAn wants to merge 2 commits into
sysadminsmedia:mainfrom
IceeAn:fix/dark-theme-font-color
Open

fix: dark theme styling issues#1418
IceeAn wants to merge 2 commits into
sysadminsmedia:mainfrom
IceeAn:fix/dark-theme-font-color

Conversation

@IceeAn
Copy link
Copy Markdown
Contributor

@IceeAn IceeAn commented Apr 7, 2026

What type of PR is this?

  • bug

What this PR does / why we need it:

This PR fixes dark theme styling issues in Markdown content and several frontend components.

  • frontend/tailwind.config.js: Adds Tailwind Typography prose color variables for Markdown rendering.
  • frontend/components/WipeInventoryDialog.vue: Uses the existing <Checkbox> component instead of native checkbox inputs to unify UI styles and avoid hardcoded gray colors.
  • frontend/components/WipeInventoryDialog.vue, frontend/components/Base/Card.vue, frontend/components/Form/MarkdownEditor.vue, and frontend/components/Item/AttachmentsList.vue: Replaces the hardcoded colors with the theme-aware colors and their opacity variants.

Which issue(s) this PR fixes:

Fixes #1270

Summary by CodeRabbit

  • Style
    • Updated text colors and opacity across components for improved visual consistency with the application theme.
    • Enhanced typography styling configuration for better control over prose element styling.
    • Replaced custom checkboxes with the shared Checkbox UI component for consistent styling throughout the application.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 7, 2026

Walkthrough

This PR updates text styling across multiple Vue components to use theme-aware colors (text-foreground with varying opacity) instead of hardcoded gray values, and extends the Tailwind typography configuration with explicit CSS custom properties for improved dark theme support in markdown rendering.

Changes

Cohort / File(s) Summary
Theme-Aware Text Color Updates
frontend/components/Base/Card.vue, frontend/components/Form/MarkdownEditor.vue, frontend/components/Item/AttachmentsList.vue, frontend/components/Maintenance/ListView.vue
Replaced hardcoded gray color classes with theme-aware text-foreground variants (opacity 50–100%) to adapt text colors based on active theme, improving readability in dark mode.
UI Component Modernization
frontend/components/WipeInventoryDialog.vue
Replaced three native <input type="checkbox"> elements with shared Checkbox UI component while preserving model bindings; updated note paragraph styling from text-gray-600 to text-foreground/90; added Checkbox import from @/components/ui/checkbox.
Typography Prose Configuration
frontend/tailwind.config.js
Added explicit --tw-prose-* CSS custom property mappings for typography elements (headings, bold, counters, bullets, quotes, code, table borders, etc.) to enable theme-aware prose styling in Tailwind's typography plugin.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested labels

🕷️ bug

Suggested reviewers

  • tankerkiller125
  • tonyaellie
  • katosdev

Security Recommendations

  • Checkbox Component: Verify that the imported Checkbox component from @/components/ui/checkbox properly sanitizes any bound values and doesn't introduce XSS vulnerabilities, especially since it's being used in a dialog that may handle user input.
  • Tailwind Config: The added CSS custom properties in tailwind.config.js are purely styling-related and pose no security risk, but ensure they are applied consistently across all prose contexts.

Poem

🎨 Dark themes now shine with colors bright,
Prose and text adapt to light,
Checkboxes unified in gleaming rows,
Where every element seamlessly glows! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: dark theme styling issues' is directly related to the changeset, which addresses dark theme color/styling problems across multiple components and Tailwind configuration.
Description check ✅ Passed The PR description includes all required sections: PR type (bug), explanation of changes with file-by-file breakdown, and linked issue (#1270). The description is complete and well-structured.
Linked Issues check ✅ Passed The PR fully addresses issue #1270 by replacing hardcoded gray colors with theme-aware variants and adding Tailwind prose color variables for proper Markdown rendering in dark themes.
Out of Scope Changes check ✅ Passed All changes are scoped to fixing dark theme styling: color replacements in components, Tailwind config updates, and checkbox component consolidation. No unrelated functionality was introduced.
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.

@coderabbitai coderabbitai Bot added the 🕷️ bug Something isn't working label Apr 7, 2026
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.

🧹 Nitpick comments (2)
frontend/components/Form/MarkdownEditor.vue (1)

70-71: Associate the preview label with the checkbox control.

Line 70 renders a <label> without for, and Line 71 renders <Checkbox> without id, so the label is not explicitly bound to the control.

♿ Suggested fix
-  const id = useId();
+  const id = useId();
+  const previewId = `${id}-preview`;
-        <label class="text-xs text-foreground/70">{{ $t("global.preview") }}</label>
-        <Checkbox v-model="showPreview" />
+        <label :for="previewId" class="text-xs text-foreground/70">{{ $t("global.preview") }}</label>
+        <Checkbox :id="previewId" v-model="showPreview" />
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@frontend/components/Form/MarkdownEditor.vue` around lines 70 - 71, The label
is not associated with the Checkbox control; add an id to the Checkbox and set
the label's for attribute to that same id so clicking the label toggles the
control. Create a stable identifier (e.g., previewCheckboxId) in the component
setup/props and bind it to the Checkbox id prop and the label's for attribute
while keeping the existing v-model="showPreview" and the Checkbox component
name.
frontend/components/WipeInventoryDialog.vue (1)

13-27: Consider using the shared Label component with these new checkboxes.

Now that Line 13, Line 20, and Line 27 use Checkbox, replacing native <label> tags with Label from @/components/ui/label would keep form controls fully aligned with the design system.

🧩 Suggested consistency refactor
   import { Button } from "@/components/ui/button";
   import { Checkbox } from "@/components/ui/checkbox";
+  import { Label } from "@/components/ui/label";
-          <label for="wipe-tags-checkbox" class="cursor-pointer text-sm font-medium">
+          <Label for="wipe-tags-checkbox" class="cursor-pointer text-sm font-medium">
             {{ $t("tools.actions_set.wipe_inventory_tags") }}
-          </label>
+          </Label>
-          <label for="wipe-locations-checkbox" class="cursor-pointer text-sm font-medium">
+          <Label for="wipe-locations-checkbox" class="cursor-pointer text-sm font-medium">
             {{ $t("tools.actions_set.wipe_inventory_locations") }}
-          </label>
+          </Label>
-          <label for="wipe-maintenance-checkbox" class="cursor-pointer text-sm font-medium">
+          <Label for="wipe-maintenance-checkbox" class="cursor-pointer text-sm font-medium">
             {{ $t("tools.actions_set.wipe_inventory_maintenance") }}
-          </label>
+          </Label>
As per coding guidelines, "Use Shadcn-vue UI components from `components/ui/` for consistent design system".

Also applies to: 63-63

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

In `@frontend/components/WipeInventoryDialog.vue` around lines 13 - 27, The native
<label> elements used alongside the Checkbox controls (ids: wipe-tags-checkbox,
wipe-locations-checkbox, wipe-maintenance-checkbox) should be replaced with the
shared Label component from "@/components/ui/label" to match the design system;
import Label in WipeInventoryDialog.vue, swap each native label for the Label
component and pass the same for/id and text (use the same translation keys like
$t("tools.actions_set.wipe_inventory_tags") etc.) so styling and accessibility
remain equivalent.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@frontend/components/Form/MarkdownEditor.vue`:
- Around line 70-71: The label is not associated with the Checkbox control; add
an id to the Checkbox and set the label's for attribute to that same id so
clicking the label toggles the control. Create a stable identifier (e.g.,
previewCheckboxId) in the component setup/props and bind it to the Checkbox id
prop and the label's for attribute while keeping the existing
v-model="showPreview" and the Checkbox component name.

In `@frontend/components/WipeInventoryDialog.vue`:
- Around line 13-27: The native <label> elements used alongside the Checkbox
controls (ids: wipe-tags-checkbox, wipe-locations-checkbox,
wipe-maintenance-checkbox) should be replaced with the shared Label component
from "@/components/ui/label" to match the design system; import Label in
WipeInventoryDialog.vue, swap each native label for the Label component and pass
the same for/id and text (use the same translation keys like
$t("tools.actions_set.wipe_inventory_tags") etc.) so styling and accessibility
remain equivalent.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 62e1f1e1-5af6-4c61-ad20-450ef86fa5a9

📥 Commits

Reviewing files that changed from the base of the PR and between e4c5203 and afbcf42.

📒 Files selected for processing (6)
  • frontend/components/Base/Card.vue
  • frontend/components/Form/MarkdownEditor.vue
  • frontend/components/Item/AttachmentsList.vue
  • frontend/components/Maintenance/ListView.vue
  • frontend/components/WipeInventoryDialog.vue
  • frontend/tailwind.config.js

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

Labels

🕷️ bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Some markdown rendered as dark font in dark themes. Should be light font.

1 participant