fix: dark theme styling issues#1418
Conversation
WalkthroughThis PR updates text styling across multiple Vue components to use theme-aware colors ( Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Security Recommendations
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
frontend/components/Form/MarkdownEditor.vue (1)
70-71: Associate the preview label with the checkbox control.Line 70 renders a
<label>withoutfor, and Line 71 renders<Checkbox>withoutid, 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 sharedLabelcomponent with these new checkboxes.Now that Line 13, Line 20, and Line 27 use
Checkbox, replacing native<label>tags withLabelfrom@/components/ui/labelwould keep form controls fully aligned with the design system.As per coding guidelines, "Use Shadcn-vue UI components from `components/ui/` for consistent 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>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
📒 Files selected for processing (6)
frontend/components/Base/Card.vuefrontend/components/Form/MarkdownEditor.vuefrontend/components/Item/AttachmentsList.vuefrontend/components/Maintenance/ListView.vuefrontend/components/WipeInventoryDialog.vuefrontend/tailwind.config.js
What type of PR is this?
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, andfrontend/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