diff --git a/client/components/src/jsMain/kotlin/com/zegreatrob/coupling/client/components/stats/PairFrequencyControls.kt b/client/components/src/jsMain/kotlin/com/zegreatrob/coupling/client/components/stats/PairFrequencyControls.kt index d90a1fc5f..053f8b176 100644 --- a/client/components/src/jsMain/kotlin/com/zegreatrob/coupling/client/components/stats/PairFrequencyControls.kt +++ b/client/components/src/jsMain/kotlin/com/zegreatrob/coupling/client/components/stats/PairFrequencyControls.kt @@ -34,10 +34,10 @@ external interface PairFrequencyControlsProps : Props { } enum class Visualization { - Heatmap, LineOverTime, - MedianCycleTimeBarChart, - CycleTimeBoxPlot, +// Heatmap, +// MedianCycleTimeBarChart, +// CycleTimeBoxPlot, } enum class FakeDataStyle { @@ -54,7 +54,8 @@ data class VisualizationContext( @ReactFunc val PairFrequencyControls by nfc { (pairsContributions, view, selectedWindow, setWindow) -> val (fakeStyle, setFakeStyle) = useState(null) - val (visualization, setVisualization) = useState(Visualization.Heatmap) +// val (visualization, setVisualization) = useState(Visualization.Heatmap) + val (visualization, setVisualization) = useState(Visualization.LineOverTime) val (selectedPairs, setSelectedPairs) = useState(emptyList()) val (selectedLabelFilter, setSelectedLabelFilter) = useState(null) val (fakeContributions, setFakeContributions) = useState>>(emptyList()) @@ -110,7 +111,7 @@ val PairFrequencyControls by nfc { (pairsContributio } div { EnumSelector( - default = Visualization.Heatmap, + default = Visualization.LineOverTime, onChange = setVisualization::invoke, label = ReactNode("Visualization Style"), backgroundColor = contributionContentBackgroundColor, diff --git a/client/components/src/jsTest/kotlin/com/zegreatrob/coupling/client/components/stats/PairFrequencyControlsTest.kt b/client/components/src/jsTest/kotlin/com/zegreatrob/coupling/client/components/stats/PairFrequencyControlsTest.kt index ac894f3e4..94a1a5de7 100644 --- a/client/components/src/jsTest/kotlin/com/zegreatrob/coupling/client/components/stats/PairFrequencyControlsTest.kt +++ b/client/components/src/jsTest/kotlin/com/zegreatrob/coupling/client/components/stats/PairFrequencyControlsTest.kt @@ -1,6 +1,6 @@ package com.zegreatrob.coupling.client.components.stats -import com.zegreatrob.coupling.client.components.stats.Visualization.Heatmap +//import com.zegreatrob.coupling.client.components.stats.Visualization.Heatmap import com.zegreatrob.coupling.json.GqlContributionWindow import com.zegreatrob.coupling.model.Contribution import com.zegreatrob.coupling.model.ContributionReport @@ -34,7 +34,9 @@ class PairFrequencyControlsTest { render(PairFrequencyControls.create(pairs, viewSpy::spyFunction, GqlContributionWindow.All, {})) } verify { viewSpy.spyReceivedValues.last() - .assertIsEqualTo(VisualizationContext(Heatmap, emptyList())) + .assertIsEqualTo(VisualizationContext(Visualization.LineOverTime, emptyList())) +// viewSpy.spyReceivedValues.last() +// .assertIsEqualTo(VisualizationContext(Heatmap, emptyList())) } @Test @@ -55,7 +57,7 @@ class PairFrequencyControlsTest { actor.click(screen.findByRole("checkbox", RoleOptions(expectedPair.pairName))) } verify { viewSpy.spyReceivedValues.last() - .assertIsEqualTo(VisualizationContext(Heatmap, listOf(expectedPair to expectedReport))) + .assertIsEqualTo(VisualizationContext(Visualization.LineOverTime, listOf(expectedPair to expectedReport))) } } diff --git a/client/src/jsMain/kotlin/com/zegreatrob/coupling/client/contribution/ContributionVisualization.kt b/client/src/jsMain/kotlin/com/zegreatrob/coupling/client/contribution/ContributionVisualization.kt index 57cbb13a0..822e3d506 100644 --- a/client/src/jsMain/kotlin/com/zegreatrob/coupling/client/contribution/ContributionVisualization.kt +++ b/client/src/jsMain/kotlin/com/zegreatrob/coupling/client/contribution/ContributionVisualization.kt @@ -49,9 +49,9 @@ val ContributionVisualization by nfc { props -> view = { (visualization, data) -> when (visualization) { Visualization.LineOverTime -> PairFrequencyLineGraph.create(data, window) - Visualization.Heatmap -> PairFrequencyHeatMap.create(data, window, spinsUntilFullRotation) - Visualization.MedianCycleTimeBarChart -> PairCycleTimeBarChart.create(data, window) - Visualization.CycleTimeBoxPlot -> PairCycleTimeBoxPlot.create(data, window) +// Visualization.Heatmap -> PairFrequencyHeatMap.create(data, window, spinsUntilFullRotation) +// Visualization.MedianCycleTimeBarChart -> PairCycleTimeBarChart.create(data, window) +// Visualization.CycleTimeBoxPlot -> PairCycleTimeBoxPlot.create(data, window) } }, window = window,