Standardize Explorer plots with shared artifact viewer and persistent overrides - #820
Open
Irozuku wants to merge 16 commits into
Open
Standardize Explorer plots with shared artifact viewer and persistent overrides#820Irozuku wants to merge 16 commits into
Irozuku wants to merge 16 commits into
Conversation
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.
Summary
Standardizes explorer plots onto the same rendering stack the explainers use, so they follow the app light and dark theme, expose the same download, edit, and fullscreen actions on the plot itself, and persist edits with a restore that recovers the original figure at the database level. Restyles the explorer and converter cards to match the explainer cards (outlined container, status dot, plot actions on the plot, separate info modal), and fixes a set of plot rendering bugs surfaced along the way.
Type of Change
Changes (by file)
Backend: plot overrides (themed edits plus reset)
DashAI/back/core/artifacts.py: adds sharedapply_plot_overrideshelper andPlotOverrideBody, moved here so explainers and explorers use one implementation.DashAI/back/api/api_v1/endpoints/explainers.py: drops its private override helper, imports the shared one.DashAI/back/api/api_v1/endpoints/explorers.py: applies stored overrides on read;PUT /results/now writes one override per artifact instead of overwriting the stored figure; newDELETE /results/override/{index}restores the computed figure.DashAI/back/dependencies/database/models.py:Explorergains aplot_overridesJSON column.DashAI/alembic/versions/f7a4c2e91b60_add_plot_overrides_to_explorer.py: migration for that column.Frontend: explorer plots on the shared artifact stack
components/notebooks/explorer/ExplorerBox.jsx: renders results throughArtifactViewer; owns save and reset; measures the plot to its card; blue status dot while loading.components/notebooks/explorer/ExplorerInfoModal.jsx(new) replaces the tabbedExplorerDetailsModal.jsx(removed): an info only modal (created, columns, parameters); editing now lives on the plot.components/notebooks/explorer/useExplorerResults.jsx: narrowed to expose the raw artifact; drops the derived visualizer pair.components/notebooks/explorer/tabs/Results.jsx(removed) plustabs/index.jsx: dead results tab dropped.components/shared/ArtifactViewer.jsx: optionalheightso a card can size the plot to its container.components/shared/RunStatusDot.jsx: optionalcolorKeyoverride (blue dot during loading).api/explorer.ts,api/explorer.test.ts,api/__mocks__/api.ts:updateExplorerResults(id, index, figure)plusresetExplorerResults(id, index).Frontend: card restyle
components/notebooks/converter/ConverterBox.jsx: outlinedPaper, status dot, plain error delete, matching the explainer card.components/notebooks/notebook/NotebookView.jsx: taller explorer and converter cards (CARD_HEIGHT).Frontend: plot rendering fixes
components/notebooks/explorer/visualizations/PlotlyJsonVisualizer.jsx: backgrounds that follow the theme instead of hardcoded white; uses the margin and axis helpers below.utils/plotlyAxes.js(plus test): axis reset skips figures with no cartesian axes (fixes a crash resetting parallel coordinates plots).utils/plotlyMargin.js(plus test): extra top margin so a title clears parallel coordinates dimension labels.i18n
locales/*/common.json: drop the orphanedinfoEditkey.locales/*/datasets.json: keys for the reset snackbars.Tests
tests/back/api/test_explorer_overrides.py(new): PUT stores an override without touching the artifacts file; GET applies it flaggedoverridden; DELETE restores the computed figure; 404s.tests/back/api/test_explainers_overrides.py: import path plus nested group coverage for the shared helper.Testing
PUToverwrote it).Notes
PUTlost their computed figure on disk; reset only recovers originals for edits saved after this change. Reconstructing would mean rerunning the exploration.