-
Notifications
You must be signed in to change notification settings - Fork 2.9k
fix: FIT-66: Chatbot Model Assessment template is not optimized for dark mode #7589
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: FIT-66: Chatbot Model Assessment template is not optimized for dark mode #7589
Conversation
…ssment template to Dark mode.
✅ Deploy Preview for heartex-docs canceled.
|
✅ Deploy Preview for label-studio-docs-new-theme canceled.
|
✅ Deploy Preview for label-studio-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors styling in the Chatbot Model Assessment template to use CSS variables for consistent dark-mode support across components.
- Replaced hardcoded paddings, colors, borders, and shadows in
config.yml
with CSS variables - Added custom Ant Design radio button overrides in
Choice.scss
to be theme-aware
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
web/libs/editor/src/tags/control/Choice/Choice.scss | Introduce CSS-variable–based styling for Ant Design radios and hover/focus/checked states |
label_studio/annotation_templates/generative-ai/chatbot-assessment/config.yml | Swap hardcoded container styles for CSS variables to ensure dark-mode consistency |
Comments suppressed due to low confidence (1)
label_studio/annotation_templates/generative-ai/chatbot-assessment/config.yml:34
- The
.assessment-item
block removed its background, border-radius, and box-shadow, so items may no longer be visually separated. Reintroduce these using CSS variables (e.g.,background-color: var(--color-neutral-surface); border-radius: var(--corner-radius-small); box-shadow: 0 2px 4px var(--color-neutral-shadow);
).
padding: 1px;
Codecov ReportAll modified and coverable lines are covered by tests ✅
|
Flag | Coverage Δ | |
---|---|---|
pytests | 77.76% <ø> (-0.05%) |
⬇️ |
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.
🚀 New features to boost your workflow:
- 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
Reason for change
The Chatbot Model Assessment template preview was not optimized for Dark mode, leading to a poor user experience.
This PR addresses the issue by refactoring the styling of the template to utilize CSS variables, ensuring proper theme consistency and maintainability across different modes. Specifically, hardcoded CSS values have been replaced with variables for padding, colors, border-radius, box-shadow, and gap within
config.yml
.Additionally, custom styling for Ant Design radio buttons has been introduced in
Choice.scss
to ensure they are also theme-aware and consistent with the application's design system in both light and dark modes.Screenshots
Before:


After:


Rollout strategy
This change will be rolled out as part of a standard deployment. No feature flags or environment variables are required.
Testing
The following steps were performed to verify the fix:
Risks
No significant risks are anticipated with this change. The refactoring primarily involves styling adjustments and does not alter core functionality.
Reviewer notes
Please review the changes in
config.yml
andChoice.scss
to ensure that the CSS variable usage is consistent and correctly applied across the components.General notes
The overall goal of these changes is to unify and modernize the styling by leveraging CSS variables, making the UI components more consistent and theme-friendly, and improving maintainability.