Update hpo and explainers plots#468
Merged
cristian-tamblay merged 3 commits intodevelopfrom Mar 9, 2026
Merged
Conversation
…ve responsiveness
…istency in hyperparameters plots and explainers
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a shared Plotly theming utility to align Plotly charts with the current MUI theme, and applies it across results/hyperparameter and explainer plot components while adjusting layout/styling for better UI consistency.
Changes:
- Added
applyThemeToLayoututility to theme Plotly layouts using the active MUI theme and remove backend-fixed sizing. - Updated hyperparameter and explainer plot components to apply the themed layout and adjust Plotly sizing/config.
- Tweaked explainer grid/card layout so plot sections/cards stretch to fill available width.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| DashAI/front/src/utils/plotlyTheme.js | New utility to apply MUI theme values to Plotly layout (including updatemenus/polar handling). |
| DashAI/front/src/pages/results/components/ResultsTabHyperparameters.jsx | Uses the theme + applyThemeToLayout for hyperparameter plots; adds loading state. |
| DashAI/front/src/components/models/HyperparameterPlots.jsx | Applies themed layouts and makes plots more responsive via width/height handling. |
| DashAI/front/src/components/explainers/ExplanainersCard.jsx | Adjusts card/container widths to better fill available space. |
| DashAI/front/src/components/explainers/ExplainersPlot.jsx | Applies themed layout to explainer plots and changes Plotly config/layout sizing. |
| DashAI/front/src/components/explainers/ExplainersGrid.jsx | Changes grid alignment to stretch cards vertically. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… plots in ResultsTab
cristian-tamblay
approved these changes
Mar 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request focuses on improving the visual consistency of Plotly plots across the application by introducing a utility to apply the current MUI theme to all Plotly layouts. It also makes several layout and styling adjustments to ensure better responsiveness and alignment in the UI components that display plots and explainers.
Thematic Plot Styling and Consistency:
applyThemeToLayoutinplotlyTheme.jsto apply MUI theme colors and styles to Plotly layouts, ensuring consistent appearance with the rest of the UI. This function strips backend-provided fixed dimensions so that sizing can be controlled by the frontend.ExplainersPlot.jsx,HyperparameterPlots.jsx, andResultsTabHyperparameters.jsxto useapplyThemeToLayoutand the current MUI theme viauseTheme(), ensuring all Plotly charts match the application's theme. [1] [2] [3]Plot Responsiveness and Layout Improvements:
UI Layout and Alignment Adjustments:
ExplainersGrid.jsxandExplanainersCard.jsxto ensure cards and plot sections stretch and fill available space, resulting in a more consistent and visually appealing layout. [1] [2] [3]Loading State and Error Handling:
ResultsTabHyperparameters.jsxby displaying a spinner while plots are being fetched and processed, and by handling errors and failed states more gracefully. [1] [2]These changes collectively enhance the user experience by ensuring that plots are visually integrated with the application's theme, are more responsive, and that layout and loading behaviors are more robust.
There is a problem with dropdown of plotly: plotly/plotly.py#3120

So now it have a ugly color.
Still have a bug, when select other hyperparameter in the plot, the plot title disappear.
