Skip to content

Refactor: Unify DatasetVisualization into shared component#418

Merged
Irozuku merged 2 commits into
developfrom
refactor/dataset-visualization
Jan 13, 2026
Merged

Refactor: Unify DatasetVisualization into shared component#418
Irozuku merged 2 commits into
developfrom
refactor/dataset-visualization

Conversation

@Creylay
Copy link
Copy Markdown
Collaborator

@Creylay Creylay commented Jan 12, 2026

Summary

Consolidates two duplicate DatasetVisualization components (one in /components for Notebooks and one in /components/models for Models) into a single shared component with generic props. This reduces code duplication and makes the component reusable across different modules by accepting configurable button text and callback handlers.


Type of Change

Check all that apply like this [x]:

  • Backend change
  • Frontend change
  • CI / Workflow change
  • Build / Packaging change
  • Bug fix
  • Documentation

Changes (by file)

Component Consolidation:

  • DashAI/front/src/components/DatasetVisualization.jsx: Updated to use generic prop names (onItemCreated, onNewItem, newItemButtonText, existingItems) instead of notebook-specific names, making it reusable across modules
  • DashAI/front/src/components/models/DatasetVisualization.jsx: Removed (duplicate component deleted)

Integration Updates:

  • DashAI/front/src/pages/models/ModelsContent.jsx: Updated import to use shared DatasetVisualization component from /components with newItemButtonText="New Session" prop
  • Fixed typo: onNewNotebokonNewNotebook

Testing

  1. Notebooks module: Verify that "New Notebook" button works correctly on dataset visualization page
  2. Models module: Verify that "New Session" button works correctly on dataset visualization page (step 2)
  3. Confirm both modules display dataset information, quality scores, and tabs correctly
  4. Test button states (disabled when dataset is processing)
  5. Verify tour functionality still works in both contexts

Notes

  • The shared component maintains all original functionality while accepting customizable props for different use cases
  • Default prop values ensure backward compatibility
  • This change reduces maintenance overhead by having a single source of truth for dataset visualization UI
  • Future modules can easily reuse this component by providing custom button text and handlers

@Creylay Creylay requested a review from Irozuku January 12, 2026 21:10
@Irozuku Irozuku merged commit 9dde174 into develop Jan 13, 2026
18 checks passed
@Irozuku Irozuku deleted the refactor/dataset-visualization branch January 13, 2026 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants