fix:implement dark mode in experiment correctly#20974
fix:implement dark mode in experiment correctly#20974daniellok-db merged 3 commits intomlflow:masterfrom
Conversation
🛠 DevTools 🛠
Install mlflow from this PRFor Databricks, use the following command: |
|
@intelliking Thank you for the contribution! Could you fix the following issue(s)? ⚠ DCO checkThe DCO check failed. Please sign off your commit(s) by following the instructions here. See https://github.com/mlflow/mlflow/blob/master/CONTRIBUTING.md#sign-your-work for more details. |
Signed-off-by: intelliking <tyleradams93226@gmail.com>
977a231 to
eee4278
Compare
|
Hi @harupy , @TomeHirata , Could you please review this PR and share any feedback? thank you. |
There was a problem hiding this comment.
Pull request overview
This PR fixes the dark mode theming for the ReactMde editor component used in the experiment "Add description" modal. Previously, only the toolbar icon colors were themed, leaving other UI elements (toolbar background, tab buttons, textarea, preview pane, and container border) in their default light-mode appearance.
Changes:
- Created a reusable
ThemeAwareReactMdewrapper component that conditionally applies dark mode styling through CSS classes and custom properties - Added comprehensive dark mode CSS overrides for all ReactMde UI elements
- Replaced direct ReactMde usage with the new ThemeAwareReactMde wrapper in both EditableNote.tsx and ExperimentViewDescriptionNotes.tsx
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| EditableNote.tsx | Added ThemeAwareReactMde wrapper component that injects design system theme tokens as CSS variables and applies dark mode class; updated EditableNoteImpl to use the new wrapper |
| EditableNote.css | Added dark mode CSS overrides for ReactMde container, toolbar, tab buttons, textarea, preview pane, and image drop area using CSS custom properties |
| ExperimentViewDescriptionNotes.tsx | Replaced inline ReactMde with ThemeAwareReactMde wrapper, improved type safety by removing undefined from selectedTab type, added null coalescing for value prop |
|
Hi @TomeHirata thank you for taking a look. Could you approve this now? |
daniellok-db
left a comment
There was a problem hiding this comment.
looks great, thanks
|
Documentation preview for 0482f5c is available at: More info
|
Signed-off-by: intelliking <tyleradams93226@gmail.com> Signed-off-by: Daniel Lok <daniel.lok@databricks.com> Co-authored-by: Daniel Lok <daniel.lok@databricks.com>
Signed-off-by: intelliking <tyleradams93226@gmail.com> Signed-off-by: Daniel Lok <daniel.lok@databricks.com> Co-authored-by: Daniel Lok <daniel.lok@databricks.com>
Related Issues/PRs
Closes #20874
What changes are proposed in this pull request?
Fix the "Add description" modal rich text editor (ReactMde) to fully respect dark mode theme. Previously, only toolbar icon colors were themed; the toolbar background, tab buttons, textarea, preview pane, and container border all retained their light-mode defaults.
Changes:
EditableNote.tsx: Created and exported aThemeAwareReactMdewrapper component that conditionally applies amlflow-dark-themeCSS class and injects design system theme tokens as CSS custom properties.EditableNote.css: Added dark mode overrides for all ReactMde areas — container border, toolbar header, tab buttons, toolbar icon buttons, textarea, preview pane, and image drop tip area.ExperimentViewDescriptionNotes.tsx: Replaced inlineReactMdeusage with the sharedThemeAwareReactMdewrapper, removing duplicated theme logic.How is this PR tested?
Manual testing steps:
yarn start)Does this PR require documentation update?
Does this PR require updating the MLflow Skills repository?
Release Notes
Is this a user-facing change?
Fix the experiment "Add description" modal editor to fully respect dark mode theme, including toolbar, textarea, and preview pane styling.
What component(s), interfaces, languages, and integrations does this PR affect?
Components
area/tracking: Tracking Service, tracking client APIs, autologgingarea/models: MLmodel format, model serialization/deserialization, flavorsarea/model-registry: Model Registry service, APIs, and the fluent client calls for Model Registryarea/scoring: MLflow Model server, model deployment tools, Spark UDFsarea/evaluation: MLflow model evaluation features, evaluation metrics, and evaluation workflowsarea/gateway: MLflow AI Gateway client APIs, server, and third-party integrationsarea/prompts: MLflow prompt engineering features, prompt templates, and prompt managementarea/tracing: MLflow Tracing features, tracing APIs, and LLM tracing functionalityarea/projects: MLproject format, project running backendsarea/uiux: Front-end, user experience, plotting, JavaScript, JavaScript dev serverarea/build: Build and test infrastructure for MLflowarea/docs: MLflow documentation pagesHow should the PR be classified in the release notes? Choose one:
rn/none- No description will be included. The PR will be mentioned only by the PR number in the "Small Bugfixes and Documentation Updates" sectionrn/breaking-change- The PR will be mentioned in the "Breaking Changes" sectionrn/feature- A new user-facing feature worth mentioning in the release notesrn/bug-fix- A user-facing bug fix worth mentioning in the release notesrn/documentation- A user-facing documentation change worth mentioning in the release notesShould this PR be included in the next patch release?