Skip to content

Fix TS2300 duplicate import errors in HoverButtons.tsx blocking CI build - #110

Closed
olivhoenen with Copilot wants to merge 2 commits into
developfrom
copilot/fix-build-and-packaging-job
Closed

Fix TS2300 duplicate import errors in HoverButtons.tsx blocking CI build#110
olivhoenen with Copilot wants to merge 2 commits into
developfrom
copilot/fix-build-and-packaging-job

Conversation

Copilot AI commented Jul 30, 2026

Copy link
Copy Markdown

PR #101 introduced a merge conflict resolution that left duplicate import { Configuration, CustomizedGridType, DataGridPlot } statements in HoverButtons.tsx, causing 6 TS2300: Duplicate identifier TypeScript errors and failing the build-and-packaging CI job.

Root cause

When develop (which had consolidated those three identifiers into a multi-line block also containing PlotType) was merged into the PR branch, both the original single-line import from the PR and the expanded block from develop ended up coexisting:

// Conflict residue — two imports declaring the same identifiers
import { Configuration, CustomizedGridType, DataGridPlot } from '../../types';  // PR line
import {
  Configuration,       // duplicate
  CustomizedGridType,  // duplicate
  DataGridPlot,        // duplicate
  PlotType,
} from '../../types';

Changes

Bug fix

  • HoverButtons.tsx — Removed the redundant single-line import; retains only the multi-line block (which already covers all needed identifiers including PlotType). Updates @mantine/hooks import to add useElementSize and useMergedRef, replaces hoverRef.current.offsetWidth with reactive containerWidth from useElementSize.

Feature changes from PR #101 (applied cleanly)

  • CustomizeSmoothing.tsx (new) — UI for Gaussian and Savitzky-Golay filter parameters with apply/restore workflow per selected plot
  • CustomizeUnaryOperations.tsx (new) — UI for composing ordered scalar operations (add/subtract/multiply/etc.) per selected plot
  • utils/fetchData.ts — Adds getSmoothingMethods, getOperationMethods, buildSmoothingRequest, formatOperations, and smoothing/operations query-string encoding in fetchDataPlot
  • utils/plot.ts — Adds reapplyAxisOrder to restore user axis transposition after back-end re-fetches; passes smoothing and operations through plotNodeUriLoaded
  • types/plot.ts — New SmoothingParams and UnaryOperation types; smoothing and operations fields on BaseDataPlotly
  • types/data.ts — Extended DataManipulationParameterResponse with fields, group_label, optional possible_values; DataManipulationMethodResponse with additional_parameters
  • DataplotCustomization.tsx — Registers new Data smoothing and Unary operations accordion panels
  • CustomizeDownsampling.tsx / CustomizeInterpolation.tsx — Call reapplyAxisOrder after re-fetch to preserve transposition
  • MainLayout.tsx — Preserves smoothing and operations fields when rebuilding plot objects on config load

Copilot AI changed the title [WIP] Fix failing GitHub Actions job build-and-packaging Fix TS2300 duplicate import errors in HoverButtons.tsx blocking CI build Jul 30, 2026
Copilot AI requested a review from olivhoenen July 30, 2026 08:46
@olivhoenen olivhoenen closed this Jul 30, 2026
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