Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Added Links for all Charts in Preview & Published Mode #1816

Merged
merged 3 commits into from
Nov 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions app/components/chart-published.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { LoadingStateProvider } from "@/charts/shared/chart-loading-state";
import { isUsingImputation } from "@/charts/shared/imputation";
import { CHART_RESIZE_EVENT_TYPE } from "@/charts/shared/use-size";
import { ChartErrorBoundary } from "@/components/chart-error-boundary";
import { ChartFootnotes } from "@/components/chart-footnotes";
import { ChartFootnotes, VisualizeLink } from "@/components/chart-footnotes";
import { ChartPanelLayout, ChartWrapper } from "@/components/chart-panel";
import {
ChartControls,
Expand Down Expand Up @@ -155,6 +155,7 @@ export const ChartPublished = ({
chartConfigs={state.chartConfigs}
renderChart={renderChart}
/>
{state.chartConfigs.length !== 1 && <VisualizeLink />}
</Box>
) : (
<>
Expand Down Expand Up @@ -219,6 +220,9 @@ const usePublishedChartStyles = makeStyles<Theme, { shrink: boolean }>(
padding: theme.spacing(6),
},

gap: 16,
display: "flex",
flexDirection: "column",
backgroundColor: theme.palette.grey[200],
},
})
Expand Down Expand Up @@ -443,8 +447,9 @@ const ChartPublishedInnerImpl = (props: ChartPublishInnerProps) => {
dashboardFilters={state.dashboardFilters}
components={allComponents}
showVisualizeLink={
state.chartConfigs.length === 1 &&
state.layout.type !== "dashboard"
state.layout.type !== "dashboard" ||
(state.layout.type === "dashboard" &&
state.chartConfigs.length === 1)
bprusinowski marked this conversation as resolved.
Show resolved Hide resolved
}
/>
</InteractiveFiltersChartProvider>
Expand Down
Loading