From b924e72177ac604a71d57a997ce25d76c8ffe1e6 Mon Sep 17 00:00:00 2001 From: Patrick Browne Date: Mon, 7 Nov 2022 16:22:24 +0100 Subject: [PATCH 01/34] feat: Remove right panel and flatter style --- app/components/chart-panel.tsx | 6 +- app/components/chart-selection-tabs.tsx | 27 +++--- app/configurator/components/configurator.tsx | 98 ++++++++++++++++++-- app/configurator/components/drawer.tsx | 11 +++ app/configurator/components/filters.tsx | 16 +--- app/configurator/components/layout.tsx | 7 +- app/themes/federal.tsx | 13 +-- 7 files changed, 131 insertions(+), 47 deletions(-) create mode 100644 app/configurator/components/drawer.tsx diff --git a/app/components/chart-panel.tsx b/app/components/chart-panel.tsx index edaf89d91..7f2ab2ff6 100644 --- a/app/components/chart-panel.tsx +++ b/app/components/chart-panel.tsx @@ -53,12 +53,10 @@ const useChartPanelInnerStyles = makeStyles( root: { flexDirection: "column", backgroundColor: theme.palette.grey[100], - boxShadow: theme.shadows[6], - borderRadius: 12, - borderTopLeftRadius: ({ showTabs }) => (showTabs ? 0 : 12), + border: "1px solid", + borderColor: theme.palette.divider, // TODO: Handle properly when chart composition is implemented (enable when // ChartSelectionTabs becomes scrollable) - borderTopRightRadius: 12, overflow: "hidden", width: "auto", }, diff --git a/app/components/chart-selection-tabs.tsx b/app/components/chart-selection-tabs.tsx index 4cb3f654d..09c822650 100644 --- a/app/components/chart-selection-tabs.tsx +++ b/app/components/chart-selection-tabs.tsx @@ -1,4 +1,4 @@ -import { Box, Popover, Tab, Tabs, Theme } from "@mui/material"; +import { Box, Popover, Tab, Tabs, Theme, Button } from "@mui/material"; import { makeStyles } from "@mui/styles"; import React, { createContext, @@ -159,16 +159,21 @@ const TabsInner = ({ onActionButtonClick?: (e: React.MouseEvent) => void; }) => { return ( - - {/* TODO: Generate dynamically when chart composition is implemented */} - - } - /> - + + + {/* TODO: Generate dynamically when chart composition is implemented */} + + } + /> + + + ); }; diff --git a/app/configurator/components/configurator.tsx b/app/configurator/components/configurator.tsx index 82a06d75c..dc49d03c2 100644 --- a/app/configurator/components/configurator.tsx +++ b/app/configurator/components/configurator.tsx @@ -1,3 +1,6 @@ +import Box from "@mui/material/Box"; +import Button from "@mui/material/Button"; +import { useRouter } from "next/router"; import React from "react"; import { ChartPanelConfigurator } from "@/components/chart-panel"; @@ -7,19 +10,77 @@ import { ChartAnnotationsSelector } from "@/configurator/components/chart-annota import { ChartAnnotator } from "@/configurator/components/chart-annotator"; import { ChartConfigurator } from "@/configurator/components/chart-configurator"; import { ChartOptionsSelector } from "@/configurator/components/chart-options-selector"; +import { ConfiguratorDrawer } from "@/configurator/components/drawer"; import { - PanelHeader, PanelLayout, PanelLeftWrapper, PanelMiddleWrapper, PanelRightWrapper, } from "@/configurator/components/layout"; import { SelectDatasetStep } from "@/configurator/components/select-dataset-step"; -import { Stepper } from "@/configurator/components/stepper"; import { ChartConfiguratorTable } from "@/configurator/table/table-chart-configurator"; +import SvgIcChevronLeft from "@/icons/components/IcChevronLeft"; +import useEvent from "@/utils/use-event"; + +const BackContainer = ({ children }: { children: React.ReactNode }) => { + return ( + + {children} + + ); +}; + +const BackButton = ({ + children, + onClick, +}: { children: React.ReactNode } & ButtonProps) => { + return ( + + ); +}; const ConfigureChartStep = () => { - const [state] = useConfiguratorState(); + const [state, dispatch] = useConfiguratorState(); + + const handleClosePanel = useEvent(() => { + dispatch({ + type: "ACTIVE_FIELD_CHANGED", + value: undefined, + }); + }); + + const router = useRouter(); + + const handlePrevious = useEvent(() => { + if (state.state !== "CONFIGURING_CHART") { + return; + } + router.push( + { + pathname: `/browse/dataset/${encodeURIComponent(state.dataSet)}`, + }, + undefined, + { shallow: true } + ); + }); if (state.state !== "CONFIGURING_CHART") { return null; @@ -35,6 +96,9 @@ const ConfigureChartStep = () => { flexDirection: "column", }} > + + Back to datasets + {state.chartConfig.chartType === "table" ? ( ) : ( @@ -49,9 +113,28 @@ const ConfigureChartStep = () => { /> - - - + +
+ + + + +
+
); }; @@ -112,9 +195,6 @@ export const Configurator = () => { ) : ( - - - {state.state === "CONFIGURING_CHART" ? : null} {state.state === "DESCRIBING_CHART" ? : null} {state.state === "PUBLISHING" ? : null} diff --git a/app/configurator/components/drawer.tsx b/app/configurator/components/drawer.tsx new file mode 100644 index 000000000..6c5e47831 --- /dev/null +++ b/app/configurator/components/drawer.tsx @@ -0,0 +1,11 @@ +import { Drawer as MuiDrawer } from "@mui/material"; +import { styled } from "@mui/material/styles"; + +export const ConfiguratorDrawer = styled(MuiDrawer)(({ theme }) => ({ + "& > .MuiPaper-root": { + top: 95.5, + bottom: 0, + height: "auto", + borderLeft: `1px ${theme.palette.divider} solid`, + }, +})); diff --git a/app/configurator/components/filters.tsx b/app/configurator/components/filters.tsx index ffb109b92..cf08e2119 100644 --- a/app/configurator/components/filters.tsx +++ b/app/configurator/components/filters.tsx @@ -11,7 +11,6 @@ import { AutocompleteProps, Autocomplete, Divider, - Drawer as MuiDrawer, Theme, IconButton, Tooltip, @@ -43,6 +42,7 @@ import { useDimensionSelection, useMultiFilterContext, } from "@/configurator"; +import { ConfiguratorDrawer } from "@/configurator/components/drawer"; import { MultiFilterFieldColorPicker, SingleFilterField, @@ -76,16 +76,6 @@ import { ConfiguratorState, GenericSegmentField } from "../config-types"; import { ControlSectionSkeleton } from "./chart-controls/section"; -const Drawer = styled(MuiDrawer)(({ theme }) => ({ - "& > .MuiPaper-root": { - top: 152, - bottom: 0, - height: "auto", - borderLeft: `1px ${theme.palette.divider} solid`, - borderTop: `1px ${theme.palette.divider} solid`, - }, -})); - const useStyles = makeStyles((theme: Theme) => { return { autocompleteMenuContent: { @@ -511,7 +501,7 @@ const MultiFilterContent = ({ ); })} - + - + ); }; diff --git a/app/configurator/components/layout.tsx b/app/configurator/components/layout.tsx index 6939930f6..6ce78d88f 100644 --- a/app/configurator/components/layout.tsx +++ b/app/configurator/components/layout.tsx @@ -31,12 +31,11 @@ const useStyles = makeStyles((theme: Theme) => ({ width: "100%", height: "calc(100vh - 96px)", display: "grid", - gridTemplateColumns: - "minmax(12rem, 20rem) minmax(22rem, 1fr) minmax(12rem, 20rem)", + gridTemplateColumns: "minmax(12rem, 20rem) minmax(22rem, 1fr)", gridTemplateRows: "auto minmax(0, 1fr)", gridTemplateAreas: ` - "header header header" - "left middle right"`, + "header header" + "left middle"`, marginLeft: "auto", marginRight: "auto", }, diff --git a/app/themes/federal.tsx b/app/themes/federal.tsx index 70cb81150..da5396ef9 100644 --- a/app/themes/federal.tsx +++ b/app/themes/federal.tsx @@ -734,6 +734,9 @@ theme.components = { display: "none", }, }, + flexContainer: { + height: 60, + }, }, }, MuiTab: { @@ -741,19 +744,17 @@ theme.components = { root: { justifyContent: "center", alignItems: "center", - height: 49, + height: "100%", paddingTop: 0, paddingRight: 24, paddingBottom: 0, paddingLeft: 24, - backgroundColor: theme.palette.grey[100], color: theme.palette.grey[900], - borderTopLeftRadius: 12, - borderTopRightRadius: 12, - boxShadow: shadows[6], + border: "1px solid", + borderBottomWidth: 0, + borderColor: theme.palette.divider, "&.Mui-selected": { - height: 50, color: theme.palette.primary.main, }, }, From 116ee912a258e2ab3a99f5f05b51dbcfda85fcd8 Mon Sep 17 00:00:00 2001 From: Patrick Browne Date: Mon, 7 Nov 2022 16:27:31 +0100 Subject: [PATCH 02/34] fix: Do not show user id in Login Menu --- app/components/login-menu.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/app/components/login-menu.tsx b/app/components/login-menu.tsx index d2b4a904f..79860e2ca 100644 --- a/app/components/login-menu.tsx +++ b/app/components/login-menu.tsx @@ -37,7 +37,6 @@ function LoginMenu() { <> Signed in as {session.user?.name}{" "} - {session.user?.id} {" - "} + ); }; -const DescribeChartStep = () => { - const [state] = useConfiguratorState(); - - if (state.state !== "DESCRIBING_CHART") { - return null; - } - return ( - <> - - - - - - - - - - - - - ); -}; const PublishStep = () => { const [state] = useConfiguratorState(); @@ -196,7 +175,6 @@ export const Configurator = () => { ) : ( {state.state === "CONFIGURING_CHART" ? : null} - {state.state === "DESCRIBING_CHART" ? : null} {state.state === "PUBLISHING" ? : null} ); diff --git a/app/configurator/interactive-filters/interactive-filters-configurator.tsx b/app/configurator/interactive-filters/interactive-filters-configurator.tsx index 39c6f84b1..0606adde2 100644 --- a/app/configurator/interactive-filters/interactive-filters-configurator.tsx +++ b/app/configurator/interactive-filters/interactive-filters-configurator.tsx @@ -12,9 +12,9 @@ import { SectionTitle, } from "@/configurator/components/chart-controls/section"; import { flag } from "@/configurator/components/flag"; -import { ConfiguratorStateDescribingChart } from "@/configurator/config-types"; +import { ConfiguratorStateConfiguringChart } from "@/configurator/config-types"; import { - isDescribing, + isConfiguring, useConfiguratorState, } from "@/configurator/configurator-state"; import { isTemporalDimension } from "@/domain/data"; @@ -34,7 +34,7 @@ export type InteractiveFilterType = export const InteractiveFiltersConfigurator = ({ state: { dataSet, dataSource, chartConfig }, }: { - state: ConfiguratorStateDescribingChart; + state: ConfiguratorStateConfiguringChart; }) => { const { chartType, fields, filters } = chartConfig; const locale = useLocale(); @@ -142,7 +142,7 @@ const InteractiveFilterTabField = ({ icon: string; label: ReactNode; }) => { - const [state, dispatch] = useConfiguratorState(isDescribing); + const [state, dispatch] = useConfiguratorState(isConfiguring); const onClick = useCallback(() => { dispatch({ From 92cd06fc159baaada55099dc844a8cd0d3248da3 Mon Sep 17 00:00:00 2001 From: Patrick Browne Date: Tue, 8 Nov 2022 09:43:25 +0100 Subject: [PATCH 04/34] refactor: Extract TitleAndDescription --- .../components/chart-annotator.tsx | 41 +++++++++++-------- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/app/configurator/components/chart-annotator.tsx b/app/configurator/components/chart-annotator.tsx index 4345bd189..115216ff4 100644 --- a/app/configurator/components/chart-annotator.tsx +++ b/app/configurator/components/chart-annotator.tsx @@ -12,6 +12,28 @@ import { InteractiveFiltersConfigurator } from "@/configurator/interactive-filte import { ConfiguratorStateConfiguringChart } from "../config-types"; +export const TitleAndDescriptionConfigurator = () => { + return ( + + + Annotate + + + + + + + ); +}; + export const ChartAnnotator = ({ state, }: { @@ -20,24 +42,7 @@ export const ChartAnnotator = ({ return ( <> {/* Title & Description */} - - - Annotate - - - - - - - + {/* Filters */} {state.chartConfig.chartType !== "table" && ( From 9f9dd110f3aa1b54ea78914a643a6d5454a7f97e Mon Sep 17 00:00:00 2001 From: Patrick Browne Date: Tue, 8 Nov 2022 09:43:56 +0100 Subject: [PATCH 05/34] feat: Show interactive filters in the left panel --- app/configurator/components/configurator.tsx | 17 ++++++++++++++--- .../interactive-filters-config-options.tsx | 14 +++++++------- .../interactive-filters-config-state.tsx | 10 +++++----- .../interactive-filters-configurator.tsx | 11 +++++++++++ 4 files changed, 37 insertions(+), 15 deletions(-) diff --git a/app/configurator/components/configurator.tsx b/app/configurator/components/configurator.tsx index 47ecce451..96c14f021 100644 --- a/app/configurator/components/configurator.tsx +++ b/app/configurator/components/configurator.tsx @@ -19,6 +19,9 @@ import { ChartConfiguratorTable } from "@/configurator/table/table-chart-configu import SvgIcChevronLeft from "@/icons/components/IcChevronLeft"; import useEvent from "@/utils/use-event"; +import { InteractiveFiltersOptions } from "../interactive-filters/interactive-filters-config-options"; +import { isInteractiveFilterType } from "../interactive-filters/interactive-filters-configurator"; + import { ChartAnnotator } from "./chart-annotator"; import { ChartOptionsSelector } from "./chart-options-selector"; @@ -57,6 +60,10 @@ const BackButton = ({ ); }; +const isAnnotationField = (field: string | undefined) => { + return field === "title" || field === "description"; +}; + const ConfigureChartStep = () => { const [state, dispatch] = useConfiguratorState(); @@ -135,15 +142,19 @@ const ConfigureChartStep = () => { Back to main - - + {isAnnotationField(state.activeField) ? ( + + ) : isInteractiveFilterType(state.activeField) ? ( + + ) : ( + + )} ); }; - const PublishStep = () => { const [state] = useConfiguratorState(); diff --git a/app/configurator/interactive-filters/interactive-filters-config-options.tsx b/app/configurator/interactive-filters/interactive-filters-config-options.tsx index 1cf048137..6ed3a4d23 100644 --- a/app/configurator/interactive-filters/interactive-filters-config-options.tsx +++ b/app/configurator/interactive-filters/interactive-filters-config-options.tsx @@ -19,9 +19,9 @@ import { SectionTitle, } from "@/configurator/components/chart-controls/section"; import { parseDate } from "@/configurator/components/ui-helpers"; -import { ConfiguratorStateDescribingChart } from "@/configurator/config-types"; +import { ConfiguratorStateConfiguringChart } from "@/configurator/config-types"; import { - isDescribing, + isConfiguring, useConfiguratorState, } from "@/configurator/configurator-state"; import { EditorBrush } from "@/configurator/interactive-filters/editor-time-brush"; @@ -50,7 +50,7 @@ import { getTimeSliderFilterDimensions } from "./helpers"; export const InteractiveFiltersOptions = ({ state, }: { - state: ConfiguratorStateDescribingChart; + state: ConfiguratorStateConfiguringChart; }) => { const { chartConfig, dataSet, dataSource } = state; const activeField = state.activeField as InteractiveFilterType; @@ -166,7 +166,7 @@ const InteractiveTimeRangeFilterToggle = ({ const InteractiveTimeRangeFilterOptions = ({ state, }: { - state: ConfiguratorStateDescribingChart; + state: ConfiguratorStateConfiguringChart; }) => { const locale = useLocale(); const formatDateAuto = useFormatFullDateAuto(); @@ -245,7 +245,7 @@ const InteractiveTimeRangeFilterOptions = ({ const InteractiveTimeSliderFilterOptions = ({ state: { chartConfig, dataSet, dataSource }, }: { - state: ConfiguratorStateDescribingChart; + state: ConfiguratorStateConfiguringChart; }) => { const locale = useLocale(); const [{ data }] = useDataCubeMetadataWithComponentValuesQuery({ @@ -345,7 +345,7 @@ const InteractiveDataFiltersToggle = ({ const InteractiveDataFilterOptions = ({ state: { chartConfig, dataSet, dataSource }, }: { - state: ConfiguratorStateDescribingChart; + state: ConfiguratorStateConfiguringChart; }) => { const locale = useLocale(); const [{ data }] = useDataCubeMetadataWithComponentValuesQuery({ @@ -408,7 +408,7 @@ const InteractiveDataFilterOptionsCheckbox = ({ label: string; disabled: boolean; }) => { - const [state, dispatch] = useConfiguratorState(isDescribing); + const [state, dispatch] = useConfiguratorState(isConfiguring); const onChange = useCallback<(e: ChangeEvent) => void>( (e) => { diff --git a/app/configurator/interactive-filters/interactive-filters-config-state.tsx b/app/configurator/interactive-filters/interactive-filters-config-state.tsx index e56380f3a..9a0d2a1af 100644 --- a/app/configurator/interactive-filters/interactive-filters-config-state.tsx +++ b/app/configurator/interactive-filters/interactive-filters-config-state.tsx @@ -5,7 +5,7 @@ import { ChangeEvent, useCallback } from "react"; import { InteractiveFiltersConfig } from "@/configurator/config-types"; import { - isDescribing, + isConfiguring, useConfiguratorState, } from "@/configurator/configurator-state"; import { DimensionMetadataFragment } from "@/graphql/query-hooks"; @@ -14,7 +14,7 @@ import useEvent from "@/utils/use-event"; import { FIELD_VALUE_NONE } from "../constants"; export const useInteractiveLegendFiltersToggle = () => { - const [state, dispatch] = useConfiguratorState(isDescribing); + const [state, dispatch] = useConfiguratorState(isConfiguring); const onChange = useEvent((e: ChangeEvent) => { const newConfig = produce( state.chartConfig.interactiveFiltersConfig, @@ -51,7 +51,7 @@ export const useInteractiveTimeRangeFiltersToggle = ({ }: { timeExtent: [string, string]; }) => { - const [state, dispatch] = useConfiguratorState(isDescribing); + const [state, dispatch] = useConfiguratorState(isConfiguring); const { chartConfig } = state; const onChange = useCallback<(e: ChangeEvent) => void>( @@ -116,7 +116,7 @@ export const updateInteractiveTimeRangeFilter = produce( ); export const useInteractiveTimeSliderFiltersSelect = () => { - const [state, dispatch] = useConfiguratorState(isDescribing); + const [state, dispatch] = useConfiguratorState(isConfiguring); const { chartConfig } = state; const onChange = useCallback<(e: SelectChangeEvent) => void>( @@ -155,7 +155,7 @@ export const useInteractiveDataFiltersToggle = ({ }: { dimensions: DimensionMetadataFragment[]; }) => { - const [state, dispatch] = useConfiguratorState(isDescribing); + const [state, dispatch] = useConfiguratorState(isConfiguring); const { chartConfig } = state; const onChange = useCallback<(e: ChangeEvent) => void>( diff --git a/app/configurator/interactive-filters/interactive-filters-configurator.tsx b/app/configurator/interactive-filters/interactive-filters-configurator.tsx index 0606adde2..431c73699 100644 --- a/app/configurator/interactive-filters/interactive-filters-configurator.tsx +++ b/app/configurator/interactive-filters/interactive-filters-configurator.tsx @@ -31,6 +31,17 @@ export type InteractiveFilterType = | "timeSlider" | "dataFilters"; +export const isInteractiveFilterType = ( + field: string | undefined +): field is InteractiveFilterType => { + return ( + field === "legend" || + field === "timeRange" || + field === "timeSlider" || + field === "dataFilters" + ); +}; + export const InteractiveFiltersConfigurator = ({ state: { dataSet, dataSource, chartConfig }, }: { From ea84a819743c473c9111c12cacf1df1a70bac0cc Mon Sep 17 00:00:00 2001 From: Patrick Browne Date: Tue, 8 Nov 2022 09:43:32 +0100 Subject: [PATCH 06/34] feat: Add collapse to ControlSection --- .../components/chart-annotations-selector.tsx | 3 +- .../components/chart-configurator.tsx | 3 - .../components/chart-controls/section.tsx | 188 ++++++++++++------ .../components/use-disclosure.tsx | 4 +- .../interactive-filters-config-options.tsx | 8 +- 5 files changed, 136 insertions(+), 70 deletions(-) diff --git a/app/configurator/components/chart-annotations-selector.tsx b/app/configurator/components/chart-annotations-selector.tsx index 0c36adba7..d8c50a83b 100644 --- a/app/configurator/components/chart-annotations-selector.tsx +++ b/app/configurator/components/chart-annotations-selector.tsx @@ -49,7 +49,6 @@ export const ChartAnnotationsSelector = ({ const orderedLocales = [locale, ...locales.filter((l) => l !== locale)]; if (activeField) { - console.log({ activeField }) return ( ) : ( - + {getFieldLabel(activeField)} diff --git a/app/configurator/components/chart-configurator.tsx b/app/configurator/components/chart-configurator.tsx index 1bc9c7274..562cd56c3 100644 --- a/app/configurator/components/chart-configurator.tsx +++ b/app/configurator/components/chart-configurator.tsx @@ -438,9 +438,6 @@ const useStyles = makeStyles< fetching: boolean; } >((theme) => ({ - filterSection: { - flexGrow: 1, - }, loadingIndicator: { color: theme.palette.grey[700], display: "inline-block", diff --git a/app/configurator/components/chart-controls/section.tsx b/app/configurator/components/chart-controls/section.tsx index a2933b6c8..4242c36ca 100644 --- a/app/configurator/components/chart-controls/section.tsx +++ b/app/configurator/components/chart-controls/section.tsx @@ -1,6 +1,8 @@ import { Box, BoxProps, + Collapse, + IconButton, Skeleton, Theme, Typography, @@ -8,48 +10,112 @@ import { } from "@mui/material"; import { makeStyles } from "@mui/styles"; import clsx from "clsx"; -import { ElementType, forwardRef, HTMLProps, ReactNode } from "react"; +import { + ElementType, + forwardRef, + HTMLProps, + ReactNode, + useContext, + useMemo, +} from "react"; +import React from "react"; import { Icon, IconName } from "@/icons"; -import { useTheme } from "@/themes"; +import SvgIcAdd from "@/icons/components/IcAdd"; +import SvgIcMinus from "@/icons/components/IcMinus"; + +import useDisclosure from "../use-disclosure"; + +const useControlSectionStyles = makeStyles( + (theme) => ({ + controlSection: { + borderTopColor: theme.palette.grey[500], + borderTopWidth: "1px", + borderTopStyle: "solid", + overflowX: "hidden", + overflowY: "auto", + flexShrink: 0, + backgroundColor: ({ isHighlighted }) => + isHighlighted ? "primaryLight" : "grey.100", + "&:first-of-type": { + borderTopWidth: 0, + }, + }, + }) +); -const useControlSectionStyles = makeStyles((theme) => ({ - controlSection: { - borderTopColor: theme.palette.grey[500], - borderTopWidth: "1px", - borderTopStyle: "solid", - overflowX: "hidden", - overflowY: "auto", - flexShrink: 0, - "&:first-of-type": { - borderTopWidth: 0, +const useSectionTitleStyles = makeStyles< + Theme, + { + disabled?: boolean; + color?: string; + sectionOpen: boolean; + } +>((theme) => ({ + root: { + display: "flex", + alignItems: "center", + width: "100%", + padding: theme.spacing(4), + paddingBottom: ({ sectionOpen }) => + sectionOpen ? theme.spacing(2) : theme.spacing(4), + transition: "padding-bottom 300ms ease", + border: "none", + justifyContent: "flex-start", + }, + text: { + "& > svg:first-of-type": { + marginRight: theme.spacing(2), }, + flexGrow: 1, + display: "flex", + alignItems: "center", + color: ({ disabled, color }) => + disabled ? "grey.600" : color ?? "grey.800", + }, + icon: { + justifySelf: "flex-end", + display: "inline-block", + marginRight: theme.spacing(-1), }, })); +const ControlSectionContext = React.createContext({ + open: () => {}, + isOpen: false, + close: () => {}, + setOpen: (_v: boolean | ((oldV: boolean) => boolean)) => {}, + disableCollapse: false as boolean | undefined, +}); + export const ControlSection = forwardRef< HTMLDivElement, { children: ReactNode; isHighlighted?: boolean; sx?: BoxProps["sx"]; + disableCollapse?: boolean; } & Omit, "ref"> ->(({ role, children, isHighlighted, sx, ...props }, ref) => { - const classes = useControlSectionStyles(); +>(({ role, children, isHighlighted, sx, disableCollapse, ...props }, ref) => { + const classes = useControlSectionStyles({ isHighlighted }); + const disclosure = useDisclosure(true); + const ctx = useMemo( + () => ({ ...disclosure, disableCollapse }), + [disableCollapse, disclosure] + ); return ( - - {children} - + + + {children} + + ); }); @@ -91,20 +157,25 @@ export const ControlSectionContent = ({ ...props }: ControlSectionContentProps) => { const classes = useControlSectionContentStyles({ gap, px }); + const disclosure = useControlSectionContext(); return ( - - {children} - + + + {children} + + ); }; +const useControlSectionContext = () => useContext(ControlSectionContext); + export const SectionTitle = ({ color, iconName, @@ -120,29 +191,28 @@ export const SectionTitle = ({ children: ReactNode; sx?: TypographyProps["sx"]; }) => { - const theme = useTheme(); + const { setOpen, isOpen, disableCollapse } = useControlSectionContext(); + const classes = useSectionTitleStyles({ + disabled, + color, + sectionOpen: isOpen, + }); return ( - svg:first-of-type": { - marginRight: theme.spacing(2), - }, - ...sx, - }} - > - {iconName ? : null} - {children} - +
+ + {iconName ? : null} + {children} + + {disableCollapse ? null : ( + setOpen((v) => !v)} + > + {isOpen ? : } + + )} +
); }; diff --git a/app/configurator/components/use-disclosure.tsx b/app/configurator/components/use-disclosure.tsx index c02ca5c18..21e8b74b1 100644 --- a/app/configurator/components/use-disclosure.tsx +++ b/app/configurator/components/use-disclosure.tsx @@ -1,7 +1,7 @@ import { useCallback, useState } from "react"; -const useDisclosure = () => { - const [isOpen, setOpen] = useState(false); +const useDisclosure = (initialState?: boolean) => { + const [isOpen, setOpen] = useState(initialState || false); const open = useCallback(() => setOpen(true), []); const close = useCallback(() => setOpen(false), []); return { diff --git a/app/configurator/interactive-filters/interactive-filters-config-options.tsx b/app/configurator/interactive-filters/interactive-filters-config-options.tsx index 6ed3a4d23..b93813a69 100644 --- a/app/configurator/interactive-filters/interactive-filters-config-options.tsx +++ b/app/configurator/interactive-filters/interactive-filters-config-options.tsx @@ -82,7 +82,7 @@ export const InteractiveFiltersOptions = ({ const component = allComponents.find((d) => d.iri === componentIri); return ( - + {component?.label} d.iri === componentIri); return ( - + {component?.label} @@ -110,7 +110,7 @@ export const InteractiveFiltersOptions = ({ ); } else if (activeField === "timeSlider") { return ( - + Time slider @@ -123,7 +123,7 @@ export const InteractiveFiltersOptions = ({ ); } else if (activeField === "dataFilters") { return ( - + Data filters From 8e978c367c579e8ea0a3a19466c6f7502dae9f73 Mon Sep 17 00:00:00 2001 From: Patrick Browne Date: Tue, 8 Nov 2022 10:17:19 +0100 Subject: [PATCH 07/34] feat: Add warn icon when no title or description --- .../components/chart-annotator.tsx | 31 ++++++++++++++++++- .../components/chart-controls/section.tsx | 3 ++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/app/configurator/components/chart-annotator.tsx b/app/configurator/components/chart-annotator.tsx index 115216ff4..349344cc3 100644 --- a/app/configurator/components/chart-annotator.tsx +++ b/app/configurator/components/chart-annotator.tsx @@ -1,4 +1,5 @@ import { Trans } from "@lingui/macro"; +import { Tooltip, Typography } from "@mui/material"; import * as React from "react"; import { @@ -9,13 +10,41 @@ import { import { AnnotatorTabField } from "@/configurator/components/field"; import { getFieldLabel } from "@/configurator/components/field-i18n"; import { InteractiveFiltersConfigurator } from "@/configurator/interactive-filters/interactive-filters-configurator"; +import SvgIcWarning from "@/icons/components/IcWarning"; +import { useConfiguratorState } from "@/src"; import { ConfiguratorStateConfiguringChart } from "../config-types"; +import { isConfiguring } from "../configurator-state"; + +const WarnTitleDescription = () => { + const [state] = useConfiguratorState(isConfiguring); + const hasSomeTitleOrDescription = React.useMemo(() => { + const { title, description } = state.meta; + return ( + Object.values(title).some((x) => x != "") || + Object.values(description).some((x) => x != "") + ); + }, [state.meta]); + return hasSomeTitleOrDescription ? null : ( + + Your chart has no title or description. + + } + > + + + + + ); +}; export const TitleAndDescriptionConfigurator = () => { return ( - + }> Annotate diff --git a/app/configurator/components/chart-controls/section.tsx b/app/configurator/components/chart-controls/section.tsx index 4242c36ca..be8522370 100644 --- a/app/configurator/components/chart-controls/section.tsx +++ b/app/configurator/components/chart-controls/section.tsx @@ -183,6 +183,7 @@ export const SectionTitle = ({ disabled, children, sx, + right, }: { color?: string; iconName?: IconName; @@ -190,6 +191,7 @@ export const SectionTitle = ({ disabled?: boolean; children: ReactNode; sx?: TypographyProps["sx"]; + right?: React.ReactNode; }) => { const { setOpen, isOpen, disableCollapse } = useControlSectionContext(); const classes = useSectionTitleStyles({ @@ -203,6 +205,7 @@ export const SectionTitle = ({ {iconName ? : null} {children} + {right} {disableCollapse ? null : ( Date: Tue, 8 Nov 2022 10:17:45 +0100 Subject: [PATCH 08/34] feat: Remove shadows according to new design --- app/configurator/components/layout.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/configurator/components/layout.tsx b/app/configurator/components/layout.tsx index 6ce78d88f..fd07c8560 100644 --- a/app/configurator/components/layout.tsx +++ b/app/configurator/components/layout.tsx @@ -8,7 +8,7 @@ const useStyles = makeStyles((theme: Theme) => ({ overflowX: "hidden", overflowY: "auto", backgroundColor: theme.palette.grey[100], - boxShadow: theme.shadows[5], + boxShadow: "none", borderRightColor: theme.palette.grey[500], borderRightWidth: "1px", borderRightStyle: "solid", From b210c1181cfde6d4090d4b9a7fa2b8b60f0697e0 Mon Sep 17 00:00:00 2001 From: Patrick Browne Date: Tue, 8 Nov 2022 10:25:33 +0100 Subject: [PATCH 09/34] refactor: Extract Title and Description options --- .../components/chart-annotations-selector.tsx | 68 +++++++++++-------- 1 file changed, 41 insertions(+), 27 deletions(-) diff --git a/app/configurator/components/chart-annotations-selector.tsx b/app/configurator/components/chart-annotations-selector.tsx index d8c50a83b..89f5a33cc 100644 --- a/app/configurator/components/chart-annotations-selector.tsx +++ b/app/configurator/components/chart-annotations-selector.tsx @@ -17,6 +17,46 @@ import { useLocale } from "@/locales/use-locale"; import { ConfiguratorStateConfiguringChart } from "../config-types"; +const TitleAndDescriptionOptions = ({ + state, +}: { + state: ConfiguratorStateConfiguringChart; +}) => { + const { activeField, meta } = state; + + const locale = useLocale(); + // Reorder locales so the input field for + // the current locale is on top + const orderedLocales = [locale, ...locales.filter((l) => l !== locale)]; + + if (!activeField) { + return null; + } + + return ( + + + {getFieldLabel(activeField)} + + + {orderedLocales.map((d) => ( + + + + ))} + + + ); +}; + export const ChartAnnotationsSelector = ({ state, }: { @@ -29,7 +69,6 @@ export const ChartAnnotationsSelector = ({ panelRef.current.focus(); } }, [activeField]); - const locale = useLocale(); const isInteractiveFilterField = useMemo(() => { switch (activeField as InteractiveFilterType) { @@ -44,10 +83,6 @@ export const ChartAnnotationsSelector = ({ } }, [activeField]); - // Reorder locales so the input field for - // the current locale is on top - const orderedLocales = [locale, ...locales.filter((l) => l !== locale)]; - if (activeField) { return ( ) : ( - - - {getFieldLabel(activeField)} - - - {orderedLocales.map((d) => ( - - - - ))} - - + )} ); From 96976affacad74a376ecb78c2707d19a95066382 Mon Sep 17 00:00:00 2001 From: Patrick Browne Date: Tue, 8 Nov 2022 11:25:06 +0100 Subject: [PATCH 10/34] fix: Control sections show their border top, to have a separation with back button --- app/configurator/components/chart-controls/section.tsx | 3 --- app/configurator/components/configurator.tsx | 2 -- 2 files changed, 5 deletions(-) diff --git a/app/configurator/components/chart-controls/section.tsx b/app/configurator/components/chart-controls/section.tsx index be8522370..1a8580601 100644 --- a/app/configurator/components/chart-controls/section.tsx +++ b/app/configurator/components/chart-controls/section.tsx @@ -37,9 +37,6 @@ const useControlSectionStyles = makeStyles( flexShrink: 0, backgroundColor: ({ isHighlighted }) => isHighlighted ? "primaryLight" : "grey.100", - "&:first-of-type": { - borderTopWidth: 0, - }, }, }) ); diff --git a/app/configurator/components/configurator.tsx b/app/configurator/components/configurator.tsx index 96c14f021..4548c9a8b 100644 --- a/app/configurator/components/configurator.tsx +++ b/app/configurator/components/configurator.tsx @@ -29,8 +29,6 @@ const BackContainer = ({ children }: { children: React.ReactNode }) => { return ( Date: Tue, 8 Nov 2022 11:25:38 +0100 Subject: [PATCH 11/34] feat: Clicking on title & description brings title/description --- app/components/chart-preview.tsx | 40 ++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/app/components/chart-preview.tsx b/app/components/chart-preview.tsx index 26413a5c4..8c2bba25b 100644 --- a/app/components/chart-preview.tsx +++ b/app/components/chart-preview.tsx @@ -1,5 +1,6 @@ import { Trans } from "@lingui/macro"; -import { Box, Typography } from "@mui/material"; +import { Box, Theme, Typography } from "@mui/material"; +import { makeStyles } from "@mui/styles"; import Head from "next/head"; import * as React from "react"; @@ -39,6 +40,23 @@ export const ChartPreview = ({ ); }; +const useStyles = makeStyles({ + title: { + marginBottom: 2, + cursor: "pointer", + "&:hover": { + textDecoration: "underline", + }, + }, + description: { + marginBottom: 2, + cursor: "pointer", + "&:hover": { + textDecoration: "underline", + }, + }, +}); + export const ChartPreviewInner = ({ dataSetIri, dataSource, @@ -46,9 +64,9 @@ export const ChartPreviewInner = ({ dataSetIri: string; dataSource: DataSource; }) => { - const [state] = useConfiguratorState(); + const [state, dispatch] = useConfiguratorState(); const locale = useLocale(); - + const classes = useStyles(); const [{ data: metaData }] = useDataCubeMetadataQuery({ variables: { iri: dataSetIri, @@ -98,9 +116,15 @@ export const ChartPreviewInner = ({ + dispatch({ + type: "ACTIVE_FIELD_CHANGED", + value: "title", + }) + } > {state.meta.title[locale] === "" ? ( [ Title ] @@ -118,11 +142,17 @@ export const ChartPreviewInner = ({ + dispatch({ + type: "ACTIVE_FIELD_CHANGED", + value: "description", + }) + } > {state.meta.description[locale] === "" ? ( [ Description ] From 1228afcc35ee6a8e3b9329d8e9ab9ccebcb4067f Mon Sep 17 00:00:00 2001 From: Patrick Browne Date: Tue, 8 Nov 2022 11:48:38 +0100 Subject: [PATCH 12/34] feat: Improve gutterBottom for section titles and rename collapse property --- .../components/chart-annotations-selector.tsx | 2 +- .../components/chart-annotator.tsx | 8 ++- .../components/chart-configurator.tsx | 12 ++--- .../components/chart-controls/section.tsx | 52 +++++++++++-------- .../interactive-filters-config-options.tsx | 8 +-- .../interactive-filters-configurator.tsx | 6 ++- .../table/table-chart-configurator.tsx | 4 +- 7 files changed, 55 insertions(+), 37 deletions(-) diff --git a/app/configurator/components/chart-annotations-selector.tsx b/app/configurator/components/chart-annotations-selector.tsx index 89f5a33cc..3152f9fd2 100644 --- a/app/configurator/components/chart-annotations-selector.tsx +++ b/app/configurator/components/chart-annotations-selector.tsx @@ -34,7 +34,7 @@ const TitleAndDescriptionOptions = ({ } return ( - + {getFieldLabel(activeField)} diff --git a/app/configurator/components/chart-annotator.tsx b/app/configurator/components/chart-annotator.tsx index 349344cc3..48bc9aa2e 100644 --- a/app/configurator/components/chart-annotator.tsx +++ b/app/configurator/components/chart-annotator.tsx @@ -43,8 +43,12 @@ const WarnTitleDescription = () => { export const TitleAndDescriptionConfigurator = () => { return ( - - }> + + } + > Annotate diff --git a/app/configurator/components/chart-configurator.tsx b/app/configurator/components/chart-configurator.tsx index 562cd56c3..7d0d4b50e 100644 --- a/app/configurator/components/chart-configurator.tsx +++ b/app/configurator/components/chart-configurator.tsx @@ -536,16 +536,16 @@ export const ChartConfigurator = ({ return ( <> - - + + Chart Type - - + + Chart Options {filterDimensions.length === 0 && addableDimensions.length === 0 ? null : ( - - + + Filters{" "} {fetching ? ( ((theme) => ({ root: { @@ -54,11 +55,20 @@ const useSectionTitleStyles = makeStyles< alignItems: "center", width: "100%", padding: theme.spacing(4), - paddingBottom: ({ sectionOpen }) => - sectionOpen ? theme.spacing(2) : theme.spacing(4), + paddingBottom: theme.spacing(4), + marginBottom: ({ gutterBottom }) => (gutterBottom ? 0 : -theme.spacing(2)), transition: "padding-bottom 300ms ease", border: "none", justifyContent: "flex-start", + "&:hover": { + cursor: ({ collapse }) => (collapse ? "pointer" : "initial"), + backgroundColor: ({ collapse }) => + collapse ? theme.palette.grey[200] : "transparent", + + "& $icon": { + color: theme.palette.grey[900], + }, + }, }, text: { "& > svg:first-of-type": { @@ -72,8 +82,7 @@ const useSectionTitleStyles = makeStyles< }, icon: { justifySelf: "flex-end", - display: "inline-block", - marginRight: theme.spacing(-1), + color: theme.palette.grey[600], }, })); @@ -82,7 +91,7 @@ const ControlSectionContext = React.createContext({ isOpen: false, close: () => {}, setOpen: (_v: boolean | ((oldV: boolean) => boolean)) => {}, - disableCollapse: false as boolean | undefined, + collapse: true as boolean | undefined, }); export const ControlSection = forwardRef< @@ -91,14 +100,14 @@ export const ControlSection = forwardRef< children: ReactNode; isHighlighted?: boolean; sx?: BoxProps["sx"]; - disableCollapse?: boolean; + collapse?: boolean; } & Omit, "ref"> ->(({ role, children, isHighlighted, sx, disableCollapse, ...props }, ref) => { +>(({ role, children, isHighlighted, sx, collapse = false, ...props }, ref) => { const classes = useControlSectionStyles({ isHighlighted }); const disclosure = useDisclosure(true); const ctx = useMemo( - () => ({ ...disclosure, disableCollapse }), - [disableCollapse, disclosure] + () => ({ ...disclosure, collapse }), + [collapse, disclosure] ); return ( @@ -181,6 +190,7 @@ export const SectionTitle = ({ children, sx, right, + gutterBottom = true, }: { color?: string; iconName?: IconName; @@ -189,29 +199,29 @@ export const SectionTitle = ({ children: ReactNode; sx?: TypographyProps["sx"]; right?: React.ReactNode; + gutterBottom?: boolean; }) => { - const { setOpen, isOpen, disableCollapse } = useControlSectionContext(); + const { setOpen, isOpen, collapse } = useControlSectionContext(); const classes = useSectionTitleStyles({ disabled, color, sectionOpen: isOpen, + gutterBottom, + collapse, }); return ( -
+
setOpen((v) => !v) : undefined} + > {iconName ? : null} {children} {right} - {disableCollapse ? null : ( - setOpen((v) => !v)} - > - {isOpen ? : } - - )} + + {collapse ? isOpen ? : : null} +
); }; diff --git a/app/configurator/interactive-filters/interactive-filters-config-options.tsx b/app/configurator/interactive-filters/interactive-filters-config-options.tsx index b93813a69..6ed3a4d23 100644 --- a/app/configurator/interactive-filters/interactive-filters-config-options.tsx +++ b/app/configurator/interactive-filters/interactive-filters-config-options.tsx @@ -82,7 +82,7 @@ export const InteractiveFiltersOptions = ({ const component = allComponents.find((d) => d.iri === componentIri); return ( - + {component?.label} d.iri === componentIri); return ( - + {component?.label} @@ -110,7 +110,7 @@ export const InteractiveFiltersOptions = ({ ); } else if (activeField === "timeSlider") { return ( - + Time slider @@ -123,7 +123,7 @@ export const InteractiveFiltersOptions = ({ ); } else if (activeField === "dataFilters") { return ( - + Data filters diff --git a/app/configurator/interactive-filters/interactive-filters-configurator.tsx b/app/configurator/interactive-filters/interactive-filters-configurator.tsx index 431c73699..08fa60a9f 100644 --- a/app/configurator/interactive-filters/interactive-filters-configurator.tsx +++ b/app/configurator/interactive-filters/interactive-filters-configurator.tsx @@ -89,8 +89,12 @@ export const InteractiveFiltersConfigurator = ({ - + Interactive Filters diff --git a/app/configurator/table/table-chart-configurator.tsx b/app/configurator/table/table-chart-configurator.tsx index 5bca6892d..81e5a535c 100644 --- a/app/configurator/table/table-chart-configurator.tsx +++ b/app/configurator/table/table-chart-configurator.tsx @@ -118,8 +118,8 @@ export const ChartConfiguratorTable = ({ return ( <> - - + + Chart Type From 06cfd04898e1097c04118cad979a239918fcda3e Mon Sep 17 00:00:00 2001 From: Patrick Browne Date: Tue, 8 Nov 2022 11:48:59 +0100 Subject: [PATCH 13/34] fix: Can change description/title in configuring step --- app/configurator/configurator-state.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/configurator/configurator-state.tsx b/app/configurator/configurator-state.tsx index 422e431e3..e8b426268 100644 --- a/app/configurator/configurator-state.tsx +++ b/app/configurator/configurator-state.tsx @@ -1231,7 +1231,7 @@ const reducer: Reducer = ( return draft; case "CHART_DESCRIPTION_CHANGED": - if (draft.state === "DESCRIBING_CHART") { + if (draft.state === "CONFIGURING_CHART") { setWith(draft, `meta.${action.value.path}`, action.value.value, Object); } return draft; From bb84b2f05edefd7debebaa0e235e512fafcf7e23 Mon Sep 17 00:00:00 2001 From: Patrick Browne Date: Tue, 8 Nov 2022 11:49:19 +0100 Subject: [PATCH 14/34] fix: Ability to click on page while configurator drawer is opened --- app/configurator/components/drawer.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/configurator/components/drawer.tsx b/app/configurator/components/drawer.tsx index 6c5e47831..8f0fa45fb 100644 --- a/app/configurator/components/drawer.tsx +++ b/app/configurator/components/drawer.tsx @@ -2,6 +2,9 @@ import { Drawer as MuiDrawer } from "@mui/material"; import { styled } from "@mui/material/styles"; export const ConfiguratorDrawer = styled(MuiDrawer)(({ theme }) => ({ + "&": { + position: "static", + }, "& > .MuiPaper-root": { top: 95.5, bottom: 0, From a97319ce79ccabd5b584f6a9d4dfc58a354dc960 Mon Sep 17 00:00:00 2001 From: Patrick Browne Date: Tue, 8 Nov 2022 11:49:35 +0100 Subject: [PATCH 15/34] fix: Styling for drawer --- app/configurator/components/drawer.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/configurator/components/drawer.tsx b/app/configurator/components/drawer.tsx index 8f0fa45fb..6bccf30cd 100644 --- a/app/configurator/components/drawer.tsx +++ b/app/configurator/components/drawer.tsx @@ -6,9 +6,11 @@ export const ConfiguratorDrawer = styled(MuiDrawer)(({ theme }) => ({ position: "static", }, "& > .MuiPaper-root": { - top: 95.5, + top: 96, bottom: 0, height: "auto", borderLeft: `1px ${theme.palette.divider} solid`, + borderRight: `1px ${theme.palette.divider} solid`, + boxShadow: "none", }, })); From 2a2fd6e64ac6c1acc0ad0ea4c08019f81e82bf8b Mon Sep 17 00:00:00 2001 From: Patrick Browne Date: Tue, 8 Nov 2022 12:06:11 +0100 Subject: [PATCH 16/34] feat: Add correct gutterBottom + collapse to table chart configurator --- .../chart-controls/drag-and-drop-tab.tsx | 4 +-- .../table/table-chart-configurator.tsx | 7 ++--- .../table/table-chart-sorting-options.tsx | 27 ++++++++++--------- 3 files changed, 21 insertions(+), 17 deletions(-) diff --git a/app/configurator/components/chart-controls/drag-and-drop-tab.tsx b/app/configurator/components/chart-controls/drag-and-drop-tab.tsx index 12dbf9892..84522893c 100644 --- a/app/configurator/components/chart-controls/drag-and-drop-tab.tsx +++ b/app/configurator/components/chart-controls/drag-and-drop-tab.tsx @@ -56,8 +56,8 @@ export const TabDropZone = ({ {({ innerRef, placeholder }, { isDraggingOver }) => { return ( - - {title} + + {title} - - + + + Table Options ((theme) => ({ borderTopStyle: "solid", borderTopWidth: 1, }, + sortingItemBox: { + "&:first-of-type $sortingItemContainer": { + borderTopWidth: 0, + }, + }, selectWrapper: { color: theme.palette.grey[800], lineHeight: "1rem", @@ -80,6 +85,14 @@ const useStyles = makeStyles((theme) => ({ color: theme.palette.secondary.main, }, }, + icon: { + width: 24, + height: 24, + position: "absolute", + top: "50%", + right: 2, + marginTop: -12, + }, })); const TableSortingOptionItem = ({ @@ -325,17 +338,6 @@ const ChangeTableSortingOption = ({ ); }; -const useTableSortingOptionsStyles = makeStyles({ - icon: { - width: 24, - height: 24, - position: "absolute", - top: "50%", - right: 2, - marginTop: -12, - }, -}); - export const TableSortingOptions = ({ state, dataSetMetadata, @@ -345,7 +347,7 @@ export const TableSortingOptions = ({ }) => { const [, dispatch] = useConfiguratorState(); const { activeField, chartConfig } = state; - const classes = useTableSortingOptionsStyles(); + const classes = useStyles(); const onDragEnd = useCallback( ({ source, destination }) => { @@ -407,6 +409,7 @@ export const TableSortingOptions = ({ position: "relative", boxShadow: isDragging ? "tooltip" : undefined, }} + className={classes.sortingItemBox} style={{ ...draggableProps.style, }} From 9ac95f5e921de605396faced5bb3f464c2d7d370 Mon Sep 17 00:00:00 2001 From: Patrick Browne Date: Tue, 8 Nov 2022 12:16:01 +0100 Subject: [PATCH 17/34] feat: Use control section skeleton for interactive filters --- .../components/chart-controls/section.tsx | 18 ++++++++++++---- .../interactive-filters-configurator.tsx | 21 +++++++++++++++++-- 2 files changed, 33 insertions(+), 6 deletions(-) diff --git a/app/configurator/components/chart-controls/section.tsx b/app/configurator/components/chart-controls/section.tsx index 55459c601..8c53c7a70 100644 --- a/app/configurator/components/chart-controls/section.tsx +++ b/app/configurator/components/chart-controls/section.tsx @@ -15,6 +15,7 @@ import { HTMLProps, ReactNode, useContext, + useEffect, useMemo, } from "react"; import React from "react"; @@ -109,6 +110,11 @@ export const ControlSection = forwardRef< () => ({ ...disclosure, collapse }), [collapse, disclosure] ); + useEffect(() => { + if (isHighlighted) { + disclosure.setOpen(true); + } + }, [disclosure, isHighlighted]); return ( ["sx"]; + showTitle?: boolean; }) => ( - - - {" "} + {showTitle ? ( + + + + ) : null} ); } else { - return ; + return ( + + + + Interactive Filters + + + + + + ); } }; From a8bc8d8028a82c5eda16bf09643555d6d5d586ff Mon Sep 17 00:00:00 2001 From: Patrick Browne Date: Tue, 8 Nov 2022 12:30:13 +0100 Subject: [PATCH 18/34] feat: Use correct icon for chart annotator --- app/configurator/components/chart-annotator.tsx | 8 ++++---- app/icons/components/IcExclamation.tsx | 16 ++++++++++++++++ app/icons/svg/ic_exclamation.svg | 3 +++ 3 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 app/icons/components/IcExclamation.tsx create mode 100644 app/icons/svg/ic_exclamation.svg diff --git a/app/configurator/components/chart-annotator.tsx b/app/configurator/components/chart-annotator.tsx index 48bc9aa2e..97f0ffbfd 100644 --- a/app/configurator/components/chart-annotator.tsx +++ b/app/configurator/components/chart-annotator.tsx @@ -10,7 +10,7 @@ import { import { AnnotatorTabField } from "@/configurator/components/field"; import { getFieldLabel } from "@/configurator/components/field-i18n"; import { InteractiveFiltersConfigurator } from "@/configurator/interactive-filters/interactive-filters-configurator"; -import SvgIcWarning from "@/icons/components/IcWarning"; +import SvgIcExclamation from "@/icons/components/IcExclamation"; import { useConfiguratorState } from "@/src"; import { ConfiguratorStateConfiguringChart } from "../config-types"; @@ -30,12 +30,12 @@ const WarnTitleDescription = () => { arrow title={ - Your chart has no title or description. + Please add a title or description. } > - - + + ); diff --git a/app/icons/components/IcExclamation.tsx b/app/icons/components/IcExclamation.tsx new file mode 100644 index 000000000..6b6a05b7f --- /dev/null +++ b/app/icons/components/IcExclamation.tsx @@ -0,0 +1,16 @@ +import * as React from "react"; + +function SvgIcExclamation(props: React.SVGProps) { + return ( + + + + ); +} + +export default SvgIcExclamation; + diff --git a/app/icons/svg/ic_exclamation.svg b/app/icons/svg/ic_exclamation.svg new file mode 100644 index 000000000..9a91a3615 --- /dev/null +++ b/app/icons/svg/ic_exclamation.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file From 8791afa40c89ed1fafbe14269945c7bcd4eb3f13 Mon Sep 17 00:00:00 2001 From: Patrick Browne Date: Tue, 8 Nov 2022 12:16:14 +0100 Subject: [PATCH 19/34] feat: Use translated string for Back to preview and Checkout to publishing --- app/components/chart-selection-tabs.tsx | 5 +++-- app/configurator/components/configurator.tsx | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/components/chart-selection-tabs.tsx b/app/components/chart-selection-tabs.tsx index 09c822650..acc013600 100644 --- a/app/components/chart-selection-tabs.tsx +++ b/app/components/chart-selection-tabs.tsx @@ -1,3 +1,4 @@ +import { Trans } from "@lingui/macro"; import { Box, Popover, Tab, Tabs, Theme, Button } from "@mui/material"; import { makeStyles } from "@mui/styles"; import React, { @@ -159,7 +160,7 @@ const TabsInner = ({ onActionButtonClick?: (e: React.MouseEvent) => void; }) => { return ( - + {/* TODO: Generate dynamically when chart composition is implemented */} ); diff --git a/app/configurator/components/configurator.tsx b/app/configurator/components/configurator.tsx index 4548c9a8b..28ccaf564 100644 --- a/app/configurator/components/configurator.tsx +++ b/app/configurator/components/configurator.tsx @@ -1,3 +1,4 @@ +import { Trans } from "@lingui/macro"; import Box from "@mui/material/Box"; import Button, { ButtonProps } from "@mui/material/Button"; import { useRouter } from "next/router"; @@ -102,7 +103,9 @@ const ConfigureChartStep = () => { }} > - Back to datasets + + Back to preview + {state.chartConfig.chartType === "table" ? ( From 1413cf0c75943c79d4a81c60ec82714f6c738529 Mon Sep 17 00:00:00 2001 From: Patrick Browne Date: Tue, 8 Nov 2022 12:40:29 +0100 Subject: [PATCH 20/34] feat: Remove unused stepper --- app/configurator/components/stepper.tsx | 233 ------------------------ app/docs/steps.docs.tsx | 67 ------- app/pages/docs/index.tsx | 6 - 3 files changed, 306 deletions(-) delete mode 100644 app/configurator/components/stepper.tsx delete mode 100644 app/docs/steps.docs.tsx diff --git a/app/configurator/components/stepper.tsx b/app/configurator/components/stepper.tsx deleted file mode 100644 index eefc256d8..000000000 --- a/app/configurator/components/stepper.tsx +++ /dev/null @@ -1,233 +0,0 @@ -import { Trans } from "@lingui/macro"; -import { Button, Theme, Typography } from "@mui/material"; -import { makeStyles } from "@mui/styles"; -import { useRouter } from "next/router"; -import React, { ReactNode, useEffect } from "react"; - -import Flex from "@/components/flex"; -import { useHeaderProgress } from "@/components/header"; -import { - canTransitionToNextStep, - canTransitionToPreviousStep, - useConfiguratorState, -} from "@/configurator"; -import { useDataCubeMetadataWithComponentValuesQuery } from "@/graphql/query-hooks"; -import SvgIcChevronLeft from "@/icons/components/IcChevronLeft"; -import SvgIcChevronRight from "@/icons/components/IcChevronRight"; -import { useLocale } from "@/src"; -import useEvent from "@/utils/use-event"; - -export type StepStatus = "past" | "current" | "future"; - -const steps = ["CONFIGURING_CHART", "DESCRIBING_CHART"] as const; -type StepState = typeof steps[number]; - -const useStyles = makeStyles((theme: Theme) => ({ - root: { - alignItems: "center", - position: "relative", - - backgroundColor: theme.palette.grey[100], - borderBottomWidth: "1px", - borderBottomStyle: "solid", - borderBottomColor: theme.palette.grey[500], - overflow: "hidden", - }, - container: { - width: "100%", - justifyContent: "center", - alignItems: "center", - padding: `0 ${theme.spacing(2)}`, - minHeight: 56, - }, -})); - -export const StepperDumb = ({ - goPrevious, - goNext, - state, - data, -}: { - goPrevious: () => void; - goNext: () => void; - state: ReturnType[0]; - data: ReturnType< - typeof useDataCubeMetadataWithComponentValuesQuery - >[0]["data"]; -}) => { - const classes = useStyles(); - const nextDisabled = - !canTransitionToNextStep(state, data?.dataCubeByIri) || - state.state === "PUBLISHING"; - const previousDisabled = - !canTransitionToPreviousStep(state) || state.state === "PUBLISHING"; - - const previousLabel = Back; - const nextLabel = - state.state === "DESCRIBING_CHART" || state.state === "PUBLISHING" ? ( - Publish this visualization - ) : ( - Next - ); - - const currentStepIndex = steps.indexOf(state.state as $IntentionalAny); - const { value: progress, setValue: setProgress } = useHeaderProgress(); - useEffect(() => { - const run = async () => { - if ( - (currentStepIndex === 0 || currentStepIndex === -1) && - progress === 100 - ) { - setProgress(0); - await new Promise((resolve) => setTimeout(resolve, 100)); - } - setProgress( - Math.round(((currentStepIndex + 1) / (steps.length + 1)) * 100) - ); - }; - run(); - return () => { - setProgress(100); - }; - }, [currentStepIndex, setProgress, progress]); - - return ( - - {/* Stepper container */} - - - - - - - - - - - - - - ); -}; - -export const Stepper = ({ dataSetIri }: { dataSetIri?: string }) => { - const [state, dispatch] = useConfiguratorState(); - const locale = useLocale(); - const [{ data }] = useDataCubeMetadataWithComponentValuesQuery({ - variables: { - iri: dataSetIri ?? "", - sourceType: state.dataSource.type, - sourceUrl: state.dataSource.url, - locale, - }, - pause: !dataSetIri, - }); - const goNext = useEvent(() => { - if (data?.dataCubeByIri) { - dispatch({ - type: "STEP_NEXT", - dataSetMetadata: data?.dataCubeByIri, - }); - } - }); - - const router = useRouter(); - - const goPrevious = useEvent(() => { - if (state.state === "CONFIGURING_CHART") { - router.push( - { - pathname: `/browse/dataset/${encodeURIComponent(state.dataSet)}`, - }, - undefined, - { shallow: true } - ); - } else { - dispatch({ - type: "STEP_PREVIOUS", - }); - } - }); - - return ( - - ); -}; - -export const CallToAction = ({ - stepState, -}: { - stepState: StepState | undefined; -}) => { - switch (stepState) { - case "CONFIGURING_CHART": - return ( - - Customize your visualization by using the filter and color - segmentation options in the sidebars. - - } - /> - ); - case "DESCRIBING_CHART": - return ( - - Before publishing, add a title and description to your chart, and - choose which elements should be interactive. - - } - /> - ); - } - - return null; -}; - -const CallToActionText = ({ label }: { label: ReactNode }) => { - return ( - - {label} - - ); -}; diff --git a/app/docs/steps.docs.tsx b/app/docs/steps.docs.tsx deleted file mode 100644 index b72bb93b7..000000000 --- a/app/docs/steps.docs.tsx +++ /dev/null @@ -1,67 +0,0 @@ -import { markdown, ReactSpecimen } from "catalog"; - -import { HeaderBorder, HeaderProgressProvider } from "@/components/header"; -import { - ConfiguratorStateConfiguringChart, - ConfiguratorStateDescribingChart, -} from "@/configurator"; -import { StepperDumb } from "@/configurator/components/stepper"; -import { DataCubeMetadataWithComponentValuesQuery } from "@/graphql/query-hooks"; - -const mockData = { - __typename: "Query", - dataCubeByIri: { dimensions: [{}] }, -} as DataCubeMetadataWithComponentValuesQuery; - -export default () => markdown` -> The "stepper" is used to guide users through the steps of creating a visualization. - - -Configuring step - -${( - - - - {}} - goNext={() => {}} - data={mockData} - state={ - { state: "CONFIGURING_CHART" } as ConfiguratorStateConfiguringChart - } - /> - - -)} - -Describing step - - ${( - - - - {}} - goNext={() => {}} - data={mockData} - state={ - { state: "DESCRIBING_CHART" } as ConfiguratorStateDescribingChart - } - /> - - - )} - - - ## How to use - -~~~ -import { Step } from "../components/step"; - - - Primary Step - -~~~ - -`; diff --git a/app/pages/docs/index.tsx b/app/pages/docs/index.tsx index 9ecc7c363..5f4096d6f 100644 --- a/app/pages/docs/index.tsx +++ b/app/pages/docs/index.tsx @@ -181,12 +181,6 @@ const pages: ConfigPageOrGroup[] = [ title: "Publish actions", content: require("@/docs/publish-actions.docs"), }, - - { - path: "/components/steps", - title: "Stepper", - content: require("@/docs/steps.docs"), - }, { path: "/components/table", title: "Preview Table", From 65968b0d2b9e84e367f855553f15e7120a9d3a03 Mon Sep 17 00:00:00 2001 From: Patrick Browne Date: Tue, 8 Nov 2022 12:40:56 +0100 Subject: [PATCH 21/34] feat: Add chevron right to publish chart --- app/components/chart-selection-tabs.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/components/chart-selection-tabs.tsx b/app/components/chart-selection-tabs.tsx index acc013600..77b5baa8c 100644 --- a/app/components/chart-selection-tabs.tsx +++ b/app/components/chart-selection-tabs.tsx @@ -20,6 +20,7 @@ import { import { ChartTypeSelector } from "@/configurator/components/chart-type-selector"; import { getIconName } from "@/configurator/components/ui-helpers"; import { Icon, IconName } from "@/icons"; +import SvgIcChevronRight from "@/icons/components/IcChevronRight"; import useEvent from "@/utils/use-event"; import Flex from "./flex"; @@ -171,8 +172,12 @@ const TabsInner = ({ } /> - ); From 2788e6665b7140f3e725d9de2a8628da54f3e54d Mon Sep 17 00:00:00 2001 From: Patrick Browne Date: Tue, 8 Nov 2022 12:41:08 +0100 Subject: [PATCH 22/34] feat: Remove describing chart step --- app/components/chart-panel.tsx | 5 +- app/components/chart-preview.tsx | 1 - app/components/chart-selection-tabs.tsx | 5 +- .../components/chart-configurator.tsx | 6 +-- .../components/chart-type-selector.tsx | 6 +-- .../components/empty-right-panel.tsx | 13 +---- app/configurator/config-form.tsx | 2 +- app/configurator/config-types.ts | 10 ---- app/configurator/configurator-state.tsx | 50 +++---------------- .../interactive-filters/editor-time-brush.tsx | 10 ++-- 10 files changed, 21 insertions(+), 87 deletions(-) diff --git a/app/components/chart-panel.tsx b/app/components/chart-panel.tsx index 7f2ab2ff6..ac8d087eb 100644 --- a/app/components/chart-panel.tsx +++ b/app/components/chart-panel.tsx @@ -6,7 +6,6 @@ import Flex from "@/components/flex"; import { ChartType, ConfiguratorStateConfiguringChart, - ConfiguratorStateDescribingChart, ConfiguratorStatePublishing, } from "@/configurator"; import { useConfiguratorState } from "@/src"; @@ -18,9 +17,7 @@ type ChartPanelProps = { children: ReactNode } & BoxProps; export const ChartPanelConfigurator = (props: ChartPanelProps) => { // This type of chart panel can only appear for below steps. const [state] = useConfiguratorState() as unknown as [ - | ConfiguratorStateConfiguringChart - | ConfiguratorStateDescribingChart - | ConfiguratorStatePublishing + ConfiguratorStateConfiguringChart | ConfiguratorStatePublishing ]; return ( diff --git a/app/components/chart-preview.tsx b/app/components/chart-preview.tsx index 8c2bba25b..c241ebafe 100644 --- a/app/components/chart-preview.tsx +++ b/app/components/chart-preview.tsx @@ -109,7 +109,6 @@ export const ChartPreviewInner = ({ )} {(state.state === "CONFIGURING_CHART" || - state.state === "DESCRIBING_CHART" || state.state === "PUBLISHING") && ( <> <> diff --git a/app/components/chart-selection-tabs.tsx b/app/components/chart-selection-tabs.tsx index 77b5baa8c..4e92cb179 100644 --- a/app/components/chart-selection-tabs.tsx +++ b/app/components/chart-selection-tabs.tsx @@ -13,7 +13,6 @@ import React, { import { ChartType, ConfiguratorStateConfiguringChart, - ConfiguratorStateDescribingChart, ConfiguratorStatePublishing, useConfiguratorState, } from "@/configurator"; @@ -97,9 +96,7 @@ const useStyles = makeStyles((theme) => ({ const TabsEditable = ({ chartType }: { chartType: ChartType }) => { const [configuratorState] = useConfiguratorState() as unknown as [ - | ConfiguratorStateConfiguringChart - | ConfiguratorStateDescribingChart - | ConfiguratorStatePublishing + ConfiguratorStateConfiguringChart | ConfiguratorStatePublishing ]; const [tabsState, setTabsState] = useTabsState(); const [popoverAnchorEl, setPopoverAnchorEl] = useState( diff --git a/app/configurator/components/chart-configurator.tsx b/app/configurator/components/chart-configurator.tsx index 7d0d4b50e..ae17cc7ab 100644 --- a/app/configurator/components/chart-configurator.tsx +++ b/app/configurator/components/chart-configurator.tsx @@ -27,7 +27,6 @@ import { chartConfigOptionsUISpec } from "@/charts/chart-config-ui-options"; import { ChartConfig, ConfiguratorStateConfiguringChart, - ConfiguratorStateDescribingChart, ConfiguratorStatePublishing, isMapConfig, OptionGroup, @@ -189,10 +188,7 @@ const orderedIsEqual = ( const useEnsurePossibleFilters = ({ state, }: { - state: - | ConfiguratorStateConfiguringChart - | ConfiguratorStateDescribingChart - | ConfiguratorStatePublishing; + state: ConfiguratorStateConfiguringChart | ConfiguratorStatePublishing; }) => { const [, dispatch] = useConfiguratorState(); const [fetching, setFetching] = useState(false); diff --git a/app/configurator/components/chart-type-selector.tsx b/app/configurator/components/chart-type-selector.tsx index 62405ef8d..6b3146b70 100644 --- a/app/configurator/components/chart-type-selector.tsx +++ b/app/configurator/components/chart-type-selector.tsx @@ -18,7 +18,6 @@ import { useLocale } from "@/locales/use-locale"; import { ChartType, ConfiguratorStateConfiguringChart, - ConfiguratorStateDescribingChart, ConfiguratorStatePublishing, } from "../config-types"; @@ -104,10 +103,7 @@ export const ChartTypeSelector = ({ sx, ...props }: { - state: - | ConfiguratorStateConfiguringChart - | ConfiguratorStateDescribingChart - | ConfiguratorStatePublishing; + state: ConfiguratorStateConfiguringChart | ConfiguratorStatePublishing; showHelp?: boolean; sx?: BoxProps["sx"]; } & BoxProps) => { diff --git a/app/configurator/components/empty-right-panel.tsx b/app/configurator/components/empty-right-panel.tsx index 4e9d0ea94..60436d727 100644 --- a/app/configurator/components/empty-right-panel.tsx +++ b/app/configurator/components/empty-right-panel.tsx @@ -2,15 +2,12 @@ import { Trans } from "@lingui/macro"; import { Typography } from "@mui/material"; import { ReactNode } from "react"; -import { - ConfiguratorStateConfiguringChart, - ConfiguratorStateDescribingChart, -} from "@/configurator"; +import { ConfiguratorStateConfiguringChart } from "@/configurator"; export const EmptyRightPanel = ({ state, }: { - state: ConfiguratorStateConfiguringChart | ConfiguratorStateDescribingChart; + state: ConfiguratorStateConfiguringChart; }) => ( {getRightPanelHint(state.state)} @@ -26,12 +23,6 @@ const getRightPanelHint = (state: string): ReactNode => { its options. ); - case "DESCRIBING_CHART": - return ( - - Select an annotation field in the left panel. - - ); default: return "blabla"; } diff --git a/app/configurator/config-form.tsx b/app/configurator/config-form.tsx index a116b33a1..9eaf0baaa 100644 --- a/app/configurator/config-form.tsx +++ b/app/configurator/config-form.tsx @@ -376,7 +376,7 @@ export const useChartType = (): { }); const value = - state.state === "CONFIGURING_CHART" || state.state === "DESCRIBING_CHART" + state.state === "CONFIGURING_CHART" ? get(state, "chartConfig.chartType") : ""; diff --git a/app/configurator/config-types.ts b/app/configurator/config-types.ts index adf78d7f7..e464a2af7 100644 --- a/app/configurator/config-types.ts +++ b/app/configurator/config-types.ts @@ -832,12 +832,6 @@ const ConfiguratorStateConfiguringChart = t.intersection([ }), Config, ]); -const ConfiguratorStateDescribingChart = t.intersection([ - t.type({ - state: t.literal("DESCRIBING_CHART"), - }), - Config, -]); const ConfiguratorStatePublishing = t.intersection([ t.type({ state: t.literal("PUBLISHING"), @@ -851,9 +845,6 @@ export type ConfiguratorStateSelectingDataSet = t.TypeOf< export type ConfiguratorStateConfiguringChart = t.TypeOf< typeof ConfiguratorStateConfiguringChart >; -export type ConfiguratorStateDescribingChart = t.TypeOf< - typeof ConfiguratorStateDescribingChart ->; export type ConfiguratorStatePublishing = t.TypeOf< typeof ConfiguratorStatePublishing >; @@ -861,7 +852,6 @@ const ConfiguratorState = t.union([ ConfiguratorStateInitial, ConfiguratorStateSelectingDataSet, ConfiguratorStateConfiguringChart, - ConfiguratorStateDescribingChart, ConfiguratorStatePublishing, ]); diff --git a/app/configurator/configurator-state.tsx b/app/configurator/configurator-state.tsx index e8b426268..71fa73bcb 100644 --- a/app/configurator/configurator-state.tsx +++ b/app/configurator/configurator-state.tsx @@ -32,7 +32,6 @@ import { DEFAULT_FIXED_COLOR_FIELD } from "@/charts/map/constants"; import { mapValueIrisToColor } from "@/configurator/components/ui-helpers"; import { ConfiguratorStateConfiguringChart, - ConfiguratorStateDescribingChart, DataSource, GenericField, ImputationType, @@ -295,7 +294,7 @@ const emptyState: ConfiguratorStateSelectingDataSet = { }; const getCachedCubeMetadataWithComponentValues = ( - draft: ConfiguratorStateConfiguringChart | ConfiguratorStateDescribingChart, + draft: ConfiguratorStateConfiguringChart, locale: Locale ) => { const query = client.readQuery< @@ -576,17 +575,12 @@ const transitionStepNext = ( } break; case "CONFIGURING_CHART": - return { - ...draft, - activeField: undefined, - state: "DESCRIBING_CHART", - }; - case "DESCRIBING_CHART": return { ...draft, activeField: undefined, state: "PUBLISHING", }; + case "INITIAL": case "PUBLISHING": break; @@ -612,8 +606,6 @@ export const canTransitionToNextStep = ( case "SELECTING_DATASET": return state.dataSet !== undefined; case "CONFIGURING_CHART": - case "DESCRIBING_CHART": - // These are all interchangeable in terms of validity return true; } @@ -628,10 +620,8 @@ const getPreviousState = ( return state; case "CONFIGURING_CHART": return "SELECTING_DATASET"; - case "DESCRIBING_CHART": - return "CONFIGURING_CHART"; case "PUBLISHING": - return "DESCRIBING_CHART"; + return "CONFIGURING_CHART"; default: return "SELECTING_DATASET"; } @@ -662,12 +652,6 @@ const transitionStepPrevious = ( activeField: undefined, state: stepTo, }; - case "DESCRIBING_CHART": - return { - ...draft, - activeField: undefined, - state: stepTo, - }; default: return draft; } @@ -1066,10 +1050,7 @@ export const handleInteractiveFilterChanged = ( { type: "INTERACTIVE_FILTER_CHANGED" } > ) => { - if ( - draft.state === "CONFIGURING_CHART" || - draft.state === "DESCRIBING_CHART" - ) { + if (draft.state === "CONFIGURING_CHART") { setWith( draft, "chartConfig.interactiveFiltersConfig", @@ -1084,10 +1065,7 @@ export const handleInteractiveFilterChanged = ( export const handleInteractiveFilterTimeSliderReset = ( draft: ConfiguratorState ) => { - if ( - draft.state === "CONFIGURING_CHART" || - draft.state === "DESCRIBING_CHART" - ) { + if (draft.state === "CONFIGURING_CHART") { if (draft.chartConfig.interactiveFiltersConfig) { draft.chartConfig.interactiveFiltersConfig.timeSlider.componentIri = ""; } @@ -1115,10 +1093,7 @@ const reducer: Reducer = ( draft.dataSource = action.value; return draft; case "CHART_TYPE_CHANGED": - if ( - draft.state === "CONFIGURING_CHART" || - draft.state === "DESCRIBING_CHART" - ) { + if (draft.state === "CONFIGURING_CHART") { const { locale, chartType } = action.value; const metadata = getCachedCubeMetadataWithComponentValues( draft, @@ -1145,11 +1120,9 @@ const reducer: Reducer = ( return draft; case "ACTIVE_FIELD_CHANGED": - if ( - draft.state === "CONFIGURING_CHART" || - draft.state === "DESCRIBING_CHART" - ) + if (draft.state === "CONFIGURING_CHART") { draft.activeField = action.value; + } return draft; case "CHART_FIELD_CHANGED": @@ -1568,7 +1541,6 @@ const ConfiguratorStateProviderInternal = ({ try { switch (state.state) { case "CONFIGURING_CHART": - case "DESCRIBING_CHART": if (chartId === "new") { const newChartId = createChartId(); window.localStorage.setItem( @@ -1724,9 +1696,3 @@ export const isConfiguring = ( ): s is ConfiguratorStateConfiguringChart => { return s.state === "CONFIGURING_CHART"; }; - -export const isDescribing = ( - s: ConfiguratorState -): s is ConfiguratorStateDescribingChart => { - return s.state === "DESCRIBING_CHART"; -}; diff --git a/app/configurator/interactive-filters/editor-time-brush.tsx b/app/configurator/interactive-filters/editor-time-brush.tsx index 1ffdbdfe1..d2c2ceb36 100644 --- a/app/configurator/interactive-filters/editor-time-brush.tsx +++ b/app/configurator/interactive-filters/editor-time-brush.tsx @@ -6,8 +6,10 @@ import React, { useCallback, useEffect, useRef } from "react"; import Flex from "@/components/flex"; import { Label } from "@/components/form"; import { parseDate } from "@/configurator/components/ui-helpers"; -import { ConfiguratorStateDescribingChart } from "@/configurator/config-types"; -import { useConfiguratorState } from "@/configurator/configurator-state"; +import { + isConfiguring, + useConfiguratorState, +} from "@/configurator/configurator-state"; import { updateInteractiveTimeRangeFilter } from "@/configurator/interactive-filters/interactive-filters-config-state"; import { useFormatFullDateAuto } from "@/formatters"; import { useTheme } from "@/themes"; @@ -42,8 +44,8 @@ export const EditorBrush = ({ // FIXME: make component responsive (currently triggers infinite loop) const brushWidth = 267; //width - MARGINS.left - MARGINS.right; - const [state, dispatch] = useConfiguratorState(); - const { chartConfig } = state as ConfiguratorStateDescribingChart; + const [state, dispatch] = useConfiguratorState(isConfiguring); + const { chartConfig } = state; const timeScale = scaleTime().domain(timeExtent).range([0, brushWidth]); From ea34643802709b306000d387963f9ba20719e080 Mon Sep 17 00:00:00 2001 From: Patrick Browne Date: Tue, 8 Nov 2022 12:46:43 +0100 Subject: [PATCH 23/34] feat: Publish button send STEP_NEXT --- app/components/chart-selection-tabs.tsx | 46 ++++++++++++++++++++----- 1 file changed, 38 insertions(+), 8 deletions(-) diff --git a/app/components/chart-selection-tabs.tsx b/app/components/chart-selection-tabs.tsx index 4e92cb179..f183e13aa 100644 --- a/app/components/chart-selection-tabs.tsx +++ b/app/components/chart-selection-tabs.tsx @@ -18,8 +18,9 @@ import { } from "@/configurator"; import { ChartTypeSelector } from "@/configurator/components/chart-type-selector"; import { getIconName } from "@/configurator/components/ui-helpers"; +import { useDataCubeMetadataWithComponentValuesQuery } from "@/graphql/query-hooks"; import { Icon, IconName } from "@/icons"; -import SvgIcChevronRight from "@/icons/components/IcChevronRight"; +import { useLocale } from "@/src"; import useEvent from "@/utils/use-event"; import Flex from "./flex"; @@ -148,6 +149,41 @@ const TabsFixed = ({ chartType }: { chartType: ChartType }) => { return ; }; +const PublishChartButton = () => { + const [state, dispatch] = useConfiguratorState(); + const { dataSet: dataSetIri } = state as + | ConfiguratorStatePublishing + | ConfiguratorStateConfiguringChart; + const locale = useLocale(); + const [{ data }] = useDataCubeMetadataWithComponentValuesQuery({ + variables: { + iri: dataSetIri ?? "", + sourceType: state.dataSource.type, + sourceUrl: state.dataSource.url, + locale, + }, + pause: !dataSetIri, + }); + const goNext = useEvent(() => { + if (data?.dataCubeByIri) { + dispatch({ + type: "STEP_NEXT", + dataSetMetadata: data?.dataCubeByIri, + }); + } + }); + + return ( + + ); +}; + const TabsInner = ({ chartType, editable, @@ -169,13 +205,7 @@ const TabsInner = ({ } /> - + ); }; From 97af247b8f2215456acefc2b6fb934eb8df105e0 Mon Sep 17 00:00:00 2001 From: Patrick Browne Date: Tue, 8 Nov 2022 12:54:13 +0100 Subject: [PATCH 24/34] fix: Keep a singleton Prisma across hot reloads --- app/db/client.ts | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/app/db/client.ts b/app/db/client.ts index b5bf6ce85..202d3a562 100644 --- a/app/db/client.ts +++ b/app/db/client.ts @@ -1,5 +1,24 @@ import { PrismaClient } from "@prisma/client"; -const prisma = new PrismaClient(); +/** + * Global Prisma client + * + * Only one instance of Prisma is kept across hot reloads to prevent + * "FATAL: sorry, too many clients already" error. + * @see https://github.com/prisma/prisma/issues/1983 + */ +let prisma: PrismaClient; + +const g = global as unknown as { prisma: PrismaClient | undefined }; + +if (process.env.NODE_ENV === "production") { + prisma = new PrismaClient(); +} else { + if (!g.prisma) { + g.prisma = new PrismaClient(); + } + + prisma = g.prisma; +} export default prisma; From 174a6181580214450ec53ab651cb7da02d082acc Mon Sep 17 00:00:00 2001 From: Patrick Browne Date: Tue, 8 Nov 2022 13:05:39 +0100 Subject: [PATCH 25/34] feat: Update messages --- app/locales/de/messages.po | 196 ++++++++++++++++++----------------- app/locales/en/messages.po | 196 ++++++++++++++++++----------------- app/locales/fr/messages.po | 205 ++++++++++++++++++------------------- app/locales/it/messages.po | 198 +++++++++++++++++------------------ 4 files changed, 405 insertions(+), 390 deletions(-) diff --git a/app/locales/de/messages.po b/app/locales/de/messages.po index ead13fa5d..3614456b5 100644 --- a/app/locales/de/messages.po +++ b/app/locales/de/messages.po @@ -13,60 +13,60 @@ msgstr "" "Language-Team: \n" "Plural-Forms: \n" -#: app/configurator/components/chart-configurator.tsx:647 +#: app/configurator/components/chart-configurator.tsx:648 msgid "Add filter" msgstr "Filter hinzufügen" -#: app/configurator/components/chart-configurator.tsx:620 +#: app/configurator/components/chart-configurator.tsx:621 msgid "Drag filters to reorganize" msgstr "Ziehen Sie die Filter per Drag & Drop, um sie neu zu organisieren" -#: app/configurator/components/chart-configurator.tsx:617 +#: app/configurator/components/chart-configurator.tsx:618 msgid "Move filter down" msgstr "Filter nach unten verschieben" -#: app/configurator/components/chart-configurator.tsx:614 +#: app/configurator/components/chart-configurator.tsx:615 msgid "Move filter up" msgstr "Filter nach oben verschieben" -#: app/configurator/components/dataset-browse.tsx:1037 -#: app/configurator/components/filters.tsx:730 +#: app/configurator/components/dataset-browse.tsx:1043 +#: app/configurator/components/filters.tsx:719 msgid "No results" msgstr "Kein Ergebnis" -#: app/components/chart-preview.tsx:128 +#: app/components/chart-preview.tsx:157 msgid "annotation.add.description" msgstr "[ Ohne Beschreibung ]" -#: app/components/chart-preview.tsx:106 +#: app/components/chart-preview.tsx:129 msgid "annotation.add.title" msgstr "[ Ohne Titel ]" -#: app/configurator/components/dataset-browse.tsx:968 +#: app/configurator/components/dataset-browse.tsx:974 msgid "browse-panel.organizations" msgstr "Organisationen" -#: app/configurator/components/dataset-browse.tsx:950 +#: app/configurator/components/dataset-browse.tsx:956 msgid "browse-panel.themes" msgstr "Kategorien" -#: app/configurator/components/dataset-preview.tsx:128 +#: app/configurator/components/dataset-preview.tsx:139 msgid "browse.dataset.create-visualization" msgstr "Visualisierung von diesem Datensatz erstellen" -#: app/configurator/components/select-dataset-step.tsx:284 +#: app/configurator/components/select-dataset-step.tsx:295 msgid "browse.datasets.all-datasets" msgstr "Alle Datensätze" -#: app/configurator/components/select-dataset-step.tsx:217 +#: app/configurator/components/select-dataset-step.tsx:189 msgid "browse.datasets.description" msgstr "Erkunden Sie die vom LINDAS Linked Data Service bereitgestellten Datensätze, indem Sie entweder nach Kategorien oder Organisationen filtern oder direkt nach bestimmten Stichworten suchen. Klicken Sie auf einen Datensatz, um detailliertere Informationen zu erhalten und Ihre eigenen Visualisierungen zu erstellen." #: app/configurator/components/stepper.tsx:65 -msgid "button.back" -msgstr "Zurück" +#~ msgid "button.back" +#~ msgstr "Zurück" -#: app/pages/v/[chartId].tsx:167 +#: app/pages/v/[chartId].tsx:166 msgid "button.copy.visualization" msgstr "Diese Visualisierung kopieren und editieren" @@ -103,15 +103,15 @@ msgstr "Kopieren" msgid "button.hint.copied" msgstr "Kopiert!" -#: app/pages/v/[chartId].tsx:152 +#: app/pages/v/[chartId].tsx:151 msgid "button.new.visualization" msgstr "Neue Visualisierung erstellen" #: app/configurator/components/stepper.tsx:70 -msgid "button.next" -msgstr "Weiter" +#~ msgid "button.next" +#~ msgstr "Weiter" -#: app/configurator/components/stepper.tsx:68 +#: app/components/chart-selection-tabs.tsx:182 msgid "button.publish" msgstr "Diese Visualisierung veröffentlichen" @@ -123,7 +123,7 @@ msgstr "Teilen" msgid "chart.map.layers.area" msgstr "Flächen" -#: app/configurator/components/chart-configurator.tsx:696 +#: app/configurator/components/chart-configurator.tsx:697 #: app/configurator/components/chart-options-selector.tsx:989 #: app/configurator/components/field-i18n.ts:31 msgid "chart.map.layers.base" @@ -183,7 +183,7 @@ msgstr "Fett" msgid "columnStyle.textStyle.regular" msgstr "Normal" -#: app/configurator/interactive-filters/editor-time-brush.tsx:168 +#: app/configurator/interactive-filters/editor-time-brush.tsx:170 msgid "controls..interactiveFilters.time.defaultSettings" msgstr "Standardeinstellung" @@ -319,33 +319,33 @@ msgstr "Beschreibung hinzufügen" msgid "controls.dimensionvalue.none" msgstr "Kein Filter" -#: app/configurator/components/filters.tsx:480 +#: app/configurator/components/filters.tsx:469 msgid "controls.filter.nb-elements" msgstr "{0} von {1}" -#: app/configurator/components/filters.tsx:414 -#: app/configurator/components/filters.tsx:658 +#: app/configurator/components/filters.tsx:403 +#: app/configurator/components/filters.tsx:647 msgid "controls.filter.select.all" msgstr "Alle auswählen" -#: app/configurator/components/filters.tsx:421 -#: app/configurator/components/filters.tsx:656 +#: app/configurator/components/filters.tsx:410 +#: app/configurator/components/filters.tsx:645 msgid "controls.filter.select.none" msgstr "Alle abwählen" -#: app/configurator/components/filters.tsx:431 +#: app/configurator/components/filters.tsx:420 msgid "controls.filters.select.filters" msgstr "Filter" -#: app/configurator/components/filters.tsx:461 +#: app/configurator/components/filters.tsx:450 msgid "controls.filters.select.refresh-colors" msgstr "Farben auffrischen" -#: app/configurator/components/filters.tsx:445 +#: app/configurator/components/filters.tsx:434 msgid "controls.filters.select.reset-colors" msgstr "Farben zurücksetzen" -#: app/configurator/components/filters.tsx:438 +#: app/configurator/components/filters.tsx:427 msgid "controls.filters.select.selected-filters" msgstr "Ausgewählte Filter" @@ -365,13 +365,13 @@ msgstr "Ziehen Sie Spalten hierher, um Gruppen zu erstellen." #~ msgid "controls.hierarchy.select" #~ msgstr "Hierarchie-Ebene auswählen" -#: app/configurator/components/empty-right-panel.tsx:24 +#: app/configurator/components/empty-right-panel.tsx:21 msgid "controls.hint.configuring.chart" msgstr "Bitte eine Designoption oder Datendimension auswählen, um diese zu bearbeiten." #: app/configurator/components/empty-right-panel.tsx:31 -msgid "controls.hint.describing.chart" -msgstr "Bitte ein Beschreibungsfeld auswählen, um dieses zu bearbeiten." +#~ msgid "controls.hint.describing.chart" +#~ msgstr "Bitte ein Beschreibungsfeld auswählen, um dieses zu bearbeiten." #: app/configurator/components/field-i18n.ts:87 msgid "controls.imputation" @@ -393,34 +393,34 @@ msgstr "-" msgid "controls.imputation.type.zeros" msgstr "Nullen" -#: app/configurator/interactive-filters/interactive-filters-configurator.tsx:117 +#: app/configurator/interactive-filters/interactive-filters-configurator.tsx:137 msgid "controls.interactive.filters.dataFilter" msgstr "Datenfilter" -#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:104 -#: app/configurator/interactive-filters/interactive-filters-configurator.tsx:97 +#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:115 +#: app/configurator/interactive-filters/interactive-filters-configurator.tsx:117 msgid "controls.interactive.filters.timeSlider" msgstr "Zeitschieber" -#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:327 +#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:375 msgid "controls.interactiveFilters.dataFilters.toggledataFilters" msgstr "Datenfilter anzeigen" -#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:77 +#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:89 msgid "controls.interactiveFilters.legend.toggleInteractiveLegend" msgstr "Filterbare Legende anzeigen" -#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:222 +#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:233 msgid "controls.interactiveFilters.time.noTimeDimension" msgstr "Keine Zeitdimension verfügbar!" -#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:197 +#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:208 msgid "controls.interactiveFilters.time.toggleTimeFilter" msgstr "Zeitfilter anzeigen" #: app/configurator/interactive-filters/interactive-filters-config-options.tsx:263 -msgid "controls.interactiveFilters.time.toggleTimeSliderFilter" -msgstr "Zeitschieber anzeigen" +#~ msgid "controls.interactiveFilters.time.toggleTimeSliderFilter" +#~ msgstr "Zeitschieber anzeigen" #: app/configurator/components/field-i18n.ts:135 msgid "controls.language.english" @@ -447,6 +447,14 @@ msgstr "Italienisch" msgid "controls.measure" msgstr "Messwert" +#: app/configurator/components/configurator.tsx:107 +msgid "controls.nav.back-to-preview" +msgstr "" + +#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:292 +msgid "controls.none" +msgstr "" + #: app/configurator/components/chart-controls/control-tab.tsx:312 msgid "controls.option.isActive" msgstr "Ein" @@ -471,11 +479,11 @@ msgstr "Suche zurücksetzen" msgid "controls.section.additional-information" msgstr "Zusätzliche Informationen" -#: app/configurator/components/chart-configurator.tsx:549 +#: app/configurator/components/chart-configurator.tsx:545 msgid "controls.section.chart.options" msgstr "Diagramm-Einstellungen" -#: app/configurator/table/table-chart-configurator.tsx:164 +#: app/configurator/table/table-chart-configurator.tsx:165 msgid "controls.section.columns" msgstr "Spalten" @@ -483,11 +491,11 @@ msgstr "Spalten" msgid "controls.section.columnstyle" msgstr "Spaltenstil" -#: app/configurator/components/chart-configurator.tsx:567 +#: app/configurator/components/chart-configurator.tsx:563 msgid "controls.section.data.filters" msgstr "Filter" -#: app/configurator/components/chart-annotator.tsx:24 +#: app/configurator/components/chart-annotator.tsx:52 msgid "controls.section.description" msgstr "Titel & Beschreibung" @@ -500,7 +508,7 @@ msgstr "Titel & Beschreibung" msgid "controls.section.filter" msgstr "Filter" -#: app/configurator/table/table-chart-configurator.tsx:155 +#: app/configurator/table/table-chart-configurator.tsx:156 msgid "controls.section.groups" msgstr "Gruppierungen" @@ -512,11 +520,12 @@ msgstr "Fehlende Werte" msgid "controls.section.imputation.explanation" msgstr "Für diesen Diagrammtyp sollten fehlenden Werten Ersatzwerte zugewiesen werden. Entscheiden Sie sich für die Imputationslogik oder wechseln Sie zu einem anderen Diagrammtyp." -#: app/configurator/interactive-filters/interactive-filters-configurator.tsx:78 +#: app/configurator/interactive-filters/interactive-filters-configurator.tsx:98 +#: app/configurator/interactive-filters/interactive-filters-configurator.tsx:157 msgid "controls.section.interactive.filters" msgstr "Interaktive Filter hinzufügen" -#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:117 +#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:128 msgid "controls.section.interactiveFilters.dataFilters" msgstr "Datenfilter" @@ -532,16 +541,20 @@ msgstr "Sortieren" msgid "controls.section.tableSettings" msgstr "Tabelleneinstellungen" -#: app/configurator/table/table-chart-sorting-options.tsx:384 +#: app/configurator/table/table-chart-sorting-options.tsx:386 msgid "controls.section.tableSorting" msgstr "Tabellensortierung" -#: app/configurator/table/table-chart-configurator.tsx:130 +#: app/configurator/table/table-chart-configurator.tsx:131 msgid "controls.section.tableoptions" msgstr "Tabellenoptionen" -#: app/configurator/components/chart-configurator.tsx:541 -#: app/configurator/components/chart-type-selector.tsx:135 +#: app/configurator/components/chart-annotator.tsx:32 +msgid "controls.section.title.warning" +msgstr "Fügen Sie einen Titel oder eine Beschreibung hinzu" + +#: app/configurator/components/chart-configurator.tsx:537 +#: app/configurator/components/chart-type-selector.tsx:131 #: app/configurator/table/table-chart-configurator.tsx:123 msgid "controls.select.chart.type" msgstr "Diagrammtyp" @@ -583,6 +596,7 @@ msgid "controls.select.columnStyle.textStyle" msgstr "Schriftstil" #: app/configurator/components/chart-options-selector.tsx:220 +#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:310 msgid "controls.select.dimension" msgstr "Dimension auswählen" @@ -599,15 +613,15 @@ msgstr "Messwert auswählen" #~ msgid "controls.select.optional" #~ msgstr "optional" -#: app/configurator/components/filters.tsx:712 +#: app/configurator/components/filters.tsx:701 msgid "controls.set-filters" msgstr "Ausgewählte Filter" -#: app/configurator/components/filters.tsx:719 +#: app/configurator/components/filters.tsx:708 msgid "controls.set-filters-caption" msgstr "Für beste Ergebnisse wählen Sie nicht mehr als 7 Werte für die Visualisierung aus" -#: app/configurator/components/filters.tsx:751 +#: app/configurator/components/filters.tsx:740 msgid "controls.set-values-apply" msgstr "Filter anwenden" @@ -615,13 +629,13 @@ msgstr "Filter anwenden" msgid "controls.size" msgstr "Grösse" -#: app/configurator/table/table-chart-sorting-options.tsx:251 +#: app/configurator/table/table-chart-sorting-options.tsx:264 msgid "controls.sorting.addDimension" msgstr "Dimension hinzufügen" #: app/configurator/components/chart-options-selector.tsx:509 msgid "controls.sorting.byAuto" -msgstr "" +msgstr "Auto" #: app/configurator/components/chart-options-selector.tsx:503 #: app/configurator/components/chart-options-selector.tsx:513 @@ -670,20 +684,20 @@ msgstr "Grösste zuerst" msgid "controls.sorting.byTotalSize.largestTop" msgstr "Kleinste unten" -#: app/configurator/table/table-chart-sorting-options.tsx:161 +#: app/configurator/table/table-chart-sorting-options.tsx:174 msgid "controls.sorting.removeOption" msgstr "Sortierung entfernen" -#: app/configurator/table/table-chart-sorting-options.tsx:213 +#: app/configurator/table/table-chart-sorting-options.tsx:226 msgid "controls.sorting.selectDimension" msgstr "Wählen Sie eine Dimension aus …" #: app/configurator/components/field-i18n.ts:43 -#: app/configurator/table/table-chart-sorting-options.tsx:322 +#: app/configurator/table/table-chart-sorting-options.tsx:335 msgid "controls.sorting.sortBy" msgstr "Sortieren nach" -#: app/configurator/components/chart-type-selector.tsx:140 +#: app/configurator/components/chart-type-selector.tsx:136 msgid "controls.switch.chart.type" msgstr "Wechseln Sie zu einem anderen Diagrammtyp unter Beibehaltung der meisten Filtereinstellungen" @@ -695,11 +709,11 @@ msgstr "Gruppieren" msgid "controls.table.column.hide" msgstr "Spalte ausblenden" -#: app/configurator/table/table-chart-configurator.tsx:142 +#: app/configurator/table/table-chart-configurator.tsx:143 msgid "controls.table.settings" msgstr "Einstellungen" -#: app/configurator/table/table-chart-configurator.tsx:148 +#: app/configurator/table/table-chart-configurator.tsx:149 msgid "controls.table.sorting" msgstr "Sortierung" @@ -731,7 +745,7 @@ msgstr "Datenquelle" msgid "data.source.notTrusted" msgstr "Dieses Diagramm verwendet keine vertrauenswürdige Datenquelle." -#: app/configurator/components/select-dataset-step.tsx:179 +#: app/configurator/components/select-dataset-step.tsx:221 msgid "dataset-preview.back-to-results" msgstr "Zurück zu den Datensätzen" @@ -751,7 +765,7 @@ msgstr "Neuestes Update" msgid "dataset.hasImputedValues" msgstr "Einige Daten in diesem Datensatz fehlen und wurden interpoliert, um die Lücken zu füllen." -#: app/configurator/components/dataset-browse.tsx:427 +#: app/configurator/components/dataset-browse.tsx:447 msgid "dataset.includeDrafts" msgstr "Entwürfe einschließen" @@ -768,7 +782,7 @@ msgid "dataset.metadata.furtherinformation" msgstr "Weitere Informationen" #: app/components/chart-footnotes.tsx:200 -#: app/configurator/components/dataset-metadata.tsx:118 +#: app/configurator/components/dataset-metadata.tsx:114 msgid "dataset.metadata.learnmore" msgstr "Erfahren Sie mehr über diesen Datensatz" @@ -780,21 +794,21 @@ msgstr "Quelle" msgid "dataset.metadata.version" msgstr "Version" -#: app/configurator/components/dataset-browse.tsx:351 +#: app/configurator/components/dataset-browse.tsx:404 msgid "dataset.order.newest" msgstr "Neueste" -#: app/configurator/components/dataset-browse.tsx:343 +#: app/configurator/components/dataset-browse.tsx:396 msgid "dataset.order.relevance" msgstr "Relevanz" -#: app/configurator/components/dataset-browse.tsx:347 +#: app/configurator/components/dataset-browse.tsx:400 msgid "dataset.order.title" msgstr "Titel" -#: app/components/chart-preview.tsx:85 +#: app/components/chart-preview.tsx:103 #: app/components/chart-published.tsx:126 -#: app/configurator/components/dataset-preview.tsx:109 +#: app/configurator/components/dataset-preview.tsx:120 msgid "dataset.publicationStatus.draft.warning" msgstr "Achtung, dieser Datensatz ist im Entwurfs-Stadium.<0/><1>Diese Grafik nicht für Berichte verwenden." @@ -802,27 +816,27 @@ msgstr "Achtung, dieser Datensatz ist im Entwurfs-Stadium.<0/><1>Diese Grafik ni msgid "dataset.publicationStatus.expires.warning" msgstr "Achtung, dieser Datensatz ist abgelaufen.<0/><1>Diese Grafik nicht für Berichte verwenden." -#: app/configurator/components/dataset-browse.tsx:415 +#: app/configurator/components/dataset-browse.tsx:435 msgid "dataset.results" msgstr "{0, plural, zero {Keine Datensätze} one {# Datensatz} other {# Datensätze}}" -#: app/configurator/components/dataset-browse.tsx:355 +#: app/configurator/components/dataset-browse.tsx:328 msgid "dataset.search.label" msgstr "Suchen" #: app/configurator/components/dataset-browse.tsx:360 -msgid "dataset.search.placeholder" -msgstr "" +#~ msgid "dataset.search.placeholder" +#~ msgstr "" -#: app/configurator/components/dataset-browse.tsx:446 +#: app/configurator/components/dataset-browse.tsx:459 msgid "dataset.sortby" msgstr "Sortieren nach" -#: app/configurator/components/dataset-browse.tsx:1152 +#: app/configurator/components/dataset-browse.tsx:1157 msgid "dataset.tag.draft" msgstr "Entwurf" -#: app/configurator/components/dataset-preview.tsx:171 +#: app/configurator/components/dataset-preview.tsx:182 msgid "datatable.showing.first.rows" msgstr "Die ersten 10 Zeilen werden angezeigt" @@ -862,7 +876,7 @@ msgstr "Es gab ein Problem beim Laden der Koordinaten aus den geografischen Dime msgid "hint.coordinatesloadingerror.title" msgstr "Koordinaten-Ladefehler" -#: app/pages/v/[chartId].tsx:129 +#: app/pages/v/[chartId].tsx:128 msgid "hint.create.your.own.chart" msgstr "Kopieren Sie diese Visualisierung oder erstellen Sie eine neue Visualisierung mit Swiss Open Government Data." @@ -878,7 +892,7 @@ msgstr "Weitere Informationen finden Sie auf der Statusseite" msgid "hint.dataloadingerror.title" msgstr "Daten-Ladefehler" -#: app/pages/v/[chartId].tsx:123 +#: app/pages/v/[chartId].tsx:122 msgid "hint.how.to.share" msgstr "Sie können diese Visualisierung teilen oder sie einbetten. Zudem können Sie eine neue Visualisierung erstellen oder die gezeigte Visualisierung kopieren." @@ -886,7 +900,7 @@ msgstr "Sie können diese Visualisierung teilen oder sie einbetten. Zudem könne msgid "hint.loading.data" msgstr "Lade Daten …" -#: app/configurator/components/chart-type-selector.tsx:153 +#: app/configurator/components/chart-type-selector.tsx:149 msgid "hint.no.visualization.with.dataset" msgstr "Mit dem ausgewählten Datensatz kann keine Visualisierung erstellt werden." @@ -918,8 +932,8 @@ msgstr "Filter ausblenden" msgid "interactive.data.filters.show" msgstr "Filter anzeigen" -#: app/components/header.tsx:188 -#: app/components/header.tsx:207 +#: app/components/header.tsx:201 +#: app/components/header.tsx:220 msgid "logo.swiss.confederation" msgstr "Logo der Schweizerischen Eidgenossenschaft" @@ -979,18 +993,12 @@ msgstr "Hier ist eine Visualisierung, die ich mit visualize.admin.ch erstellt ha msgid "publication.share.mail.subject" msgstr "visualize.admin.ch" -#: app/configurator/components/filters.tsx:632 +#: app/configurator/components/dataset-browse.tsx:333 +#: app/configurator/components/dataset-browse.tsx:369 +#: app/configurator/components/filters.tsx:621 msgid "select.controls.filters.search" msgstr "Suche" -#: app/configurator/components/stepper.tsx:209 -msgid "step.annotate" -msgstr "Bevor Sie Veröffentlichen, fügen Sie Ihrem Diagramm einen Titel und eine Beschreibung hinzu, und wählen Sie, welche Elemente interaktiv sein sollen." - -#: app/configurator/components/stepper.tsx:198 -msgid "step.visualize" -msgstr "Passen Sie Ihre Visualisierung an, indem Sie die Filter- und Farbsegmentierungsoptionen in den Seitenleisten verwenden." - #: app/configurator/components/chart-controls/drag-and-drop-tab.tsx:101 msgid "table.column.no" msgstr "Spalte {0}" diff --git a/app/locales/en/messages.po b/app/locales/en/messages.po index 15fe31cc3..80d4ad8c0 100644 --- a/app/locales/en/messages.po +++ b/app/locales/en/messages.po @@ -13,60 +13,60 @@ msgstr "" "Language-Team: \n" "Plural-Forms: \n" -#: app/configurator/components/chart-configurator.tsx:647 +#: app/configurator/components/chart-configurator.tsx:648 msgid "Add filter" msgstr "Add filter" -#: app/configurator/components/chart-configurator.tsx:620 +#: app/configurator/components/chart-configurator.tsx:621 msgid "Drag filters to reorganize" msgstr "Drag filters to reorganize" -#: app/configurator/components/chart-configurator.tsx:617 +#: app/configurator/components/chart-configurator.tsx:618 msgid "Move filter down" msgstr "Move filter down" -#: app/configurator/components/chart-configurator.tsx:614 +#: app/configurator/components/chart-configurator.tsx:615 msgid "Move filter up" msgstr "Move filter up" -#: app/configurator/components/dataset-browse.tsx:1037 -#: app/configurator/components/filters.tsx:730 +#: app/configurator/components/dataset-browse.tsx:1043 +#: app/configurator/components/filters.tsx:719 msgid "No results" msgstr "No results" -#: app/components/chart-preview.tsx:128 +#: app/components/chart-preview.tsx:157 msgid "annotation.add.description" msgstr "[ No Description ]" -#: app/components/chart-preview.tsx:106 +#: app/components/chart-preview.tsx:129 msgid "annotation.add.title" msgstr "[ No Title ]" -#: app/configurator/components/dataset-browse.tsx:968 +#: app/configurator/components/dataset-browse.tsx:974 msgid "browse-panel.organizations" msgstr "Organizations" -#: app/configurator/components/dataset-browse.tsx:950 +#: app/configurator/components/dataset-browse.tsx:956 msgid "browse-panel.themes" msgstr "Categories" -#: app/configurator/components/dataset-preview.tsx:128 +#: app/configurator/components/dataset-preview.tsx:139 msgid "browse.dataset.create-visualization" msgstr "Start a visualization" -#: app/configurator/components/select-dataset-step.tsx:284 +#: app/configurator/components/select-dataset-step.tsx:295 msgid "browse.datasets.all-datasets" msgstr "All datasets" -#: app/configurator/components/select-dataset-step.tsx:217 +#: app/configurator/components/select-dataset-step.tsx:189 msgid "browse.datasets.description" msgstr "Explore datasets provided by the LINDAS Linked Data Service by either filtering by categories or organisations or search directly for specific keywords. Click on a dataset to see more detailed information and start creating your own visualizations." #: app/configurator/components/stepper.tsx:65 -msgid "button.back" -msgstr "Back" +#~ msgid "button.back" +#~ msgstr "Back" -#: app/pages/v/[chartId].tsx:167 +#: app/pages/v/[chartId].tsx:166 msgid "button.copy.visualization" msgstr "Copy and edit this visualization" @@ -103,15 +103,15 @@ msgstr "Click to copy" msgid "button.hint.copied" msgstr "Copied!" -#: app/pages/v/[chartId].tsx:152 +#: app/pages/v/[chartId].tsx:151 msgid "button.new.visualization" msgstr "Create New Visualization" #: app/configurator/components/stepper.tsx:70 -msgid "button.next" -msgstr "Next" +#~ msgid "button.next" +#~ msgstr "Next" -#: app/configurator/components/stepper.tsx:68 +#: app/components/chart-selection-tabs.tsx:182 msgid "button.publish" msgstr "Publish this visualization" @@ -143,7 +143,7 @@ msgstr "Areas" #~ msgid "chart.map.layers.area.discretization.quantize" #~ msgstr "Quantize (equal intervals)" -#: app/configurator/components/chart-configurator.tsx:696 +#: app/configurator/components/chart-configurator.tsx:697 #: app/configurator/components/chart-options-selector.tsx:989 #: app/configurator/components/field-i18n.ts:31 msgid "chart.map.layers.base" @@ -203,7 +203,7 @@ msgstr "Bold" msgid "columnStyle.textStyle.regular" msgstr "Regular" -#: app/configurator/interactive-filters/editor-time-brush.tsx:168 +#: app/configurator/interactive-filters/editor-time-brush.tsx:170 msgid "controls..interactiveFilters.time.defaultSettings" msgstr "Default Settings" @@ -339,33 +339,33 @@ msgstr "Description" msgid "controls.dimensionvalue.none" msgstr "No Filter" -#: app/configurator/components/filters.tsx:480 +#: app/configurator/components/filters.tsx:469 msgid "controls.filter.nb-elements" msgstr "{0} of {1}" -#: app/configurator/components/filters.tsx:414 -#: app/configurator/components/filters.tsx:658 +#: app/configurator/components/filters.tsx:403 +#: app/configurator/components/filters.tsx:647 msgid "controls.filter.select.all" msgstr "Select all" -#: app/configurator/components/filters.tsx:421 -#: app/configurator/components/filters.tsx:656 +#: app/configurator/components/filters.tsx:410 +#: app/configurator/components/filters.tsx:645 msgid "controls.filter.select.none" msgstr "Select none" -#: app/configurator/components/filters.tsx:431 +#: app/configurator/components/filters.tsx:420 msgid "controls.filters.select.filters" msgstr "Filters" -#: app/configurator/components/filters.tsx:461 +#: app/configurator/components/filters.tsx:450 msgid "controls.filters.select.refresh-colors" msgstr "Refresh colors" -#: app/configurator/components/filters.tsx:445 +#: app/configurator/components/filters.tsx:434 msgid "controls.filters.select.reset-colors" msgstr "Reset colors" -#: app/configurator/components/filters.tsx:438 +#: app/configurator/components/filters.tsx:427 msgid "controls.filters.select.selected-filters" msgstr "Selected filters" @@ -385,13 +385,13 @@ msgstr "Drag and drop columns here to make groups." #~ msgid "controls.hierarchy.select" #~ msgstr "Select a hierarchy level" -#: app/configurator/components/empty-right-panel.tsx:24 +#: app/configurator/components/empty-right-panel.tsx:21 msgid "controls.hint.configuring.chart" msgstr "Select a design element or a data dimension to modify its options." #: app/configurator/components/empty-right-panel.tsx:31 -msgid "controls.hint.describing.chart" -msgstr "Select an annotation field to modify its content." +#~ msgid "controls.hint.describing.chart" +#~ msgstr "Select an annotation field to modify its content." #: app/configurator/components/field-i18n.ts:87 msgid "controls.imputation" @@ -413,34 +413,34 @@ msgstr "-" msgid "controls.imputation.type.zeros" msgstr "Zeros" -#: app/configurator/interactive-filters/interactive-filters-configurator.tsx:117 +#: app/configurator/interactive-filters/interactive-filters-configurator.tsx:137 msgid "controls.interactive.filters.dataFilter" msgstr "Data Filters" -#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:104 -#: app/configurator/interactive-filters/interactive-filters-configurator.tsx:97 +#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:115 +#: app/configurator/interactive-filters/interactive-filters-configurator.tsx:117 msgid "controls.interactive.filters.timeSlider" msgstr "Time slider" -#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:327 +#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:375 msgid "controls.interactiveFilters.dataFilters.toggledataFilters" msgstr "Show data filters" -#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:77 +#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:89 msgid "controls.interactiveFilters.legend.toggleInteractiveLegend" msgstr "Show legend filter" -#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:222 +#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:233 msgid "controls.interactiveFilters.time.noTimeDimension" msgstr "There is no time dimension!" -#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:197 +#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:208 msgid "controls.interactiveFilters.time.toggleTimeFilter" msgstr "Show time filter" #: app/configurator/interactive-filters/interactive-filters-config-options.tsx:263 -msgid "controls.interactiveFilters.time.toggleTimeSliderFilter" -msgstr "Show time slider" +#~ msgid "controls.interactiveFilters.time.toggleTimeSliderFilter" +#~ msgstr "Show time slider" #: app/configurator/components/field-i18n.ts:135 msgid "controls.language.english" @@ -467,9 +467,13 @@ msgstr "Italian" msgid "controls.measure" msgstr "Measure" -#: app/configurator/components/field.tsx:817 -#~ msgid "controls.none" -#~ msgstr "None" +#: app/configurator/components/configurator.tsx:107 +msgid "controls.nav.back-to-preview" +msgstr "Back to preview" + +#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:292 +msgid "controls.none" +msgstr "None" #: app/configurator/components/chart-controls/control-tab.tsx:312 msgid "controls.option.isActive" @@ -491,11 +495,11 @@ msgstr "Clear search field" msgid "controls.section.additional-information" msgstr "Additional information" -#: app/configurator/components/chart-configurator.tsx:549 +#: app/configurator/components/chart-configurator.tsx:545 msgid "controls.section.chart.options" msgstr "Chart Options" -#: app/configurator/table/table-chart-configurator.tsx:164 +#: app/configurator/table/table-chart-configurator.tsx:165 msgid "controls.section.columns" msgstr "Columns" @@ -503,11 +507,11 @@ msgstr "Columns" msgid "controls.section.columnstyle" msgstr "Column Style" -#: app/configurator/components/chart-configurator.tsx:567 +#: app/configurator/components/chart-configurator.tsx:563 msgid "controls.section.data.filters" msgstr "Filters" -#: app/configurator/components/chart-annotator.tsx:24 +#: app/configurator/components/chart-annotator.tsx:52 msgid "controls.section.description" msgstr "Title & Description" @@ -520,7 +524,7 @@ msgstr "Title & Description" msgid "controls.section.filter" msgstr "Filter" -#: app/configurator/table/table-chart-configurator.tsx:155 +#: app/configurator/table/table-chart-configurator.tsx:156 msgid "controls.section.groups" msgstr "Groups" @@ -532,11 +536,12 @@ msgstr "Missing values" msgid "controls.section.imputation.explanation" msgstr "For this chart type, replacement values should be assigned to missing values. Decide on the imputation logic or switch to another chart type." -#: app/configurator/interactive-filters/interactive-filters-configurator.tsx:78 +#: app/configurator/interactive-filters/interactive-filters-configurator.tsx:98 +#: app/configurator/interactive-filters/interactive-filters-configurator.tsx:157 msgid "controls.section.interactive.filters" msgstr "Interactive Filters" -#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:117 +#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:128 msgid "controls.section.interactiveFilters.dataFilters" msgstr "Data Filters" @@ -552,16 +557,20 @@ msgstr "Sort" msgid "controls.section.tableSettings" msgstr "Table Settings" -#: app/configurator/table/table-chart-sorting-options.tsx:384 +#: app/configurator/table/table-chart-sorting-options.tsx:386 msgid "controls.section.tableSorting" msgstr "Table Sorting" -#: app/configurator/table/table-chart-configurator.tsx:130 +#: app/configurator/table/table-chart-configurator.tsx:131 msgid "controls.section.tableoptions" msgstr "Table Options" -#: app/configurator/components/chart-configurator.tsx:541 -#: app/configurator/components/chart-type-selector.tsx:135 +#: app/configurator/components/chart-annotator.tsx:32 +msgid "controls.section.title.warning" +msgstr "Please add a title or description." + +#: app/configurator/components/chart-configurator.tsx:537 +#: app/configurator/components/chart-type-selector.tsx:131 #: app/configurator/table/table-chart-configurator.tsx:123 msgid "controls.select.chart.type" msgstr "Chart Type" @@ -603,6 +612,7 @@ msgid "controls.select.columnStyle.textStyle" msgstr "Text Style" #: app/configurator/components/chart-options-selector.tsx:220 +#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:310 msgid "controls.select.dimension" msgstr "Select a dimension" @@ -619,15 +629,15 @@ msgstr "Select a measure" #~ msgid "controls.select.optional" #~ msgstr "optional" -#: app/configurator/components/filters.tsx:712 +#: app/configurator/components/filters.tsx:701 msgid "controls.set-filters" msgstr "Set filters" -#: app/configurator/components/filters.tsx:719 +#: app/configurator/components/filters.tsx:708 msgid "controls.set-filters-caption" msgstr "For best results, do not select more than 7 values in the visualization." -#: app/configurator/components/filters.tsx:751 +#: app/configurator/components/filters.tsx:740 msgid "controls.set-values-apply" msgstr "Apply filters" @@ -635,7 +645,7 @@ msgstr "Apply filters" msgid "controls.size" msgstr "Size" -#: app/configurator/table/table-chart-sorting-options.tsx:251 +#: app/configurator/table/table-chart-sorting-options.tsx:264 msgid "controls.sorting.addDimension" msgstr "Add dimension" @@ -690,20 +700,20 @@ msgstr "Largest first" msgid "controls.sorting.byTotalSize.largestTop" msgstr "Descending" -#: app/configurator/table/table-chart-sorting-options.tsx:161 +#: app/configurator/table/table-chart-sorting-options.tsx:174 msgid "controls.sorting.removeOption" msgstr "Remove sorting dimension" -#: app/configurator/table/table-chart-sorting-options.tsx:213 +#: app/configurator/table/table-chart-sorting-options.tsx:226 msgid "controls.sorting.selectDimension" msgstr "Select a dimension …" #: app/configurator/components/field-i18n.ts:43 -#: app/configurator/table/table-chart-sorting-options.tsx:322 +#: app/configurator/table/table-chart-sorting-options.tsx:335 msgid "controls.sorting.sortBy" msgstr "Sort by" -#: app/configurator/components/chart-type-selector.tsx:140 +#: app/configurator/components/chart-type-selector.tsx:136 msgid "controls.switch.chart.type" msgstr "Switch to another chart type while maintaining most filter settings." @@ -715,11 +725,11 @@ msgstr "Use as group" msgid "controls.table.column.hide" msgstr "Hide column" -#: app/configurator/table/table-chart-configurator.tsx:142 +#: app/configurator/table/table-chart-configurator.tsx:143 msgid "controls.table.settings" msgstr "Settings" -#: app/configurator/table/table-chart-configurator.tsx:148 +#: app/configurator/table/table-chart-configurator.tsx:149 msgid "controls.table.sorting" msgstr "Sorting" @@ -751,7 +761,7 @@ msgstr "Data source" msgid "data.source.notTrusted" msgstr "This chart is not using a trusted data source." -#: app/configurator/components/select-dataset-step.tsx:179 +#: app/configurator/components/select-dataset-step.tsx:221 msgid "dataset-preview.back-to-results" msgstr "Back to the datasets" @@ -771,7 +781,7 @@ msgstr "Latest update" msgid "dataset.hasImputedValues" msgstr "Some data in this dataset is missing and has been interpolated to fill the gaps." -#: app/configurator/components/dataset-browse.tsx:427 +#: app/configurator/components/dataset-browse.tsx:447 msgid "dataset.includeDrafts" msgstr "Include draft datasets" @@ -792,7 +802,7 @@ msgid "dataset.metadata.furtherinformation" msgstr "Further information" #: app/components/chart-footnotes.tsx:200 -#: app/configurator/components/dataset-metadata.tsx:118 +#: app/configurator/components/dataset-metadata.tsx:114 msgid "dataset.metadata.learnmore" msgstr "Learn more about the dataset" @@ -804,21 +814,21 @@ msgstr "Source" msgid "dataset.metadata.version" msgstr "Version" -#: app/configurator/components/dataset-browse.tsx:351 +#: app/configurator/components/dataset-browse.tsx:404 msgid "dataset.order.newest" msgstr "Newest" -#: app/configurator/components/dataset-browse.tsx:343 +#: app/configurator/components/dataset-browse.tsx:396 msgid "dataset.order.relevance" msgstr "Relevance" -#: app/configurator/components/dataset-browse.tsx:347 +#: app/configurator/components/dataset-browse.tsx:400 msgid "dataset.order.title" msgstr "Title" -#: app/components/chart-preview.tsx:85 +#: app/components/chart-preview.tsx:103 #: app/components/chart-published.tsx:126 -#: app/configurator/components/dataset-preview.tsx:109 +#: app/configurator/components/dataset-preview.tsx:120 msgid "dataset.publicationStatus.draft.warning" msgstr "Careful, this dataset is only a draft.<0/><1>Don't use for reporting!" @@ -826,27 +836,27 @@ msgstr "Careful, this dataset is only a draft.<0/><1>Don't use for reporting!<1>Don't use for reporting!" -#: app/configurator/components/dataset-browse.tsx:415 +#: app/configurator/components/dataset-browse.tsx:435 msgid "dataset.results" msgstr "{0, plural, zero {No datasets} one {# dataset} other {# datasets}}" -#: app/configurator/components/dataset-browse.tsx:355 +#: app/configurator/components/dataset-browse.tsx:328 msgid "dataset.search.label" msgstr "Search datasets" #: app/configurator/components/dataset-browse.tsx:360 -msgid "dataset.search.placeholder" -msgstr "Name, description, organization, theme, keyword" +#~ msgid "dataset.search.placeholder" +#~ msgstr "Name, description, organization, theme, keyword" -#: app/configurator/components/dataset-browse.tsx:446 +#: app/configurator/components/dataset-browse.tsx:459 msgid "dataset.sortby" msgstr "Sort by" -#: app/configurator/components/dataset-browse.tsx:1152 +#: app/configurator/components/dataset-browse.tsx:1157 msgid "dataset.tag.draft" msgstr "Draft" -#: app/configurator/components/dataset-preview.tsx:171 +#: app/configurator/components/dataset-preview.tsx:182 msgid "datatable.showing.first.rows" msgstr "Showing first 10 rows" @@ -886,7 +896,7 @@ msgstr "There was a problem with loading the coordinates from geographical dimen msgid "hint.coordinatesloadingerror.title" msgstr "Coordinates loading error" -#: app/pages/v/[chartId].tsx:129 +#: app/pages/v/[chartId].tsx:128 msgid "hint.create.your.own.chart" msgstr "Copy this visualization or make a new visualization using Swiss Open Government Data." @@ -902,7 +912,7 @@ msgstr "Check the status page for more information" msgid "hint.dataloadingerror.title" msgstr "Data loading error" -#: app/pages/v/[chartId].tsx:123 +#: app/pages/v/[chartId].tsx:122 msgid "hint.how.to.share" msgstr "You can share this visualization by copying the URL or by embedding it on your own website. You can also create a new visualization from scratch or start by copying the visualization above." @@ -910,7 +920,7 @@ msgstr "You can share this visualization by copying the URL or by embedding it o msgid "hint.loading.data" msgstr "Loading data..." -#: app/configurator/components/chart-type-selector.tsx:153 +#: app/configurator/components/chart-type-selector.tsx:149 msgid "hint.no.visualization.with.dataset" msgstr "No visualization can be created with the selected dataset." @@ -942,8 +952,8 @@ msgstr "Hide Filters" msgid "interactive.data.filters.show" msgstr "Show Filters" -#: app/components/header.tsx:188 -#: app/components/header.tsx:207 +#: app/components/header.tsx:201 +#: app/components/header.tsx:220 msgid "logo.swiss.confederation" msgstr "Logo of the Swiss Confederation" @@ -1003,18 +1013,12 @@ msgstr "Here is a visualization I created using visualize.admin.ch" msgid "publication.share.mail.subject" msgstr "visualize.admin.ch" -#: app/configurator/components/filters.tsx:632 +#: app/configurator/components/dataset-browse.tsx:333 +#: app/configurator/components/dataset-browse.tsx:369 +#: app/configurator/components/filters.tsx:621 msgid "select.controls.filters.search" msgstr "Search" -#: app/configurator/components/stepper.tsx:209 -msgid "step.annotate" -msgstr "Before publishing, add a title and description to your chart, and choose which elements should be interactive." - -#: app/configurator/components/stepper.tsx:198 -msgid "step.visualize" -msgstr "Customize your visualization by using the filter and color segmentation options in the sidebars." - #: app/configurator/components/chart-controls/drag-and-drop-tab.tsx:101 msgid "table.column.no" msgstr "Column {0}" diff --git a/app/locales/fr/messages.po b/app/locales/fr/messages.po index 19cfca61c..344ddfdc0 100644 --- a/app/locales/fr/messages.po +++ b/app/locales/fr/messages.po @@ -13,60 +13,60 @@ msgstr "" "Language-Team: \n" "Plural-Forms: \n" -#: app/configurator/components/chart-configurator.tsx:647 +#: app/configurator/components/chart-configurator.tsx:648 msgid "Add filter" msgstr "Ajouter un filtre" -#: app/configurator/components/chart-configurator.tsx:620 +#: app/configurator/components/chart-configurator.tsx:621 msgid "Drag filters to reorganize" msgstr "Faites glisser les filtres pour les réorganiser" -#: app/configurator/components/chart-configurator.tsx:617 +#: app/configurator/components/chart-configurator.tsx:618 msgid "Move filter down" msgstr "Déplacer le filtre vers le bas" -#: app/configurator/components/chart-configurator.tsx:614 +#: app/configurator/components/chart-configurator.tsx:615 msgid "Move filter up" msgstr "Déplacer le filtre vers le haut" -#: app/configurator/components/dataset-browse.tsx:1037 -#: app/configurator/components/filters.tsx:730 +#: app/configurator/components/dataset-browse.tsx:1043 +#: app/configurator/components/filters.tsx:719 msgid "No results" msgstr "Aucun résultat" -#: app/components/chart-preview.tsx:128 +#: app/components/chart-preview.tsx:157 msgid "annotation.add.description" msgstr "[ Pas de description ]" -#: app/components/chart-preview.tsx:106 +#: app/components/chart-preview.tsx:129 msgid "annotation.add.title" msgstr "[ Pas de titre ]" -#: app/configurator/components/dataset-browse.tsx:968 +#: app/configurator/components/dataset-browse.tsx:974 msgid "browse-panel.organizations" msgstr "Organisations" -#: app/configurator/components/dataset-browse.tsx:950 +#: app/configurator/components/dataset-browse.tsx:956 msgid "browse-panel.themes" msgstr "Catégories" -#: app/configurator/components/dataset-preview.tsx:128 +#: app/configurator/components/dataset-preview.tsx:139 msgid "browse.dataset.create-visualization" msgstr "Démarrer une visualisation" -#: app/configurator/components/select-dataset-step.tsx:284 +#: app/configurator/components/select-dataset-step.tsx:295 msgid "browse.datasets.all-datasets" msgstr "Tous les jeux de données" -#: app/configurator/components/select-dataset-step.tsx:217 +#: app/configurator/components/select-dataset-step.tsx:189 msgid "browse.datasets.description" msgstr "Explorez les jeux de données liés fournis par LINDAS, en filtrant par catégories ou organisations, ou en recherchant par mots-clés. Cliquez sur un ensemble de données pour afficher des informations plus détaillées et commencer à créer vos propres visualisations. " #: app/configurator/components/stepper.tsx:65 -msgid "button.back" -msgstr "Précédent" +#~ msgid "button.back" +#~ msgstr "Précédent" -#: app/pages/v/[chartId].tsx:167 +#: app/pages/v/[chartId].tsx:166 msgid "button.copy.visualization" msgstr "Copier et éditer cette visualisation" @@ -103,15 +103,15 @@ msgstr "Cliquer pour copier" msgid "button.hint.copied" msgstr "Copié!" -#: app/pages/v/[chartId].tsx:152 +#: app/pages/v/[chartId].tsx:151 msgid "button.new.visualization" msgstr "Créer une nouvelle visualisation" #: app/configurator/components/stepper.tsx:70 -msgid "button.next" -msgstr "Suivant" +#~ msgid "button.next" +#~ msgstr "Suivant" -#: app/configurator/components/stepper.tsx:68 +#: app/components/chart-selection-tabs.tsx:182 msgid "button.publish" msgstr "Publier cette visualisation" @@ -143,7 +143,7 @@ msgstr "Zones" #~ msgid "chart.map.layers.area.discretization.quantize" #~ msgstr "Intervalles égaux" -#: app/configurator/components/chart-configurator.tsx:696 +#: app/configurator/components/chart-configurator.tsx:697 #: app/configurator/components/chart-options-selector.tsx:989 #: app/configurator/components/field-i18n.ts:31 msgid "chart.map.layers.base" @@ -203,7 +203,7 @@ msgstr "Gras" msgid "columnStyle.textStyle.regular" msgstr "Normal" -#: app/configurator/interactive-filters/editor-time-brush.tsx:168 +#: app/configurator/interactive-filters/editor-time-brush.tsx:170 msgid "controls..interactiveFilters.time.defaultSettings" msgstr "Paramètres d'origine" @@ -267,7 +267,7 @@ msgstr "Couleurs" #: app/configurator/components/chart-controls/color-ramp.tsx:155 msgid "controls.color.palette.diverging" -msgstr "" +msgstr "Divergent" #: app/configurator/components/chart-controls/color-palette.tsx:261 msgid "controls.color.palette.reset" @@ -339,33 +339,33 @@ msgstr "Description" msgid "controls.dimensionvalue.none" msgstr "Aucune filtre" -#: app/configurator/components/filters.tsx:480 +#: app/configurator/components/filters.tsx:469 msgid "controls.filter.nb-elements" msgstr "{0} sur {1}" -#: app/configurator/components/filters.tsx:414 -#: app/configurator/components/filters.tsx:658 +#: app/configurator/components/filters.tsx:403 +#: app/configurator/components/filters.tsx:647 msgid "controls.filter.select.all" msgstr "Tout sélectionner" -#: app/configurator/components/filters.tsx:421 -#: app/configurator/components/filters.tsx:656 +#: app/configurator/components/filters.tsx:410 +#: app/configurator/components/filters.tsx:645 msgid "controls.filter.select.none" msgstr "Tout déselectionner" -#: app/configurator/components/filters.tsx:431 +#: app/configurator/components/filters.tsx:420 msgid "controls.filters.select.filters" msgstr "Filtres" -#: app/configurator/components/filters.tsx:461 +#: app/configurator/components/filters.tsx:450 msgid "controls.filters.select.refresh-colors" msgstr "Renouveller les couleurs" -#: app/configurator/components/filters.tsx:445 +#: app/configurator/components/filters.tsx:434 msgid "controls.filters.select.reset-colors" msgstr "Réinitialiser les couleurs" -#: app/configurator/components/filters.tsx:438 +#: app/configurator/components/filters.tsx:427 msgid "controls.filters.select.selected-filters" msgstr "Filtres sélectionnés" @@ -385,13 +385,13 @@ msgstr "Glisser-déposer des colonnes ici pour créer des groupes." #~ msgid "controls.hierarchy.select" #~ msgstr "Sélectionner le niveau hiérarchique" -#: app/configurator/components/empty-right-panel.tsx:24 +#: app/configurator/components/empty-right-panel.tsx:21 msgid "controls.hint.configuring.chart" msgstr "Sélectionnez un élément de design ou une dimension du jeu de données pour modifier leurs options." #: app/configurator/components/empty-right-panel.tsx:31 -msgid "controls.hint.describing.chart" -msgstr "Sélectionnez une des annotations proposées pour la modifier." +#~ msgid "controls.hint.describing.chart" +#~ msgstr "Sélectionnez une des annotations proposées pour la modifier." #: app/configurator/components/field-i18n.ts:87 msgid "controls.imputation" @@ -413,34 +413,34 @@ msgstr "-" msgid "controls.imputation.type.zeros" msgstr "Zéros" -#: app/configurator/interactive-filters/interactive-filters-configurator.tsx:117 +#: app/configurator/interactive-filters/interactive-filters-configurator.tsx:137 msgid "controls.interactive.filters.dataFilter" msgstr "Filtres de données" -#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:104 -#: app/configurator/interactive-filters/interactive-filters-configurator.tsx:97 +#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:115 +#: app/configurator/interactive-filters/interactive-filters-configurator.tsx:117 msgid "controls.interactive.filters.timeSlider" msgstr "Curseur temporel" -#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:327 +#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:375 msgid "controls.interactiveFilters.dataFilters.toggledataFilters" msgstr "Afficher les filtres de données" -#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:77 +#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:89 msgid "controls.interactiveFilters.legend.toggleInteractiveLegend" msgstr "Afficher la légende filtrante" -#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:222 +#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:233 msgid "controls.interactiveFilters.time.noTimeDimension" msgstr "Il n'y a pas de dimension temporelle!" -#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:197 +#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:208 msgid "controls.interactiveFilters.time.toggleTimeFilter" msgstr "Afficher le filtre temporel" #: app/configurator/interactive-filters/interactive-filters-config-options.tsx:263 -msgid "controls.interactiveFilters.time.toggleTimeSliderFilter" -msgstr "Afficher le curseur de temps" +#~ msgid "controls.interactiveFilters.time.toggleTimeSliderFilter" +#~ msgstr "Afficher le curseur de temps" #: app/configurator/components/field-i18n.ts:135 msgid "controls.language.english" @@ -458,18 +458,17 @@ msgstr "Allemand" msgid "controls.language.italian" msgstr "Italien" -#: app/configurator/map/map-chart-options.tsx:209 -#: app/configurator/map/map-chart-options.tsx:414 -#~ msgid "controls.location" -#~ msgstr "Localisation" - #: app/configurator/components/field-i18n.ts:9 msgid "controls.measure" msgstr "Variable mesurée" -#: app/configurator/components/field.tsx:817 -#~ msgid "controls.none" -#~ msgstr "Aucun" +#: app/configurator/components/configurator.tsx:107 +msgid "controls.nav.back-to-preview" +msgstr "Retour à l'aperçu" + +#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:292 +msgid "controls.none" +msgstr "Aucun" #: app/configurator/components/chart-controls/control-tab.tsx:312 msgid "controls.option.isActive" @@ -491,11 +490,11 @@ msgstr "Effacer la recherche" msgid "controls.section.additional-information" msgstr "Informations supplémentaires" -#: app/configurator/components/chart-configurator.tsx:549 +#: app/configurator/components/chart-configurator.tsx:545 msgid "controls.section.chart.options" msgstr "Paramètres graphiques" -#: app/configurator/table/table-chart-configurator.tsx:164 +#: app/configurator/table/table-chart-configurator.tsx:165 msgid "controls.section.columns" msgstr "Colonnes" @@ -503,11 +502,11 @@ msgstr "Colonnes" msgid "controls.section.columnstyle" msgstr "Style de la colonne" -#: app/configurator/components/chart-configurator.tsx:567 +#: app/configurator/components/chart-configurator.tsx:563 msgid "controls.section.data.filters" msgstr "Filtres" -#: app/configurator/components/chart-annotator.tsx:24 +#: app/configurator/components/chart-annotator.tsx:52 msgid "controls.section.description" msgstr "Titre & description" @@ -520,7 +519,7 @@ msgstr "Titre & description" msgid "controls.section.filter" msgstr "Filtre" -#: app/configurator/table/table-chart-configurator.tsx:155 +#: app/configurator/table/table-chart-configurator.tsx:156 msgid "controls.section.groups" msgstr "Groupes" @@ -532,11 +531,12 @@ msgstr "Valeurs manquantes" msgid "controls.section.imputation.explanation" msgstr "En raison du type de graphique sélectionné, les valeurs manquantes doivent être remplies. Décidez de la logique d'imputation ou choisissez un autre type de graphique." -#: app/configurator/interactive-filters/interactive-filters-configurator.tsx:78 +#: app/configurator/interactive-filters/interactive-filters-configurator.tsx:98 +#: app/configurator/interactive-filters/interactive-filters-configurator.tsx:157 msgid "controls.section.interactive.filters" msgstr "Filtres interactifs" -#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:117 +#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:128 msgid "controls.section.interactiveFilters.dataFilters" msgstr "Filtres de données" @@ -552,16 +552,20 @@ msgstr "Trier" msgid "controls.section.tableSettings" msgstr "Paramètres du tableau" -#: app/configurator/table/table-chart-sorting-options.tsx:384 +#: app/configurator/table/table-chart-sorting-options.tsx:386 msgid "controls.section.tableSorting" msgstr "Tri du tableau" -#: app/configurator/table/table-chart-configurator.tsx:130 +#: app/configurator/table/table-chart-configurator.tsx:131 msgid "controls.section.tableoptions" msgstr "Options du tableau" -#: app/configurator/components/chart-configurator.tsx:541 -#: app/configurator/components/chart-type-selector.tsx:135 +#: app/configurator/components/chart-annotator.tsx:32 +msgid "controls.section.title.warning" +msgstr "Ajoutez un titre ou une description" + +#: app/configurator/components/chart-configurator.tsx:537 +#: app/configurator/components/chart-type-selector.tsx:131 #: app/configurator/table/table-chart-configurator.tsx:123 msgid "controls.select.chart.type" msgstr "Type de graphique" @@ -603,6 +607,7 @@ msgid "controls.select.columnStyle.textStyle" msgstr "Style du texte" #: app/configurator/components/chart-options-selector.tsx:220 +#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:310 msgid "controls.select.dimension" msgstr "Sélectionner une dimension" @@ -619,15 +624,15 @@ msgstr "Sélectionner une variable" #~ msgid "controls.select.optional" #~ msgstr "optionnel" -#: app/configurator/components/filters.tsx:712 +#: app/configurator/components/filters.tsx:701 msgid "controls.set-filters" msgstr "Appliquer les filtres" -#: app/configurator/components/filters.tsx:719 +#: app/configurator/components/filters.tsx:708 msgid "controls.set-filters-caption" msgstr "Pour de meilleurs résultats, ne sélectionnez pas plus de 7 valeurs dans la visualisation." -#: app/configurator/components/filters.tsx:751 +#: app/configurator/components/filters.tsx:740 msgid "controls.set-values-apply" msgstr "Appliquer les filtres" @@ -635,13 +640,13 @@ msgstr "Appliquer les filtres" msgid "controls.size" msgstr "Taille" -#: app/configurator/table/table-chart-sorting-options.tsx:251 +#: app/configurator/table/table-chart-sorting-options.tsx:264 msgid "controls.sorting.addDimension" msgstr "Ajouter une dimension" #: app/configurator/components/chart-options-selector.tsx:509 msgid "controls.sorting.byAuto" -msgstr "" +msgstr "Auto" #: app/configurator/components/chart-options-selector.tsx:503 #: app/configurator/components/chart-options-selector.tsx:513 @@ -690,20 +695,20 @@ msgstr "Décroissant" msgid "controls.sorting.byTotalSize.largestTop" msgstr "Décroissant de haut en bas" -#: app/configurator/table/table-chart-sorting-options.tsx:161 +#: app/configurator/table/table-chart-sorting-options.tsx:174 msgid "controls.sorting.removeOption" msgstr "Supprimer la dimension de tri" -#: app/configurator/table/table-chart-sorting-options.tsx:213 +#: app/configurator/table/table-chart-sorting-options.tsx:226 msgid "controls.sorting.selectDimension" msgstr "Sélectionner une dimension…" #: app/configurator/components/field-i18n.ts:43 -#: app/configurator/table/table-chart-sorting-options.tsx:322 +#: app/configurator/table/table-chart-sorting-options.tsx:335 msgid "controls.sorting.sortBy" msgstr "Trier par" -#: app/configurator/components/chart-type-selector.tsx:140 +#: app/configurator/components/chart-type-selector.tsx:136 msgid "controls.switch.chart.type" msgstr "Passer à une autre visualisation tout en conservant la plupart des filtres" @@ -715,11 +720,11 @@ msgstr "Grouper selon cette colonne" msgid "controls.table.column.hide" msgstr "Masquer la colonne" -#: app/configurator/table/table-chart-configurator.tsx:142 +#: app/configurator/table/table-chart-configurator.tsx:143 msgid "controls.table.settings" msgstr "Paramètres" -#: app/configurator/table/table-chart-configurator.tsx:148 +#: app/configurator/table/table-chart-configurator.tsx:149 msgid "controls.table.sorting" msgstr "Tri" @@ -751,7 +756,7 @@ msgstr "Source des données" msgid "data.source.notTrusted" msgstr "Ce graphique n'utilise pas une source de données fiable." -#: app/configurator/components/select-dataset-step.tsx:179 +#: app/configurator/components/select-dataset-step.tsx:221 msgid "dataset-preview.back-to-results" msgstr "Revenir aux jeux de données" @@ -771,7 +776,7 @@ msgstr "Mise à jour" msgid "dataset.hasImputedValues" msgstr "Certaines données de cet ensemble de données sont manquantes et ont été interpolées pour combler les lacunes." -#: app/configurator/components/dataset-browse.tsx:427 +#: app/configurator/components/dataset-browse.tsx:447 msgid "dataset.includeDrafts" msgstr "Inclure les brouillons" @@ -788,7 +793,7 @@ msgid "dataset.metadata.furtherinformation" msgstr "Informations complémentaires" #: app/components/chart-footnotes.tsx:200 -#: app/configurator/components/dataset-metadata.tsx:118 +#: app/configurator/components/dataset-metadata.tsx:114 msgid "dataset.metadata.learnmore" msgstr "En savoir plus sur le jeu de données" @@ -800,21 +805,21 @@ msgstr "Source" msgid "dataset.metadata.version" msgstr "Version" -#: app/configurator/components/dataset-browse.tsx:351 +#: app/configurator/components/dataset-browse.tsx:404 msgid "dataset.order.newest" msgstr "Plus récent en premier" -#: app/configurator/components/dataset-browse.tsx:343 +#: app/configurator/components/dataset-browse.tsx:396 msgid "dataset.order.relevance" msgstr "Pertinence" -#: app/configurator/components/dataset-browse.tsx:347 +#: app/configurator/components/dataset-browse.tsx:400 msgid "dataset.order.title" msgstr "Titre" -#: app/components/chart-preview.tsx:85 +#: app/components/chart-preview.tsx:103 #: app/components/chart-published.tsx:126 -#: app/configurator/components/dataset-preview.tsx:109 +#: app/configurator/components/dataset-preview.tsx:120 msgid "dataset.publicationStatus.draft.warning" msgstr "Attention, ce jeu de données est à l'état d'ébauche.<0/><1>Ne l'utilisez pas pour une publication!" @@ -822,27 +827,27 @@ msgstr "Attention, ce jeu de données est à l'état d'ébauche.<0/><1>Ne l'util msgid "dataset.publicationStatus.expires.warning" msgstr "Attention, ce jeu de données est expiré.<0/><1>Ne l'utilisez pas pour une publication!" -#: app/configurator/components/dataset-browse.tsx:415 +#: app/configurator/components/dataset-browse.tsx:435 msgid "dataset.results" msgstr "{0, plural, zero {Aucun jeu de données} one {# jeu de données} other {# jeux de données}}" -#: app/configurator/components/dataset-browse.tsx:355 +#: app/configurator/components/dataset-browse.tsx:328 msgid "dataset.search.label" msgstr "Chercher" #: app/configurator/components/dataset-browse.tsx:360 -msgid "dataset.search.placeholder" -msgstr "Nom, description, organisation, catégorie, mots clés..." +#~ msgid "dataset.search.placeholder" +#~ msgstr "Nom, description, organisation, catégorie, mots clés..." -#: app/configurator/components/dataset-browse.tsx:446 +#: app/configurator/components/dataset-browse.tsx:459 msgid "dataset.sortby" msgstr "Trier par" -#: app/configurator/components/dataset-browse.tsx:1152 +#: app/configurator/components/dataset-browse.tsx:1157 msgid "dataset.tag.draft" msgstr "Brouillon" -#: app/configurator/components/dataset-preview.tsx:171 +#: app/configurator/components/dataset-preview.tsx:182 msgid "datatable.showing.first.rows" msgstr "Seules les 10 premières lignes sont affichées" @@ -882,7 +887,7 @@ msgstr "Les données géographiques n’ont pas pu être chargées, merci de ré msgid "hint.coordinatesloadingerror.title" msgstr "Erreur de chargement des coordonnées" -#: app/pages/v/[chartId].tsx:129 +#: app/pages/v/[chartId].tsx:128 msgid "hint.create.your.own.chart" msgstr "Copiez cette visualisation ou créez une nouvelle visualisation à partir des données ouvertes de l’administration publique suisse." @@ -898,7 +903,7 @@ msgstr "Consultez la page de statut pour plus d'informations" msgid "hint.dataloadingerror.title" msgstr "Problème de téléchargement des données" -#: app/pages/v/[chartId].tsx:123 +#: app/pages/v/[chartId].tsx:122 msgid "hint.how.to.share" msgstr "Vous pouvez partager cette visualisation en copiant l'URL ou en l'intégrant sur votre site Web. Vous pouvez également créer une toute nouvelle visualisation, ou bien copier et modifier la visualisation ci-dessus." @@ -906,7 +911,7 @@ msgstr "Vous pouvez partager cette visualisation en copiant l'URL ou en l'intég msgid "hint.loading.data" msgstr "Chargement des données..." -#: app/configurator/components/chart-type-selector.tsx:153 +#: app/configurator/components/chart-type-selector.tsx:149 msgid "hint.no.visualization.with.dataset" msgstr "Aucune visualisation ne peut être créée avec le jeu de données sélectionné." @@ -938,8 +943,8 @@ msgstr "Masquer les filtres" msgid "interactive.data.filters.show" msgstr "Afficher les filtres" -#: app/components/header.tsx:188 -#: app/components/header.tsx:207 +#: app/components/header.tsx:201 +#: app/components/header.tsx:220 msgid "logo.swiss.confederation" msgstr "Logo de la Confédération Suisse" @@ -999,18 +1004,12 @@ msgstr "Voici une visualisation que j'ai créée sur visualize.admin.ch" msgid "publication.share.mail.subject" msgstr "visualize.admin.ch" -#: app/configurator/components/filters.tsx:632 +#: app/configurator/components/dataset-browse.tsx:333 +#: app/configurator/components/dataset-browse.tsx:369 +#: app/configurator/components/filters.tsx:621 msgid "select.controls.filters.search" msgstr "Chercher" -#: app/configurator/components/stepper.tsx:209 -msgid "step.annotate" -msgstr "Avant de publier, ajoutez un titre et une description à votre tableau et choisissez quels éléments doivent être interactifs." - -#: app/configurator/components/stepper.tsx:198 -msgid "step.visualize" -msgstr "Personnalisez votre visualisation en utilisant les options de filtrage et de segmentation des couleurs dans les barres latérales." - #: app/configurator/components/chart-controls/drag-and-drop-tab.tsx:101 msgid "table.column.no" msgstr "Colonne {0}" diff --git a/app/locales/it/messages.po b/app/locales/it/messages.po index 0d02c1b0e..7f7ecbd79 100644 --- a/app/locales/it/messages.po +++ b/app/locales/it/messages.po @@ -13,60 +13,60 @@ msgstr "" "Language-Team: \n" "Plural-Forms: \n" -#: app/configurator/components/chart-configurator.tsx:647 +#: app/configurator/components/chart-configurator.tsx:648 msgid "Add filter" msgstr "Aggiungi filtro" -#: app/configurator/components/chart-configurator.tsx:620 +#: app/configurator/components/chart-configurator.tsx:621 msgid "Drag filters to reorganize" msgstr "Trascina i filtri per riorganizzarli" -#: app/configurator/components/chart-configurator.tsx:617 +#: app/configurator/components/chart-configurator.tsx:618 msgid "Move filter down" msgstr "Sposta il filtro in basso" -#: app/configurator/components/chart-configurator.tsx:614 +#: app/configurator/components/chart-configurator.tsx:615 msgid "Move filter up" msgstr "Sposta il filtro in alto" -#: app/configurator/components/dataset-browse.tsx:1037 -#: app/configurator/components/filters.tsx:730 +#: app/configurator/components/dataset-browse.tsx:1043 +#: app/configurator/components/filters.tsx:719 msgid "No results" msgstr "Nessun risultato" -#: app/components/chart-preview.tsx:128 +#: app/components/chart-preview.tsx:157 msgid "annotation.add.description" msgstr "[ Nessuna descrizione ]" -#: app/components/chart-preview.tsx:106 +#: app/components/chart-preview.tsx:129 msgid "annotation.add.title" msgstr "[ Nessun titolo ]" -#: app/configurator/components/dataset-browse.tsx:968 +#: app/configurator/components/dataset-browse.tsx:974 msgid "browse-panel.organizations" msgstr "Organizzazioni" -#: app/configurator/components/dataset-browse.tsx:950 +#: app/configurator/components/dataset-browse.tsx:956 msgid "browse-panel.themes" msgstr "Categorie" -#: app/configurator/components/dataset-preview.tsx:128 +#: app/configurator/components/dataset-preview.tsx:139 msgid "browse.dataset.create-visualization" msgstr "Iniziare una visualizzazione" -#: app/configurator/components/select-dataset-step.tsx:284 +#: app/configurator/components/select-dataset-step.tsx:295 msgid "browse.datasets.all-datasets" msgstr "Tutti i set di dati" -#: app/configurator/components/select-dataset-step.tsx:217 +#: app/configurator/components/select-dataset-step.tsx:189 msgid "browse.datasets.description" msgstr "Esplora i set di dati forniti dal LINDAS Linked Data Service filtrando per categorie o organizzazioni oppure cercando direttamente per parole chiave specifiche. Clicca su un set di dati per vedere informazioni più dettagliate e iniziare a creare le tue visualizzazioni." #: app/configurator/components/stepper.tsx:65 -msgid "button.back" -msgstr "Torna indietro" +#~ msgid "button.back" +#~ msgstr "Torna indietro" -#: app/pages/v/[chartId].tsx:167 +#: app/pages/v/[chartId].tsx:166 msgid "button.copy.visualization" msgstr "Copia e modifica questa visualizzazione" @@ -103,15 +103,15 @@ msgstr "Clicca per copiare" msgid "button.hint.copied" msgstr "Copiato!" -#: app/pages/v/[chartId].tsx:152 +#: app/pages/v/[chartId].tsx:151 msgid "button.new.visualization" msgstr "Crea una nuova visualizzazione" #: app/configurator/components/stepper.tsx:70 -msgid "button.next" -msgstr "Successivo" +#~ msgid "button.next" +#~ msgstr "Successivo" -#: app/configurator/components/stepper.tsx:68 +#: app/components/chart-selection-tabs.tsx:182 msgid "button.publish" msgstr "Pubblica questa visualizzazione" @@ -143,7 +143,7 @@ msgstr "Aree" #~ msgid "chart.map.layers.area.discretization.quantize" #~ msgstr "Intervalli uguali" -#: app/configurator/components/chart-configurator.tsx:696 +#: app/configurator/components/chart-configurator.tsx:697 #: app/configurator/components/chart-options-selector.tsx:989 #: app/configurator/components/field-i18n.ts:31 msgid "chart.map.layers.base" @@ -203,7 +203,7 @@ msgstr "Grassetto" msgid "columnStyle.textStyle.regular" msgstr "Regular" -#: app/configurator/interactive-filters/editor-time-brush.tsx:168 +#: app/configurator/interactive-filters/editor-time-brush.tsx:170 msgid "controls..interactiveFilters.time.defaultSettings" msgstr "Impostazioni predefinite" @@ -267,7 +267,7 @@ msgstr "Palette di colori" #: app/configurator/components/chart-controls/color-ramp.tsx:155 msgid "controls.color.palette.diverging" -msgstr "" +msgstr "Divergente" #: app/configurator/components/chart-controls/color-palette.tsx:261 msgid "controls.color.palette.reset" @@ -339,33 +339,33 @@ msgstr "Descrizione" msgid "controls.dimensionvalue.none" msgstr "Nessun filtro" -#: app/configurator/components/filters.tsx:480 +#: app/configurator/components/filters.tsx:469 msgid "controls.filter.nb-elements" msgstr "{0} di {1}" -#: app/configurator/components/filters.tsx:414 -#: app/configurator/components/filters.tsx:658 +#: app/configurator/components/filters.tsx:403 +#: app/configurator/components/filters.tsx:647 msgid "controls.filter.select.all" msgstr "Seleziona tutti" -#: app/configurator/components/filters.tsx:421 -#: app/configurator/components/filters.tsx:656 +#: app/configurator/components/filters.tsx:410 +#: app/configurator/components/filters.tsx:645 msgid "controls.filter.select.none" msgstr "Deseleziona tutto" -#: app/configurator/components/filters.tsx:431 +#: app/configurator/components/filters.tsx:420 msgid "controls.filters.select.filters" msgstr "Filtri" -#: app/configurator/components/filters.tsx:461 +#: app/configurator/components/filters.tsx:450 msgid "controls.filters.select.refresh-colors" msgstr "Aggiorna i colori" -#: app/configurator/components/filters.tsx:445 +#: app/configurator/components/filters.tsx:434 msgid "controls.filters.select.reset-colors" msgstr "Reimpostare i colori" -#: app/configurator/components/filters.tsx:438 +#: app/configurator/components/filters.tsx:427 msgid "controls.filters.select.selected-filters" msgstr "Filtri selezionati" @@ -385,13 +385,13 @@ msgstr "Trascina qui le colonne per creare gruppi." #~ msgid "controls.hierarchy.select" #~ msgstr "Selezionare un livello gerarchico" -#: app/configurator/components/empty-right-panel.tsx:24 +#: app/configurator/components/empty-right-panel.tsx:21 msgid "controls.hint.configuring.chart" msgstr "Seleziona un elemento di design o una dimensione dei dati per modificarne le opzioni." #: app/configurator/components/empty-right-panel.tsx:31 -msgid "controls.hint.describing.chart" -msgstr "Seleziona una delle annotazioni proposte per modificarla." +#~ msgid "controls.hint.describing.chart" +#~ msgstr "Seleziona una delle annotazioni proposte per modificarla." #: app/configurator/components/field-i18n.ts:87 msgid "controls.imputation" @@ -413,34 +413,34 @@ msgstr "-" msgid "controls.imputation.type.zeros" msgstr "Zeri" -#: app/configurator/interactive-filters/interactive-filters-configurator.tsx:117 +#: app/configurator/interactive-filters/interactive-filters-configurator.tsx:137 msgid "controls.interactive.filters.dataFilter" msgstr "Filtri di dati" -#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:104 -#: app/configurator/interactive-filters/interactive-filters-configurator.tsx:97 +#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:115 +#: app/configurator/interactive-filters/interactive-filters-configurator.tsx:117 msgid "controls.interactive.filters.timeSlider" msgstr "Cursore del tempo" -#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:327 +#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:375 msgid "controls.interactiveFilters.dataFilters.toggledataFilters" msgstr "Mostra i filtri di dati" -#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:77 +#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:89 msgid "controls.interactiveFilters.legend.toggleInteractiveLegend" msgstr "Mostra la legenda filtrante" -#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:222 +#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:233 msgid "controls.interactiveFilters.time.noTimeDimension" msgstr "Nessuna dimensione temporale disponibile!" -#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:197 +#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:208 msgid "controls.interactiveFilters.time.toggleTimeFilter" msgstr "Mostra i filtri temporali" #: app/configurator/interactive-filters/interactive-filters-config-options.tsx:263 -msgid "controls.interactiveFilters.time.toggleTimeSliderFilter" -msgstr "Mostra il cursore del tempo" +#~ msgid "controls.interactiveFilters.time.toggleTimeSliderFilter" +#~ msgstr "Mostra il cursore del tempo" #: app/configurator/components/field-i18n.ts:135 msgid "controls.language.english" @@ -467,9 +467,13 @@ msgstr "Italiano" msgid "controls.measure" msgstr "Misura" -#: app/configurator/components/field.tsx:817 -#~ msgid "controls.none" -#~ msgstr "Nessuno" +#: app/configurator/components/configurator.tsx:107 +msgid "controls.nav.back-to-preview" +msgstr "Torna all'anteprima" + +#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:292 +msgid "controls.none" +msgstr "Nessuno" #: app/configurator/components/chart-controls/control-tab.tsx:312 msgid "controls.option.isActive" @@ -491,11 +495,11 @@ msgstr "Cancella la ricerca" msgid "controls.section.additional-information" msgstr "Informazioni aggiuntive" -#: app/configurator/components/chart-configurator.tsx:549 +#: app/configurator/components/chart-configurator.tsx:545 msgid "controls.section.chart.options" msgstr "Opzioni del grafico" -#: app/configurator/table/table-chart-configurator.tsx:164 +#: app/configurator/table/table-chart-configurator.tsx:165 msgid "controls.section.columns" msgstr "Colonne" @@ -503,11 +507,11 @@ msgstr "Colonne" msgid "controls.section.columnstyle" msgstr "Stile della colonna" -#: app/configurator/components/chart-configurator.tsx:567 +#: app/configurator/components/chart-configurator.tsx:563 msgid "controls.section.data.filters" msgstr "Filtri" -#: app/configurator/components/chart-annotator.tsx:24 +#: app/configurator/components/chart-annotator.tsx:52 msgid "controls.section.description" msgstr "Titolo e descrizione" @@ -520,7 +524,7 @@ msgstr "Titolo e descrizione" msgid "controls.section.filter" msgstr "Filtro" -#: app/configurator/table/table-chart-configurator.tsx:155 +#: app/configurator/table/table-chart-configurator.tsx:156 msgid "controls.section.groups" msgstr "Gruppi" @@ -532,11 +536,12 @@ msgstr "Valori mancanti" msgid "controls.section.imputation.explanation" msgstr "Per questo tipo di grafico, i valori di sostituzione devono essere assegnati ai valori mancanti. Decidi la logica di imputazione o passa a un altro tipo di grafico." -#: app/configurator/interactive-filters/interactive-filters-configurator.tsx:78 +#: app/configurator/interactive-filters/interactive-filters-configurator.tsx:98 +#: app/configurator/interactive-filters/interactive-filters-configurator.tsx:157 msgid "controls.section.interactive.filters" msgstr "Filtri interattivi" -#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:117 +#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:128 msgid "controls.section.interactiveFilters.dataFilters" msgstr "Filtri di dati" @@ -552,16 +557,20 @@ msgstr "Ordina" msgid "controls.section.tableSettings" msgstr "Impostazioni della tabella" -#: app/configurator/table/table-chart-sorting-options.tsx:384 +#: app/configurator/table/table-chart-sorting-options.tsx:386 msgid "controls.section.tableSorting" msgstr "Ordinamento della tabella" -#: app/configurator/table/table-chart-configurator.tsx:130 +#: app/configurator/table/table-chart-configurator.tsx:131 msgid "controls.section.tableoptions" msgstr "Opzioni della tabella" -#: app/configurator/components/chart-configurator.tsx:541 -#: app/configurator/components/chart-type-selector.tsx:135 +#: app/configurator/components/chart-annotator.tsx:32 +msgid "controls.section.title.warning" +msgstr "Aggiungi un titolo o una descrizione" + +#: app/configurator/components/chart-configurator.tsx:537 +#: app/configurator/components/chart-type-selector.tsx:131 #: app/configurator/table/table-chart-configurator.tsx:123 msgid "controls.select.chart.type" msgstr "Tipo di grafico" @@ -603,6 +612,7 @@ msgid "controls.select.columnStyle.textStyle" msgstr "Stile del testo" #: app/configurator/components/chart-options-selector.tsx:220 +#: app/configurator/interactive-filters/interactive-filters-config-options.tsx:310 msgid "controls.select.dimension" msgstr "Seleziona una dimensione" @@ -619,15 +629,15 @@ msgstr "Seleziona una misura" #~ msgid "controls.select.optional" #~ msgstr "facoltativo" -#: app/configurator/components/filters.tsx:712 +#: app/configurator/components/filters.tsx:701 msgid "controls.set-filters" msgstr "Filtrer" -#: app/configurator/components/filters.tsx:719 +#: app/configurator/components/filters.tsx:708 msgid "controls.set-filters-caption" msgstr "Pour de meilleurs résultats, ne sélectionnez pas plus de 7 valeurs dans la visualisation" -#: app/configurator/components/filters.tsx:751 +#: app/configurator/components/filters.tsx:740 msgid "controls.set-values-apply" msgstr "Appliquer les filtres" @@ -635,7 +645,7 @@ msgstr "Appliquer les filtres" msgid "controls.size" msgstr "Grandezza" -#: app/configurator/table/table-chart-sorting-options.tsx:251 +#: app/configurator/table/table-chart-sorting-options.tsx:264 msgid "controls.sorting.addDimension" msgstr "Aggiungi una dimensione" @@ -690,20 +700,20 @@ msgstr "Il più grande per primo" msgid "controls.sorting.byTotalSize.largestTop" msgstr "Il più grande sopra" -#: app/configurator/table/table-chart-sorting-options.tsx:161 +#: app/configurator/table/table-chart-sorting-options.tsx:174 msgid "controls.sorting.removeOption" msgstr "Rimuovi l'ordinamento" -#: app/configurator/table/table-chart-sorting-options.tsx:213 +#: app/configurator/table/table-chart-sorting-options.tsx:226 msgid "controls.sorting.selectDimension" msgstr "Seleziona una dimensione ..." #: app/configurator/components/field-i18n.ts:43 -#: app/configurator/table/table-chart-sorting-options.tsx:322 +#: app/configurator/table/table-chart-sorting-options.tsx:335 msgid "controls.sorting.sortBy" msgstr "Ordina per" -#: app/configurator/components/chart-type-selector.tsx:140 +#: app/configurator/components/chart-type-selector.tsx:136 msgid "controls.switch.chart.type" msgstr "Passa a un altro tipo di grafico mantenendo la maggior parte delle impostazioni dei filtri" @@ -715,11 +725,11 @@ msgstr "Raggruppa secondo questa colonna" msgid "controls.table.column.hide" msgstr "Nascondi la colonna" -#: app/configurator/table/table-chart-configurator.tsx:142 +#: app/configurator/table/table-chart-configurator.tsx:143 msgid "controls.table.settings" msgstr "Opzioni" -#: app/configurator/table/table-chart-configurator.tsx:148 +#: app/configurator/table/table-chart-configurator.tsx:149 msgid "controls.table.sorting" msgstr "Ordinamento" @@ -751,7 +761,7 @@ msgstr "Fonte di dati" msgid "data.source.notTrusted" msgstr "Questo grafico non utilizza una fonte di dati affidabile." -#: app/configurator/components/select-dataset-step.tsx:179 +#: app/configurator/components/select-dataset-step.tsx:221 msgid "dataset-preview.back-to-results" msgstr "Torna ai set di dati" @@ -771,7 +781,7 @@ msgstr "Ultimo aggiornamento" msgid "dataset.hasImputedValues" msgstr "In questo set di dati mancano alcuni dati. Questi sono stati interpolati per colmare le lacune.." -#: app/configurator/components/dataset-browse.tsx:427 +#: app/configurator/components/dataset-browse.tsx:447 msgid "dataset.includeDrafts" msgstr "Includere le bozze" @@ -788,7 +798,7 @@ msgid "dataset.metadata.furtherinformation" msgstr "Addizionali informazioni" #: app/components/chart-footnotes.tsx:200 -#: app/configurator/components/dataset-metadata.tsx:118 +#: app/configurator/components/dataset-metadata.tsx:114 msgid "dataset.metadata.learnmore" msgstr "Ulteriori informazioni sul set di dati" @@ -800,21 +810,21 @@ msgstr "Fonte" msgid "dataset.metadata.version" msgstr "versione" -#: app/configurator/components/dataset-browse.tsx:351 +#: app/configurator/components/dataset-browse.tsx:404 msgid "dataset.order.newest" msgstr "Più recente" -#: app/configurator/components/dataset-browse.tsx:343 +#: app/configurator/components/dataset-browse.tsx:396 msgid "dataset.order.relevance" msgstr "Rilevanza" -#: app/configurator/components/dataset-browse.tsx:347 +#: app/configurator/components/dataset-browse.tsx:400 msgid "dataset.order.title" msgstr "Titolo" -#: app/components/chart-preview.tsx:85 +#: app/components/chart-preview.tsx:103 #: app/components/chart-published.tsx:126 -#: app/configurator/components/dataset-preview.tsx:109 +#: app/configurator/components/dataset-preview.tsx:120 msgid "dataset.publicationStatus.draft.warning" msgstr "Attenzione, questo set di dati è una bozza.<0/><1>Non utilizzare questo grafico per un rapporto!" @@ -822,27 +832,27 @@ msgstr "Attenzione, questo set di dati è una bozza.<0/><1>Non utilizzare questo msgid "dataset.publicationStatus.expires.warning" msgstr "Attenzione, questo set di dati è scaduto.<0/><1>Non utilizzare questo grafico per un rapporto!" -#: app/configurator/components/dataset-browse.tsx:415 +#: app/configurator/components/dataset-browse.tsx:435 msgid "dataset.results" msgstr "{0, plural, zero {Nessun set di dati} one {# set di dati} other {# set di dati}}" -#: app/configurator/components/dataset-browse.tsx:355 +#: app/configurator/components/dataset-browse.tsx:328 msgid "dataset.search.label" msgstr "Cerca" #: app/configurator/components/dataset-browse.tsx:360 -msgid "dataset.search.placeholder" -msgstr "" +#~ msgid "dataset.search.placeholder" +#~ msgstr "" -#: app/configurator/components/dataset-browse.tsx:446 +#: app/configurator/components/dataset-browse.tsx:459 msgid "dataset.sortby" msgstr "Ordina per" -#: app/configurator/components/dataset-browse.tsx:1152 +#: app/configurator/components/dataset-browse.tsx:1157 msgid "dataset.tag.draft" msgstr "Bozza" -#: app/configurator/components/dataset-preview.tsx:171 +#: app/configurator/components/dataset-preview.tsx:182 msgid "datatable.showing.first.rows" msgstr "Sono mostrate soltanto le prime 10 righe" @@ -882,7 +892,7 @@ msgstr "C'è stato un problema con il caricamento delle coordinate dalle dimensi msgid "hint.coordinatesloadingerror.title" msgstr "Errore di caricamento delle coordinate" -#: app/pages/v/[chartId].tsx:129 +#: app/pages/v/[chartId].tsx:128 msgid "hint.create.your.own.chart" msgstr "Copia questa visualizzazione o crea una nuova visualizzazione usando «dati aperti» dell’amministrazione pubblica svizzera" @@ -898,7 +908,7 @@ msgstr "Controlla la pagina di stato per ulteriori informazioni”" msgid "hint.dataloadingerror.title" msgstr "Problema di caricamento dei dati" -#: app/pages/v/[chartId].tsx:123 +#: app/pages/v/[chartId].tsx:122 msgid "hint.how.to.share" msgstr "È possibile condividere questa visualizzazione copiando l'URL o incorporandola nel vostro sito Web. Puoi anche creare una nuova visualizzazione partendo da zero oppure copiando e modificando la visualizzazione sopra." @@ -906,7 +916,7 @@ msgstr "È possibile condividere questa visualizzazione copiando l'URL o incorpo msgid "hint.loading.data" msgstr "Caricamento dei dati..." -#: app/configurator/components/chart-type-selector.tsx:153 +#: app/configurator/components/chart-type-selector.tsx:149 msgid "hint.no.visualization.with.dataset" msgstr "Nessuna visualizzazione può essere creata con il dataset selezionato." @@ -938,8 +948,8 @@ msgstr "Nascondi i filtri" msgid "interactive.data.filters.show" msgstr "Mostra i filtri" -#: app/components/header.tsx:188 -#: app/components/header.tsx:207 +#: app/components/header.tsx:201 +#: app/components/header.tsx:220 msgid "logo.swiss.confederation" msgstr "Logo della Confederazione svizzera" @@ -999,18 +1009,12 @@ msgstr "Ecco una visualizzazione che ho creato usando visualize.admin.ch" msgid "publication.share.mail.subject" msgstr "visualize.admin.ch" -#: app/configurator/components/filters.tsx:632 +#: app/configurator/components/dataset-browse.tsx:333 +#: app/configurator/components/dataset-browse.tsx:369 +#: app/configurator/components/filters.tsx:621 msgid "select.controls.filters.search" msgstr "Cerca" -#: app/configurator/components/stepper.tsx:209 -msgid "step.annotate" -msgstr "Prima di pubblicare, aggiungere un titolo e una descrizione al tuo grafico e scegliere quali elementi possono essere interattivi." - -#: app/configurator/components/stepper.tsx:198 -msgid "step.visualize" -msgstr "Personalizza la tua visualizzazione utilizzando le opzioni di segmentazione del filtro e del colore, nelle barre laterali." - #: app/configurator/components/chart-controls/drag-and-drop-tab.tsx:101 msgid "table.column.no" msgstr "Colonna {0}" From 916dcb7de6cf383dc00949a8546b5c5d674d7345 Mon Sep 17 00:00:00 2001 From: Patrick Browne Date: Tue, 8 Nov 2022 13:11:04 +0100 Subject: [PATCH 26/34] feat: Put login links below language menu --- app/components/language-menu.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/app/components/language-menu.tsx b/app/components/language-menu.tsx index 1f1db8ecc..4d7413b0f 100644 --- a/app/components/language-menu.tsx +++ b/app/components/language-menu.tsx @@ -43,7 +43,6 @@ export const LanguageMenu = ({ contentId }: { contentId?: string }) => { ml: [0, "auto"], width: ["100%", "auto"], backgroundColor: ["grey.300", "transparent"], - order: [1, 2], justifyContent: "flex-end", }} > From 038ef2bd10be57b33944f6af04ac2840a3eaa15c Mon Sep 17 00:00:00 2001 From: Patrick Browne Date: Tue, 8 Nov 2022 13:11:16 +0100 Subject: [PATCH 27/34] refactor: Remove unused --- app/configurator/components/chart-annotations-selector.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/configurator/components/chart-annotations-selector.tsx b/app/configurator/components/chart-annotations-selector.tsx index 3152f9fd2..6675aa156 100644 --- a/app/configurator/components/chart-annotations-selector.tsx +++ b/app/configurator/components/chart-annotations-selector.tsx @@ -62,7 +62,7 @@ export const ChartAnnotationsSelector = ({ }: { state: ConfiguratorStateConfiguringChart; }) => { - const { activeField, meta } = state; + const { activeField } = state; const panelRef = useRef(null); useEffect(() => { if (panelRef && panelRef.current) { From 314328420284532651e7ea9533c3edcaa790811c Mon Sep 17 00:00:00 2001 From: Patrick Browne Date: Tue, 8 Nov 2022 13:38:25 +0100 Subject: [PATCH 28/34] feat: Add right icon to field controls --- .../components/chart-controls/control-tab.tsx | 9 +++++++++ .../components/chart-controls/section.tsx | 12 +++++++++--- app/configurator/components/field.tsx | 15 ++++++++++++++- 3 files changed, 32 insertions(+), 4 deletions(-) diff --git a/app/configurator/components/chart-controls/control-tab.tsx b/app/configurator/components/chart-controls/control-tab.tsx index 34699de53..ee303793b 100644 --- a/app/configurator/components/chart-controls/control-tab.tsx +++ b/app/configurator/components/chart-controls/control-tab.tsx @@ -16,11 +16,13 @@ export const ControlTab = ({ onClick, checked, labelId, + rightIcon, }: { component?: DimensionMetadataFragment; value: string; onClick: (x: string) => void; labelId: string; + rightIcon?: React.ReactNode; } & FieldProps) => { return ( @@ -95,12 +98,14 @@ export const AnnotatorTab = ({ onClick, icon, label, + rightIcon, }: { disabled?: boolean; onClick: (x: string) => void; value: string; icon: IconName; label: ReactNode; + rightIcon?: ReactNode; } & FieldProps) => { return ( @@ -238,6 +244,7 @@ export const ControlTabButtonInner = ({ upperLabel, lowerLabel, checked, + rightIcon, optional = false, isActive = false, showIsActive = false, @@ -250,6 +257,7 @@ export const ControlTabButtonInner = ({ // On / Off indicator isActive?: boolean; showIsActive?: boolean; + rightIcon?: React.ReactNode; }) => { const classes = useStyles(); return ( @@ -312,6 +320,7 @@ export const ControlTabButtonInner = ({ On ) : null} + {rightIcon} ); }; diff --git a/app/configurator/components/chart-controls/section.tsx b/app/configurator/components/chart-controls/section.tsx index 8c53c7a70..fc5bb77d7 100644 --- a/app/configurator/components/chart-controls/section.tsx +++ b/app/configurator/components/chart-controls/section.tsx @@ -67,7 +67,7 @@ const useSectionTitleStyles = makeStyles< collapse ? theme.palette.grey[200] : "transparent", "& $icon": { - color: theme.palette.grey[900], + color: theme.palette.grey[600], }, }, }, @@ -83,7 +83,7 @@ const useSectionTitleStyles = makeStyles< }, icon: { justifySelf: "flex-end", - color: theme.palette.grey[600], + color: theme.palette.grey[500], }, })); @@ -226,7 +226,13 @@ export const SectionTitle = ({ {right} - {collapse ? isOpen ? : : null} + {collapse ? ( + isOpen ? ( + + ) : ( + + ) + ) : null}
); diff --git a/app/configurator/components/field.tsx b/app/configurator/components/field.tsx index 968dc0aa6..5737e625c 100644 --- a/app/configurator/components/field.tsx +++ b/app/configurator/components/field.tsx @@ -52,9 +52,21 @@ import { truthy } from "@/domain/types"; import { useTimeFormatLocale } from "@/formatters"; import { DimensionMetadataFragment, TimeUnit } from "@/graphql/query-hooks"; import { IconName } from "@/icons"; +import SvgIcEdit from "@/icons/components/IcEdit"; import { useLocale } from "@/locales/use-locale"; import { getPalette } from "@/palettes"; +const useFieldEditIconStyles = makeStyles((theme) => ({ + root: { + color: theme.palette.primary.main, + }, +})); + +const FieldEditIcon = () => { + const classes = useFieldEditIconStyles(); + return ; +}; + const useStyles = makeStyles((theme) => ({ loadingIndicator: { color: theme.palette.grey[700], @@ -84,6 +96,7 @@ export const ControlTabField = ({ labelId={labelId} checked={field.checked} onClick={field.onClick} + rightIcon={} /> ); }; @@ -444,13 +457,13 @@ export const AnnotatorTabField = ({ const fieldProps = useActiveFieldField({ value, }); - return ( } /> ); }; From b0fef1a14ea850e478bf9723d603c7353be994cd Mon Sep 17 00:00:00 2001 From: Patrick Browne Date: Tue, 8 Nov 2022 14:02:15 +0100 Subject: [PATCH 29/34] feat: Add warning on annotator fields --- .../components/chart-annotator.tsx | 28 +++++++---- .../components/chart-controls/control-tab.tsx | 48 +++++++++++++------ app/configurator/components/field.tsx | 34 ++++++++++--- .../table/table-chart-configurator.tsx | 4 +- app/locales/de/messages.po | 18 +++++-- app/locales/en/messages.po | 18 +++++-- app/locales/fr/messages.po | 20 +++++--- app/locales/it/messages.po | 18 +++++-- 8 files changed, 133 insertions(+), 55 deletions(-) diff --git a/app/configurator/components/chart-annotator.tsx b/app/configurator/components/chart-annotator.tsx index 97f0ffbfd..e41336785 100644 --- a/app/configurator/components/chart-annotator.tsx +++ b/app/configurator/components/chart-annotator.tsx @@ -11,20 +11,18 @@ import { AnnotatorTabField } from "@/configurator/components/field"; import { getFieldLabel } from "@/configurator/components/field-i18n"; import { InteractiveFiltersConfigurator } from "@/configurator/interactive-filters/interactive-filters-configurator"; import SvgIcExclamation from "@/icons/components/IcExclamation"; -import { useConfiguratorState } from "@/src"; +import { useConfiguratorState, useLocale } from "@/src"; import { ConfiguratorStateConfiguringChart } from "../config-types"; import { isConfiguring } from "../configurator-state"; const WarnTitleDescription = () => { const [state] = useConfiguratorState(isConfiguring); + const locale = useLocale(); const hasSomeTitleOrDescription = React.useMemo(() => { const { title, description } = state.meta; - return ( - Object.values(title).some((x) => x != "") || - Object.values(description).some((x) => x != "") - ); - }, [state.meta]); + return title[locale] !== "" && description[locale] !== ""; + }, [state.meta, locale]); return hasSomeTitleOrDescription ? null : ( { + emptyValueWarning={ + + Please add a title + + } + mainLabel={getFieldLabel("title")} + /> + emptyValueWarning={ + + Please add a description + + } + mainLabel={getFieldLabel("description")} + />
); diff --git a/app/configurator/components/chart-controls/control-tab.tsx b/app/configurator/components/chart-controls/control-tab.tsx index ee303793b..09ec7557e 100644 --- a/app/configurator/components/chart-controls/control-tab.tsx +++ b/app/configurator/components/chart-controls/control-tab.tsx @@ -40,7 +40,7 @@ export const ControlTab = ({ void; + value: string; + icon: IconName; + mainLabel: ReactNode; + upperLabel?: ReactNode; + lowerLabel?: ReactNode; + rightIcon?: ReactNode; +} & FieldProps; + export const AnnotatorTab = ({ value, checked, onClick, icon, - label, + upperLabel, + mainLabel, + lowerLabel, rightIcon, -}: { - disabled?: boolean; - onClick: (x: string) => void; - value: string; - icon: IconName; - label: ReactNode; - rightIcon?: ReactNode; -} & FieldProps) => { +}: AnnotatorTabProps) => { return ( @@ -166,7 +174,7 @@ export const DraggableTab = ({ @@ -242,6 +250,7 @@ export const ControlTabButton = ({ export const ControlTabButtonInner = ({ iconName, upperLabel, + mainLabel, lowerLabel, checked, rightIcon, @@ -251,7 +260,8 @@ export const ControlTabButtonInner = ({ }: { iconName: IconName; upperLabel?: string | ReactNode; - lowerLabel: string | ReactNode; + mainLabel: string | ReactNode; + lowerLabel?: string | ReactNode; checked?: boolean; optional?: boolean; // On / Off indicator @@ -307,8 +317,16 @@ export const ControlTabButtonInner = ({ textAlign: "left", }} > - {lowerLabel} + {mainLabel}
+ {lowerLabel && ( + + {lowerLabel} + + )} {showIsActive && isActive === false ? ( diff --git a/app/configurator/components/field.tsx b/app/configurator/components/field.tsx index 5737e625c..38f067eb2 100644 --- a/app/configurator/components/field.tsx +++ b/app/configurator/components/field.tsx @@ -1,9 +1,15 @@ import { t } from "@lingui/macro"; -import { CircularProgress, Theme } from "@mui/material"; +import { CircularProgress, Theme, Typography } from "@mui/material"; import { makeStyles } from "@mui/styles"; import { extent, timeFormat, TimeLocaleObject, timeParse } from "d3"; import get from "lodash/get"; -import { ChangeEvent, ReactNode, useCallback, useMemo, useState } from "react"; +import React, { + ChangeEvent, + ReactNode, + useCallback, + useMemo, + useState, +} from "react"; import Flex from "@/components/flex"; import { @@ -19,6 +25,7 @@ import { import { ColorPickerMenu } from "@/configurator/components/chart-controls/color-picker"; import { AnnotatorTab, + AnnotatorTabProps, ControlTab, OnOffControlTab, } from "@/configurator/components/chart-controls/control-tab"; @@ -51,7 +58,6 @@ import { FIELD_VALUE_NONE } from "@/configurator/constants"; import { truthy } from "@/domain/types"; import { useTimeFormatLocale } from "@/formatters"; import { DimensionMetadataFragment, TimeUnit } from "@/graphql/query-hooks"; -import { IconName } from "@/icons"; import SvgIcEdit from "@/icons/components/IcEdit"; import { useLocale } from "@/locales/use-locale"; import { getPalette } from "@/palettes"; @@ -447,19 +453,33 @@ export const TimeInput = ({ export const AnnotatorTabField = ({ value, + emptyValueWarning, ...tabProps }: { value: string; - disabled?: boolean; - icon: IconName; - label: ReactNode; -}) => { + emptyValueWarning?: React.ReactNode; +} & Omit) => { const fieldProps = useActiveFieldField({ value, }); + + const [state] = useConfiguratorState(isConfiguring); + const locale = useLocale(); + const hasText = useMemo(() => { + const key = value as "title" | "description"; + return state.meta[key][locale] !== ""; + }, [state.meta, value, locale]); + return ( + {emptyValueWarning} +
+ ) + } value={`${fieldProps.value}`} checked={fieldProps.checked} onClick={fieldProps.onClick} diff --git a/app/configurator/table/table-chart-configurator.tsx b/app/configurator/table/table-chart-configurator.tsx index 6d369848a..804e6c49b 100644 --- a/app/configurator/table/table-chart-configurator.tsx +++ b/app/configurator/table/table-chart-configurator.tsx @@ -140,13 +140,13 @@ export const ChartConfiguratorTable = ({ key={"settings"} value={"table-settings"} icon="settings" - label={Settings} + mainLabel={Settings} /> Sorting
} + mainLabel={Sorting} />
diff --git a/app/locales/de/messages.po b/app/locales/de/messages.po index 3614456b5..f6016ea59 100644 --- a/app/locales/de/messages.po +++ b/app/locales/de/messages.po @@ -187,6 +187,14 @@ msgstr "Normal" msgid "controls..interactiveFilters.time.defaultSettings" msgstr "Standardeinstellung" +#: app/configurator/components/chart-annotator.tsx:67 +msgid "controls.annotator.add-description-warning" +msgstr "Fügen Sie eine Beschreibung hinzu" + +#: app/configurator/components/chart-annotator.tsx:57 +msgid "controls.annotator.add-title-warning" +msgstr "Füge einen Titel hinzu" + #: app/configurator/components/field-i18n.ts:5 msgid "controls.axis.horizontal" msgstr "Horizontale Achse" @@ -232,7 +240,7 @@ msgstr "Tabelle" msgid "controls.color" msgstr "Farbe" -#: app/configurator/components/chart-controls/control-tab.tsx:45 +#: app/configurator/components/chart-controls/control-tab.tsx:47 msgid "controls.color.add" msgstr "Hinzufügen …" @@ -455,11 +463,11 @@ msgstr "" msgid "controls.none" msgstr "" -#: app/configurator/components/chart-controls/control-tab.tsx:312 +#: app/configurator/components/chart-controls/control-tab.tsx:338 msgid "controls.option.isActive" msgstr "Ein" -#: app/configurator/components/chart-controls/control-tab.tsx:308 +#: app/configurator/components/chart-controls/control-tab.tsx:334 msgid "controls.option.isNotActive" msgstr "Aus" @@ -495,7 +503,7 @@ msgstr "Spaltenstil" msgid "controls.section.data.filters" msgstr "Filter" -#: app/configurator/components/chart-annotator.tsx:52 +#: app/configurator/components/chart-annotator.tsx:50 msgid "controls.section.description" msgstr "Titel & Beschreibung" @@ -549,7 +557,7 @@ msgstr "Tabellensortierung" msgid "controls.section.tableoptions" msgstr "Tabellenoptionen" -#: app/configurator/components/chart-annotator.tsx:32 +#: app/configurator/components/chart-annotator.tsx:30 msgid "controls.section.title.warning" msgstr "Fügen Sie einen Titel oder eine Beschreibung hinzu" diff --git a/app/locales/en/messages.po b/app/locales/en/messages.po index 80d4ad8c0..a419e2113 100644 --- a/app/locales/en/messages.po +++ b/app/locales/en/messages.po @@ -207,6 +207,14 @@ msgstr "Regular" msgid "controls..interactiveFilters.time.defaultSettings" msgstr "Default Settings" +#: app/configurator/components/chart-annotator.tsx:67 +msgid "controls.annotator.add-description-warning" +msgstr "Please add a description" + +#: app/configurator/components/chart-annotator.tsx:57 +msgid "controls.annotator.add-title-warning" +msgstr "Please add a title" + #: app/configurator/components/field-i18n.ts:5 msgid "controls.axis.horizontal" msgstr "Horizontal Axis" @@ -252,7 +260,7 @@ msgstr "Table" msgid "controls.color" msgstr "Color" -#: app/configurator/components/chart-controls/control-tab.tsx:45 +#: app/configurator/components/chart-controls/control-tab.tsx:47 msgid "controls.color.add" msgstr "Add ..." @@ -475,11 +483,11 @@ msgstr "Back to preview" msgid "controls.none" msgstr "None" -#: app/configurator/components/chart-controls/control-tab.tsx:312 +#: app/configurator/components/chart-controls/control-tab.tsx:338 msgid "controls.option.isActive" msgstr "On" -#: app/configurator/components/chart-controls/control-tab.tsx:308 +#: app/configurator/components/chart-controls/control-tab.tsx:334 msgid "controls.option.isNotActive" msgstr "Off" @@ -511,7 +519,7 @@ msgstr "Column Style" msgid "controls.section.data.filters" msgstr "Filters" -#: app/configurator/components/chart-annotator.tsx:52 +#: app/configurator/components/chart-annotator.tsx:50 msgid "controls.section.description" msgstr "Title & Description" @@ -565,7 +573,7 @@ msgstr "Table Sorting" msgid "controls.section.tableoptions" msgstr "Table Options" -#: app/configurator/components/chart-annotator.tsx:32 +#: app/configurator/components/chart-annotator.tsx:30 msgid "controls.section.title.warning" msgstr "Please add a title or description." diff --git a/app/locales/fr/messages.po b/app/locales/fr/messages.po index 344ddfdc0..ff0d3de22 100644 --- a/app/locales/fr/messages.po +++ b/app/locales/fr/messages.po @@ -207,6 +207,14 @@ msgstr "Normal" msgid "controls..interactiveFilters.time.defaultSettings" msgstr "Paramètres d'origine" +#: app/configurator/components/chart-annotator.tsx:67 +msgid "controls.annotator.add-description-warning" +msgstr "Ajoutez une description au graphique" + +#: app/configurator/components/chart-annotator.tsx:57 +msgid "controls.annotator.add-title-warning" +msgstr "Ajoutez un titre au graphique" + #: app/configurator/components/field-i18n.ts:5 msgid "controls.axis.horizontal" msgstr "Axe horizontal" @@ -252,7 +260,7 @@ msgstr "Tableau" msgid "controls.color" msgstr "Couleur" -#: app/configurator/components/chart-controls/control-tab.tsx:45 +#: app/configurator/components/chart-controls/control-tab.tsx:47 msgid "controls.color.add" msgstr "Ajouter…" @@ -470,11 +478,11 @@ msgstr "Retour à l'aperçu" msgid "controls.none" msgstr "Aucun" -#: app/configurator/components/chart-controls/control-tab.tsx:312 +#: app/configurator/components/chart-controls/control-tab.tsx:338 msgid "controls.option.isActive" msgstr "Actif" -#: app/configurator/components/chart-controls/control-tab.tsx:308 +#: app/configurator/components/chart-controls/control-tab.tsx:334 msgid "controls.option.isNotActive" msgstr "Inactif" @@ -506,7 +514,7 @@ msgstr "Style de la colonne" msgid "controls.section.data.filters" msgstr "Filtres" -#: app/configurator/components/chart-annotator.tsx:52 +#: app/configurator/components/chart-annotator.tsx:50 msgid "controls.section.description" msgstr "Titre & description" @@ -560,9 +568,9 @@ msgstr "Tri du tableau" msgid "controls.section.tableoptions" msgstr "Options du tableau" -#: app/configurator/components/chart-annotator.tsx:32 +#: app/configurator/components/chart-annotator.tsx:30 msgid "controls.section.title.warning" -msgstr "Ajoutez un titre ou une description" +msgstr "Ajoutez un titre et une description" #: app/configurator/components/chart-configurator.tsx:537 #: app/configurator/components/chart-type-selector.tsx:131 diff --git a/app/locales/it/messages.po b/app/locales/it/messages.po index 7f7ecbd79..1e2f8152d 100644 --- a/app/locales/it/messages.po +++ b/app/locales/it/messages.po @@ -207,6 +207,14 @@ msgstr "Regular" msgid "controls..interactiveFilters.time.defaultSettings" msgstr "Impostazioni predefinite" +#: app/configurator/components/chart-annotator.tsx:67 +msgid "controls.annotator.add-description-warning" +msgstr "Aggiungi una descrizione" + +#: app/configurator/components/chart-annotator.tsx:57 +msgid "controls.annotator.add-title-warning" +msgstr "Aggiungi un titolo" + #: app/configurator/components/field-i18n.ts:5 msgid "controls.axis.horizontal" msgstr "Asse orizzontale" @@ -252,7 +260,7 @@ msgstr "Tabella" msgid "controls.color" msgstr "Colore" -#: app/configurator/components/chart-controls/control-tab.tsx:45 +#: app/configurator/components/chart-controls/control-tab.tsx:47 msgid "controls.color.add" msgstr "Aggiungi ..." @@ -475,11 +483,11 @@ msgstr "Torna all'anteprima" msgid "controls.none" msgstr "Nessuno" -#: app/configurator/components/chart-controls/control-tab.tsx:312 +#: app/configurator/components/chart-controls/control-tab.tsx:338 msgid "controls.option.isActive" msgstr "Attivo" -#: app/configurator/components/chart-controls/control-tab.tsx:308 +#: app/configurator/components/chart-controls/control-tab.tsx:334 msgid "controls.option.isNotActive" msgstr "Inattivo" @@ -511,7 +519,7 @@ msgstr "Stile della colonna" msgid "controls.section.data.filters" msgstr "Filtri" -#: app/configurator/components/chart-annotator.tsx:52 +#: app/configurator/components/chart-annotator.tsx:50 msgid "controls.section.description" msgstr "Titolo e descrizione" @@ -565,7 +573,7 @@ msgstr "Ordinamento della tabella" msgid "controls.section.tableoptions" msgstr "Opzioni della tabella" -#: app/configurator/components/chart-annotator.tsx:32 +#: app/configurator/components/chart-annotator.tsx:30 msgid "controls.section.title.warning" msgstr "Aggiungi un titolo o una descrizione" From 0962364d6b7e52f658b95d1e2068528d30ec3c54 Mon Sep 17 00:00:00 2001 From: Patrick Browne Date: Tue, 8 Nov 2022 14:42:31 +0100 Subject: [PATCH 30/34] refactor: Remove unused EmptyRightPanel --- .../components/chart-annotations-selector.tsx | 3 +- .../components/chart-options-selector.tsx | 5 +- .../components/empty-right-panel.tsx | 29 ------ app/locales/de/messages.po | 88 ++++++++----------- app/locales/en/messages.po | 88 ++++++++----------- app/locales/fr/messages.po | 88 ++++++++----------- app/locales/it/messages.po | 88 ++++++++----------- 7 files changed, 146 insertions(+), 243 deletions(-) delete mode 100644 app/configurator/components/empty-right-panel.tsx diff --git a/app/configurator/components/chart-annotations-selector.tsx b/app/configurator/components/chart-annotations-selector.tsx index 6675aa156..fbc9801f9 100644 --- a/app/configurator/components/chart-annotations-selector.tsx +++ b/app/configurator/components/chart-annotations-selector.tsx @@ -6,7 +6,6 @@ import { ControlSectionContent, SectionTitle, } from "@/configurator/components/chart-controls/section"; -import { EmptyRightPanel } from "@/configurator/components/empty-right-panel"; import { MetaInputField } from "@/configurator/components/field"; import { getFieldLabel } from "@/configurator/components/field-i18n"; import { getIconName } from "@/configurator/components/ui-helpers"; @@ -101,6 +100,6 @@ export const ChartAnnotationsSelector = ({
); } else { - return ; + return null; } }; diff --git a/app/configurator/components/chart-options-selector.tsx b/app/configurator/components/chart-options-selector.tsx index 141406f11..02127bcdf 100644 --- a/app/configurator/components/chart-options-selector.tsx +++ b/app/configurator/components/chart-options-selector.tsx @@ -39,7 +39,6 @@ import { ControlSectionSkeleton, SectionTitle, } from "@/configurator/components/chart-controls/section"; -import { EmptyRightPanel } from "@/configurator/components/empty-right-panel"; import { ChartFieldField, ChartOptionCheckboxField, @@ -137,9 +136,7 @@ export const ChartOptionsSelector = ({ imputationNeeded={imputationNeeded} /> ) - ) : ( - - )} + ) : null} ); } else { diff --git a/app/configurator/components/empty-right-panel.tsx b/app/configurator/components/empty-right-panel.tsx deleted file mode 100644 index 60436d727..000000000 --- a/app/configurator/components/empty-right-panel.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import { Trans } from "@lingui/macro"; -import { Typography } from "@mui/material"; -import { ReactNode } from "react"; - -import { ConfiguratorStateConfiguringChart } from "@/configurator"; - -export const EmptyRightPanel = ({ - state, -}: { - state: ConfiguratorStateConfiguringChart; -}) => ( - - {getRightPanelHint(state.state)} - -); - -const getRightPanelHint = (state: string): ReactNode => { - switch (state) { - case "CONFIGURING_CHART": - return ( - - Select a chart element or a data dimension in the left panel to modify - its options. - - ); - default: - return "blabla"; - } -}; diff --git a/app/locales/de/messages.po b/app/locales/de/messages.po index f6016ea59..8bd06d711 100644 --- a/app/locales/de/messages.po +++ b/app/locales/de/messages.po @@ -124,16 +124,16 @@ msgid "chart.map.layers.area" msgstr "Flächen" #: app/configurator/components/chart-configurator.tsx:697 -#: app/configurator/components/chart-options-selector.tsx:989 +#: app/configurator/components/chart-options-selector.tsx:986 #: app/configurator/components/field-i18n.ts:31 msgid "chart.map.layers.base" msgstr "Kartenanzeige" -#: app/configurator/components/chart-options-selector.tsx:993 +#: app/configurator/components/chart-options-selector.tsx:990 msgid "chart.map.layers.base.show" msgstr "Weltkarte anzeigen" -#: app/configurator/components/chart-options-selector.tsx:1001 +#: app/configurator/components/chart-options-selector.tsx:998 msgid "chart.map.layers.base.view.locked" msgstr "Gesperrte Ansicht" @@ -235,7 +235,7 @@ msgstr "Scatterplot" msgid "controls.chart.type.table" msgstr "Tabelle" -#: app/configurator/components/chart-options-selector.tsx:720 +#: app/configurator/components/chart-options-selector.tsx:717 #: app/configurator/components/field-i18n.ts:17 msgid "controls.color" msgstr "Farbe" @@ -244,7 +244,7 @@ msgstr "Farbe" msgid "controls.color.add" msgstr "Hinzufügen …" -#: app/configurator/components/chart-options-selector.tsx:749 +#: app/configurator/components/chart-options-selector.tsx:746 msgid "controls.color.opacity" msgstr "Transparenz" @@ -265,35 +265,35 @@ msgstr "Farbpalette zurücksetzen" msgid "controls.color.palette.sequential" msgstr "Sequentiell" -#: app/configurator/components/chart-options-selector.tsx:836 +#: app/configurator/components/chart-options-selector.tsx:833 msgid "controls.color.scale.discretization.jenks" msgstr "Jenks (Natural Breaks)" -#: app/configurator/components/chart-options-selector.tsx:829 +#: app/configurator/components/chart-options-selector.tsx:826 msgid "controls.color.scale.discretization.quantiles" msgstr "Quantile (gleiche Anzahl Werte)" -#: app/configurator/components/chart-options-selector.tsx:822 +#: app/configurator/components/chart-options-selector.tsx:819 msgid "controls.color.scale.discretization.quantize" msgstr "Quantisierung (gleiche Wertebereiche)" -#: app/configurator/components/chart-options-selector.tsx:814 +#: app/configurator/components/chart-options-selector.tsx:811 msgid "controls.color.scale.interpolation" msgstr "Interpolation" -#: app/configurator/components/chart-options-selector.tsx:846 +#: app/configurator/components/chart-options-selector.tsx:843 msgid "controls.color.scale.number.of.classes" msgstr "Anzahl Klassen" -#: app/configurator/components/chart-options-selector.tsx:786 +#: app/configurator/components/chart-options-selector.tsx:783 msgid "controls.color.scale.type.continuous" msgstr "Kontinuierlich" -#: app/configurator/components/chart-options-selector.tsx:797 +#: app/configurator/components/chart-options-selector.tsx:794 msgid "controls.color.scale.type.discrete" msgstr "Diskret" -#: app/configurator/components/chart-options-selector.tsx:739 +#: app/configurator/components/chart-options-selector.tsx:736 msgid "controls.color.select" msgstr "Farbe auswählen" @@ -365,38 +365,22 @@ msgstr "Zeitspanne" msgid "controls.groups.empty-help" msgstr "Ziehen Sie Spalten hierher, um Gruppen zu erstellen." -#: app/configurator/map/map-chart-options.tsx:204 -#~ msgid "controls.hierarchy" -#~ msgstr "Hierarchie-Ebene" - -#: app/configurator/map/map-chart-options.tsx:209 -#~ msgid "controls.hierarchy.select" -#~ msgstr "Hierarchie-Ebene auswählen" - -#: app/configurator/components/empty-right-panel.tsx:21 -msgid "controls.hint.configuring.chart" -msgstr "Bitte eine Designoption oder Datendimension auswählen, um diese zu bearbeiten." - -#: app/configurator/components/empty-right-panel.tsx:31 -#~ msgid "controls.hint.describing.chart" -#~ msgstr "Bitte ein Beschreibungsfeld auswählen, um dieses zu bearbeiten." - #: app/configurator/components/field-i18n.ts:87 msgid "controls.imputation" msgstr "Imputationstyp" -#: app/configurator/components/chart-options-selector.tsx:881 +#: app/configurator/components/chart-options-selector.tsx:878 #: app/configurator/components/field-i18n.ts:99 msgid "controls.imputation.type.linear" msgstr "Lineare Interpolation" -#: app/configurator/components/chart-options-selector.tsx:874 -#: app/configurator/components/chart-options-selector.tsx:886 +#: app/configurator/components/chart-options-selector.tsx:871 +#: app/configurator/components/chart-options-selector.tsx:883 #: app/configurator/components/field-i18n.ts:91 msgid "controls.imputation.type.none" msgstr "-" -#: app/configurator/components/chart-options-selector.tsx:876 +#: app/configurator/components/chart-options-selector.tsx:873 #: app/configurator/components/field-i18n.ts:95 msgid "controls.imputation.type.zeros" msgstr "Nullen" @@ -475,7 +459,7 @@ msgstr "Aus" #~ msgid "controls.option.none" #~ msgstr "Keine" -#: app/configurator/components/chart-options-selector.tsx:779 +#: app/configurator/components/chart-options-selector.tsx:776 msgid "controls.scale.type" msgstr "Skalierungstyp" @@ -483,7 +467,7 @@ msgstr "Skalierungstyp" msgid "controls.search.clear" msgstr "Suche zurücksetzen" -#: app/configurator/components/chart-options-selector.tsx:356 +#: app/configurator/components/chart-options-selector.tsx:353 msgid "controls.section.additional-information" msgstr "Zusätzliche Informationen" @@ -507,8 +491,8 @@ msgstr "Filter" msgid "controls.section.description" msgstr "Titel & Beschreibung" -#: app/configurator/components/chart-options-selector.tsx:411 -#: app/configurator/components/chart-options-selector.tsx:415 +#: app/configurator/components/chart-options-selector.tsx:408 +#: app/configurator/components/chart-options-selector.tsx:412 #: app/configurator/table/table-chart-options.tsx:314 #: app/configurator/table/table-chart-options.tsx:318 #: app/configurator/table/table-chart-options.tsx:338 @@ -520,11 +504,11 @@ msgstr "Filter" msgid "controls.section.groups" msgstr "Gruppierungen" -#: app/configurator/components/chart-options-selector.tsx:915 +#: app/configurator/components/chart-options-selector.tsx:912 msgid "controls.section.imputation" msgstr "Fehlende Werte" -#: app/configurator/components/chart-options-selector.tsx:920 +#: app/configurator/components/chart-options-selector.tsx:917 msgid "controls.section.imputation.explanation" msgstr "Für diesen Diagrammtyp sollten fehlenden Werten Ersatzwerte zugewiesen werden. Entscheiden Sie sich für die Imputationslogik oder wechseln Sie zu einem anderen Diagrammtyp." @@ -537,11 +521,11 @@ msgstr "Interaktive Filter hinzufügen" msgid "controls.section.interactiveFilters.dataFilters" msgstr "Datenfilter" -#: app/configurator/components/chart-options-selector.tsx:365 +#: app/configurator/components/chart-options-selector.tsx:362 msgid "controls.section.show-standard-error" msgstr "Standardfehler anzeigen" -#: app/configurator/components/chart-options-selector.tsx:557 +#: app/configurator/components/chart-options-selector.tsx:554 msgid "controls.section.sorting" msgstr "Sortieren" @@ -567,7 +551,7 @@ msgstr "Fügen Sie einen Titel oder eine Beschreibung hinzu" msgid "controls.select.chart.type" msgstr "Diagrammtyp" -#: app/configurator/components/chart-options-selector.tsx:461 +#: app/configurator/components/chart-options-selector.tsx:458 msgid "controls.select.column.layout" msgstr "Spaltenstil" @@ -603,14 +587,14 @@ msgstr "Schriftfarbe" msgid "controls.select.columnStyle.textStyle" msgstr "Schriftstil" -#: app/configurator/components/chart-options-selector.tsx:220 +#: app/configurator/components/chart-options-selector.tsx:217 #: app/configurator/interactive-filters/interactive-filters-config-options.tsx:310 msgid "controls.select.dimension" msgstr "Dimension auswählen" -#: app/configurator/components/chart-options-selector.tsx:221 -#: app/configurator/components/chart-options-selector.tsx:647 -#: app/configurator/components/chart-options-selector.tsx:725 +#: app/configurator/components/chart-options-selector.tsx:218 +#: app/configurator/components/chart-options-selector.tsx:644 +#: app/configurator/components/chart-options-selector.tsx:722 msgid "controls.select.measure" msgstr "Messwert auswählen" @@ -633,7 +617,7 @@ msgstr "Für beste Ergebnisse wählen Sie nicht mehr als 7 Werte für die Visual msgid "controls.set-values-apply" msgstr "Filter anwenden" -#: app/configurator/components/chart-options-selector.tsx:639 +#: app/configurator/components/chart-options-selector.tsx:636 msgid "controls.size" msgstr "Grösse" @@ -641,12 +625,12 @@ msgstr "Grösse" msgid "controls.sorting.addDimension" msgstr "Dimension hinzufügen" -#: app/configurator/components/chart-options-selector.tsx:509 +#: app/configurator/components/chart-options-selector.tsx:506 msgid "controls.sorting.byAuto" msgstr "Auto" -#: app/configurator/components/chart-options-selector.tsx:503 -#: app/configurator/components/chart-options-selector.tsx:513 +#: app/configurator/components/chart-options-selector.tsx:500 +#: app/configurator/components/chart-options-selector.tsx:510 msgid "controls.sorting.byDimensionLabel" msgstr "Name" @@ -660,7 +644,7 @@ msgstr "A → Z" msgid "controls.sorting.byDimensionLabel.descending" msgstr "Z → A" -#: app/configurator/components/chart-options-selector.tsx:505 +#: app/configurator/components/chart-options-selector.tsx:502 msgid "controls.sorting.byMeasure" msgstr "Messwert" @@ -672,7 +656,7 @@ msgstr "1 → 9" msgid "controls.sorting.byMeasure.descending" msgstr "9 → 1" -#: app/configurator/components/chart-options-selector.tsx:507 +#: app/configurator/components/chart-options-selector.tsx:504 msgid "controls.sorting.byTotalSize" msgstr "Gesamtgrösse" diff --git a/app/locales/en/messages.po b/app/locales/en/messages.po index a419e2113..89b732063 100644 --- a/app/locales/en/messages.po +++ b/app/locales/en/messages.po @@ -144,16 +144,16 @@ msgstr "Areas" #~ msgstr "Quantize (equal intervals)" #: app/configurator/components/chart-configurator.tsx:697 -#: app/configurator/components/chart-options-selector.tsx:989 +#: app/configurator/components/chart-options-selector.tsx:986 #: app/configurator/components/field-i18n.ts:31 msgid "chart.map.layers.base" msgstr "Map Display" -#: app/configurator/components/chart-options-selector.tsx:993 +#: app/configurator/components/chart-options-selector.tsx:990 msgid "chart.map.layers.base.show" msgstr "Show Worldmap" -#: app/configurator/components/chart-options-selector.tsx:1001 +#: app/configurator/components/chart-options-selector.tsx:998 msgid "chart.map.layers.base.view.locked" msgstr "Locked view" @@ -255,7 +255,7 @@ msgstr "Scatterplot" msgid "controls.chart.type.table" msgstr "Table" -#: app/configurator/components/chart-options-selector.tsx:720 +#: app/configurator/components/chart-options-selector.tsx:717 #: app/configurator/components/field-i18n.ts:17 msgid "controls.color" msgstr "Color" @@ -264,7 +264,7 @@ msgstr "Color" msgid "controls.color.add" msgstr "Add ..." -#: app/configurator/components/chart-options-selector.tsx:749 +#: app/configurator/components/chart-options-selector.tsx:746 msgid "controls.color.opacity" msgstr "Opacity" @@ -285,35 +285,35 @@ msgstr "Reset color palette" msgid "controls.color.palette.sequential" msgstr "Sequential" -#: app/configurator/components/chart-options-selector.tsx:836 +#: app/configurator/components/chart-options-selector.tsx:833 msgid "controls.color.scale.discretization.jenks" msgstr "Jenks (natural breaks)" -#: app/configurator/components/chart-options-selector.tsx:829 +#: app/configurator/components/chart-options-selector.tsx:826 msgid "controls.color.scale.discretization.quantiles" msgstr "Quantiles (equal distribution of values)" -#: app/configurator/components/chart-options-selector.tsx:822 +#: app/configurator/components/chart-options-selector.tsx:819 msgid "controls.color.scale.discretization.quantize" msgstr "Quantize (equal intervals)" -#: app/configurator/components/chart-options-selector.tsx:814 +#: app/configurator/components/chart-options-selector.tsx:811 msgid "controls.color.scale.interpolation" msgstr "Interpolation" -#: app/configurator/components/chart-options-selector.tsx:846 +#: app/configurator/components/chart-options-selector.tsx:843 msgid "controls.color.scale.number.of.classes" msgstr "Number of classes" -#: app/configurator/components/chart-options-selector.tsx:786 +#: app/configurator/components/chart-options-selector.tsx:783 msgid "controls.color.scale.type.continuous" msgstr "Continuous" -#: app/configurator/components/chart-options-selector.tsx:797 +#: app/configurator/components/chart-options-selector.tsx:794 msgid "controls.color.scale.type.discrete" msgstr "Discrete" -#: app/configurator/components/chart-options-selector.tsx:739 +#: app/configurator/components/chart-options-selector.tsx:736 msgid "controls.color.select" msgstr "Select a color" @@ -385,38 +385,22 @@ msgstr "Time Range" msgid "controls.groups.empty-help" msgstr "Drag and drop columns here to make groups." -#: app/configurator/map/map-chart-options.tsx:204 -#~ msgid "controls.hierarchy" -#~ msgstr "Hierarchy level" - -#: app/configurator/map/map-chart-options.tsx:209 -#~ msgid "controls.hierarchy.select" -#~ msgstr "Select a hierarchy level" - -#: app/configurator/components/empty-right-panel.tsx:21 -msgid "controls.hint.configuring.chart" -msgstr "Select a design element or a data dimension to modify its options." - -#: app/configurator/components/empty-right-panel.tsx:31 -#~ msgid "controls.hint.describing.chart" -#~ msgstr "Select an annotation field to modify its content." - #: app/configurator/components/field-i18n.ts:87 msgid "controls.imputation" msgstr "Imputation type" -#: app/configurator/components/chart-options-selector.tsx:881 +#: app/configurator/components/chart-options-selector.tsx:878 #: app/configurator/components/field-i18n.ts:99 msgid "controls.imputation.type.linear" msgstr "Linear interpolation" -#: app/configurator/components/chart-options-selector.tsx:874 -#: app/configurator/components/chart-options-selector.tsx:886 +#: app/configurator/components/chart-options-selector.tsx:871 +#: app/configurator/components/chart-options-selector.tsx:883 #: app/configurator/components/field-i18n.ts:91 msgid "controls.imputation.type.none" msgstr "-" -#: app/configurator/components/chart-options-selector.tsx:876 +#: app/configurator/components/chart-options-selector.tsx:873 #: app/configurator/components/field-i18n.ts:95 msgid "controls.imputation.type.zeros" msgstr "Zeros" @@ -491,7 +475,7 @@ msgstr "On" msgid "controls.option.isNotActive" msgstr "Off" -#: app/configurator/components/chart-options-selector.tsx:779 +#: app/configurator/components/chart-options-selector.tsx:776 msgid "controls.scale.type" msgstr "Scale type" @@ -499,7 +483,7 @@ msgstr "Scale type" msgid "controls.search.clear" msgstr "Clear search field" -#: app/configurator/components/chart-options-selector.tsx:356 +#: app/configurator/components/chart-options-selector.tsx:353 msgid "controls.section.additional-information" msgstr "Additional information" @@ -523,8 +507,8 @@ msgstr "Filters" msgid "controls.section.description" msgstr "Title & Description" -#: app/configurator/components/chart-options-selector.tsx:411 -#: app/configurator/components/chart-options-selector.tsx:415 +#: app/configurator/components/chart-options-selector.tsx:408 +#: app/configurator/components/chart-options-selector.tsx:412 #: app/configurator/table/table-chart-options.tsx:314 #: app/configurator/table/table-chart-options.tsx:318 #: app/configurator/table/table-chart-options.tsx:338 @@ -536,11 +520,11 @@ msgstr "Filter" msgid "controls.section.groups" msgstr "Groups" -#: app/configurator/components/chart-options-selector.tsx:915 +#: app/configurator/components/chart-options-selector.tsx:912 msgid "controls.section.imputation" msgstr "Missing values" -#: app/configurator/components/chart-options-selector.tsx:920 +#: app/configurator/components/chart-options-selector.tsx:917 msgid "controls.section.imputation.explanation" msgstr "For this chart type, replacement values should be assigned to missing values. Decide on the imputation logic or switch to another chart type." @@ -553,11 +537,11 @@ msgstr "Interactive Filters" msgid "controls.section.interactiveFilters.dataFilters" msgstr "Data Filters" -#: app/configurator/components/chart-options-selector.tsx:365 +#: app/configurator/components/chart-options-selector.tsx:362 msgid "controls.section.show-standard-error" msgstr "Show standard error" -#: app/configurator/components/chart-options-selector.tsx:557 +#: app/configurator/components/chart-options-selector.tsx:554 msgid "controls.section.sorting" msgstr "Sort" @@ -583,7 +567,7 @@ msgstr "Please add a title or description." msgid "controls.select.chart.type" msgstr "Chart Type" -#: app/configurator/components/chart-options-selector.tsx:461 +#: app/configurator/components/chart-options-selector.tsx:458 msgid "controls.select.column.layout" msgstr "Column layout" @@ -619,14 +603,14 @@ msgstr "Text Color" msgid "controls.select.columnStyle.textStyle" msgstr "Text Style" -#: app/configurator/components/chart-options-selector.tsx:220 +#: app/configurator/components/chart-options-selector.tsx:217 #: app/configurator/interactive-filters/interactive-filters-config-options.tsx:310 msgid "controls.select.dimension" msgstr "Select a dimension" -#: app/configurator/components/chart-options-selector.tsx:221 -#: app/configurator/components/chart-options-selector.tsx:647 -#: app/configurator/components/chart-options-selector.tsx:725 +#: app/configurator/components/chart-options-selector.tsx:218 +#: app/configurator/components/chart-options-selector.tsx:644 +#: app/configurator/components/chart-options-selector.tsx:722 msgid "controls.select.measure" msgstr "Select a measure" @@ -649,7 +633,7 @@ msgstr "For best results, do not select more than 7 values in the visualization. msgid "controls.set-values-apply" msgstr "Apply filters" -#: app/configurator/components/chart-options-selector.tsx:639 +#: app/configurator/components/chart-options-selector.tsx:636 msgid "controls.size" msgstr "Size" @@ -657,12 +641,12 @@ msgstr "Size" msgid "controls.sorting.addDimension" msgstr "Add dimension" -#: app/configurator/components/chart-options-selector.tsx:509 +#: app/configurator/components/chart-options-selector.tsx:506 msgid "controls.sorting.byAuto" msgstr "Automatic" -#: app/configurator/components/chart-options-selector.tsx:503 -#: app/configurator/components/chart-options-selector.tsx:513 +#: app/configurator/components/chart-options-selector.tsx:500 +#: app/configurator/components/chart-options-selector.tsx:510 msgid "controls.sorting.byDimensionLabel" msgstr "Name" @@ -676,7 +660,7 @@ msgstr "A → Z" msgid "controls.sorting.byDimensionLabel.descending" msgstr "Z → A" -#: app/configurator/components/chart-options-selector.tsx:505 +#: app/configurator/components/chart-options-selector.tsx:502 msgid "controls.sorting.byMeasure" msgstr "Measure" @@ -688,7 +672,7 @@ msgstr "1 → 9" msgid "controls.sorting.byMeasure.descending" msgstr "9 → 1" -#: app/configurator/components/chart-options-selector.tsx:507 +#: app/configurator/components/chart-options-selector.tsx:504 msgid "controls.sorting.byTotalSize" msgstr "Total size" diff --git a/app/locales/fr/messages.po b/app/locales/fr/messages.po index ff0d3de22..5d852cef0 100644 --- a/app/locales/fr/messages.po +++ b/app/locales/fr/messages.po @@ -144,16 +144,16 @@ msgstr "Zones" #~ msgstr "Intervalles égaux" #: app/configurator/components/chart-configurator.tsx:697 -#: app/configurator/components/chart-options-selector.tsx:989 +#: app/configurator/components/chart-options-selector.tsx:986 #: app/configurator/components/field-i18n.ts:31 msgid "chart.map.layers.base" msgstr "Affichage de la carte" -#: app/configurator/components/chart-options-selector.tsx:993 +#: app/configurator/components/chart-options-selector.tsx:990 msgid "chart.map.layers.base.show" msgstr "Afficher la carte du monde" -#: app/configurator/components/chart-options-selector.tsx:1001 +#: app/configurator/components/chart-options-selector.tsx:998 msgid "chart.map.layers.base.view.locked" msgstr "Carte verrouillée" @@ -255,7 +255,7 @@ msgstr "Nuage de points" msgid "controls.chart.type.table" msgstr "Tableau" -#: app/configurator/components/chart-options-selector.tsx:720 +#: app/configurator/components/chart-options-selector.tsx:717 #: app/configurator/components/field-i18n.ts:17 msgid "controls.color" msgstr "Couleur" @@ -264,7 +264,7 @@ msgstr "Couleur" msgid "controls.color.add" msgstr "Ajouter…" -#: app/configurator/components/chart-options-selector.tsx:749 +#: app/configurator/components/chart-options-selector.tsx:746 msgid "controls.color.opacity" msgstr "Transparence" @@ -285,35 +285,35 @@ msgstr "Réinitialiser la palette de couleurs" msgid "controls.color.palette.sequential" msgstr "Séquentielle" -#: app/configurator/components/chart-options-selector.tsx:836 +#: app/configurator/components/chart-options-selector.tsx:833 msgid "controls.color.scale.discretization.jenks" msgstr "Jenks (intervalles naturels)" -#: app/configurator/components/chart-options-selector.tsx:829 +#: app/configurator/components/chart-options-selector.tsx:826 msgid "controls.color.scale.discretization.quantiles" msgstr "Quantiles (distribution homogène des valeurs)" -#: app/configurator/components/chart-options-selector.tsx:822 +#: app/configurator/components/chart-options-selector.tsx:819 msgid "controls.color.scale.discretization.quantize" msgstr "Intervalles égaux" -#: app/configurator/components/chart-options-selector.tsx:814 +#: app/configurator/components/chart-options-selector.tsx:811 msgid "controls.color.scale.interpolation" msgstr "Interpolation" -#: app/configurator/components/chart-options-selector.tsx:846 +#: app/configurator/components/chart-options-selector.tsx:843 msgid "controls.color.scale.number.of.classes" msgstr "Nombre de classes" -#: app/configurator/components/chart-options-selector.tsx:786 +#: app/configurator/components/chart-options-selector.tsx:783 msgid "controls.color.scale.type.continuous" msgstr "Continue" -#: app/configurator/components/chart-options-selector.tsx:797 +#: app/configurator/components/chart-options-selector.tsx:794 msgid "controls.color.scale.type.discrete" msgstr "Discrète" -#: app/configurator/components/chart-options-selector.tsx:739 +#: app/configurator/components/chart-options-selector.tsx:736 msgid "controls.color.select" msgstr "Sélectionner une couleur" @@ -385,38 +385,22 @@ msgstr "Intervalle de temps" msgid "controls.groups.empty-help" msgstr "Glisser-déposer des colonnes ici pour créer des groupes." -#: app/configurator/map/map-chart-options.tsx:204 -#~ msgid "controls.hierarchy" -#~ msgstr "Niveau hiérarchique" - -#: app/configurator/map/map-chart-options.tsx:209 -#~ msgid "controls.hierarchy.select" -#~ msgstr "Sélectionner le niveau hiérarchique" - -#: app/configurator/components/empty-right-panel.tsx:21 -msgid "controls.hint.configuring.chart" -msgstr "Sélectionnez un élément de design ou une dimension du jeu de données pour modifier leurs options." - -#: app/configurator/components/empty-right-panel.tsx:31 -#~ msgid "controls.hint.describing.chart" -#~ msgstr "Sélectionnez une des annotations proposées pour la modifier." - #: app/configurator/components/field-i18n.ts:87 msgid "controls.imputation" msgstr "Type d'imputation" -#: app/configurator/components/chart-options-selector.tsx:881 +#: app/configurator/components/chart-options-selector.tsx:878 #: app/configurator/components/field-i18n.ts:99 msgid "controls.imputation.type.linear" msgstr "Interpolation linéaire" -#: app/configurator/components/chart-options-selector.tsx:874 -#: app/configurator/components/chart-options-selector.tsx:886 +#: app/configurator/components/chart-options-selector.tsx:871 +#: app/configurator/components/chart-options-selector.tsx:883 #: app/configurator/components/field-i18n.ts:91 msgid "controls.imputation.type.none" msgstr "-" -#: app/configurator/components/chart-options-selector.tsx:876 +#: app/configurator/components/chart-options-selector.tsx:873 #: app/configurator/components/field-i18n.ts:95 msgid "controls.imputation.type.zeros" msgstr "Zéros" @@ -486,7 +470,7 @@ msgstr "Actif" msgid "controls.option.isNotActive" msgstr "Inactif" -#: app/configurator/components/chart-options-selector.tsx:779 +#: app/configurator/components/chart-options-selector.tsx:776 msgid "controls.scale.type" msgstr "Type d'échelle" @@ -494,7 +478,7 @@ msgstr "Type d'échelle" msgid "controls.search.clear" msgstr "Effacer la recherche" -#: app/configurator/components/chart-options-selector.tsx:356 +#: app/configurator/components/chart-options-selector.tsx:353 msgid "controls.section.additional-information" msgstr "Informations supplémentaires" @@ -518,8 +502,8 @@ msgstr "Filtres" msgid "controls.section.description" msgstr "Titre & description" -#: app/configurator/components/chart-options-selector.tsx:411 -#: app/configurator/components/chart-options-selector.tsx:415 +#: app/configurator/components/chart-options-selector.tsx:408 +#: app/configurator/components/chart-options-selector.tsx:412 #: app/configurator/table/table-chart-options.tsx:314 #: app/configurator/table/table-chart-options.tsx:318 #: app/configurator/table/table-chart-options.tsx:338 @@ -531,11 +515,11 @@ msgstr "Filtre" msgid "controls.section.groups" msgstr "Groupes" -#: app/configurator/components/chart-options-selector.tsx:915 +#: app/configurator/components/chart-options-selector.tsx:912 msgid "controls.section.imputation" msgstr "Valeurs manquantes" -#: app/configurator/components/chart-options-selector.tsx:920 +#: app/configurator/components/chart-options-selector.tsx:917 msgid "controls.section.imputation.explanation" msgstr "En raison du type de graphique sélectionné, les valeurs manquantes doivent être remplies. Décidez de la logique d'imputation ou choisissez un autre type de graphique." @@ -548,11 +532,11 @@ msgstr "Filtres interactifs" msgid "controls.section.interactiveFilters.dataFilters" msgstr "Filtres de données" -#: app/configurator/components/chart-options-selector.tsx:365 +#: app/configurator/components/chart-options-selector.tsx:362 msgid "controls.section.show-standard-error" msgstr "Afficher l'erreur type" -#: app/configurator/components/chart-options-selector.tsx:557 +#: app/configurator/components/chart-options-selector.tsx:554 msgid "controls.section.sorting" msgstr "Trier" @@ -578,7 +562,7 @@ msgstr "Ajoutez un titre et une description" msgid "controls.select.chart.type" msgstr "Type de graphique" -#: app/configurator/components/chart-options-selector.tsx:461 +#: app/configurator/components/chart-options-selector.tsx:458 msgid "controls.select.column.layout" msgstr "Mise en forme de la colonne" @@ -614,14 +598,14 @@ msgstr "Couleur du texte" msgid "controls.select.columnStyle.textStyle" msgstr "Style du texte" -#: app/configurator/components/chart-options-selector.tsx:220 +#: app/configurator/components/chart-options-selector.tsx:217 #: app/configurator/interactive-filters/interactive-filters-config-options.tsx:310 msgid "controls.select.dimension" msgstr "Sélectionner une dimension" -#: app/configurator/components/chart-options-selector.tsx:221 -#: app/configurator/components/chart-options-selector.tsx:647 -#: app/configurator/components/chart-options-selector.tsx:725 +#: app/configurator/components/chart-options-selector.tsx:218 +#: app/configurator/components/chart-options-selector.tsx:644 +#: app/configurator/components/chart-options-selector.tsx:722 msgid "controls.select.measure" msgstr "Sélectionner une variable" @@ -644,7 +628,7 @@ msgstr "Pour de meilleurs résultats, ne sélectionnez pas plus de 7 valeurs dan msgid "controls.set-values-apply" msgstr "Appliquer les filtres" -#: app/configurator/components/chart-options-selector.tsx:639 +#: app/configurator/components/chart-options-selector.tsx:636 msgid "controls.size" msgstr "Taille" @@ -652,12 +636,12 @@ msgstr "Taille" msgid "controls.sorting.addDimension" msgstr "Ajouter une dimension" -#: app/configurator/components/chart-options-selector.tsx:509 +#: app/configurator/components/chart-options-selector.tsx:506 msgid "controls.sorting.byAuto" msgstr "Auto" -#: app/configurator/components/chart-options-selector.tsx:503 -#: app/configurator/components/chart-options-selector.tsx:513 +#: app/configurator/components/chart-options-selector.tsx:500 +#: app/configurator/components/chart-options-selector.tsx:510 msgid "controls.sorting.byDimensionLabel" msgstr "Nom" @@ -671,7 +655,7 @@ msgstr "A → Z" msgid "controls.sorting.byDimensionLabel.descending" msgstr "Z → A" -#: app/configurator/components/chart-options-selector.tsx:505 +#: app/configurator/components/chart-options-selector.tsx:502 msgid "controls.sorting.byMeasure" msgstr "Mesure" @@ -683,7 +667,7 @@ msgstr "1 → 9" msgid "controls.sorting.byMeasure.descending" msgstr "9 → 1" -#: app/configurator/components/chart-options-selector.tsx:507 +#: app/configurator/components/chart-options-selector.tsx:504 msgid "controls.sorting.byTotalSize" msgstr "Taille totale" diff --git a/app/locales/it/messages.po b/app/locales/it/messages.po index 1e2f8152d..0625c238a 100644 --- a/app/locales/it/messages.po +++ b/app/locales/it/messages.po @@ -144,16 +144,16 @@ msgstr "Aree" #~ msgstr "Intervalli uguali" #: app/configurator/components/chart-configurator.tsx:697 -#: app/configurator/components/chart-options-selector.tsx:989 +#: app/configurator/components/chart-options-selector.tsx:986 #: app/configurator/components/field-i18n.ts:31 msgid "chart.map.layers.base" msgstr "Visualizzazione della mappa" -#: app/configurator/components/chart-options-selector.tsx:993 +#: app/configurator/components/chart-options-selector.tsx:990 msgid "chart.map.layers.base.show" msgstr "Mostra mappa del mondo" -#: app/configurator/components/chart-options-selector.tsx:1001 +#: app/configurator/components/chart-options-selector.tsx:998 msgid "chart.map.layers.base.view.locked" msgstr "Vista bloccata" @@ -255,7 +255,7 @@ msgstr "Scatterplot" msgid "controls.chart.type.table" msgstr "Tabella" -#: app/configurator/components/chart-options-selector.tsx:720 +#: app/configurator/components/chart-options-selector.tsx:717 #: app/configurator/components/field-i18n.ts:17 msgid "controls.color" msgstr "Colore" @@ -264,7 +264,7 @@ msgstr "Colore" msgid "controls.color.add" msgstr "Aggiungi ..." -#: app/configurator/components/chart-options-selector.tsx:749 +#: app/configurator/components/chart-options-selector.tsx:746 msgid "controls.color.opacity" msgstr "Trasparenza" @@ -285,35 +285,35 @@ msgstr "Ripristina la tavolozza dei colori" msgid "controls.color.palette.sequential" msgstr "Sequenziale" -#: app/configurator/components/chart-options-selector.tsx:836 +#: app/configurator/components/chart-options-selector.tsx:833 msgid "controls.color.scale.discretization.jenks" msgstr "Jenks (interruzioni naturali)" -#: app/configurator/components/chart-options-selector.tsx:829 +#: app/configurator/components/chart-options-selector.tsx:826 msgid "controls.color.scale.discretization.quantiles" msgstr "Quantili (distribuzione omogenea dei valori)" -#: app/configurator/components/chart-options-selector.tsx:822 +#: app/configurator/components/chart-options-selector.tsx:819 msgid "controls.color.scale.discretization.quantize" msgstr "Intervalli uguali" -#: app/configurator/components/chart-options-selector.tsx:814 +#: app/configurator/components/chart-options-selector.tsx:811 msgid "controls.color.scale.interpolation" msgstr "Interpolazione" -#: app/configurator/components/chart-options-selector.tsx:846 +#: app/configurator/components/chart-options-selector.tsx:843 msgid "controls.color.scale.number.of.classes" msgstr "Numero di classi" -#: app/configurator/components/chart-options-selector.tsx:786 +#: app/configurator/components/chart-options-selector.tsx:783 msgid "controls.color.scale.type.continuous" msgstr "Continuo" -#: app/configurator/components/chart-options-selector.tsx:797 +#: app/configurator/components/chart-options-selector.tsx:794 msgid "controls.color.scale.type.discrete" msgstr "Discreto" -#: app/configurator/components/chart-options-selector.tsx:739 +#: app/configurator/components/chart-options-selector.tsx:736 msgid "controls.color.select" msgstr "Seleziona un colore" @@ -385,38 +385,22 @@ msgstr "intervallo di tempo" msgid "controls.groups.empty-help" msgstr "Trascina qui le colonne per creare gruppi." -#: app/configurator/map/map-chart-options.tsx:204 -#~ msgid "controls.hierarchy" -#~ msgstr "Livello gerarchico" - -#: app/configurator/map/map-chart-options.tsx:209 -#~ msgid "controls.hierarchy.select" -#~ msgstr "Selezionare un livello gerarchico" - -#: app/configurator/components/empty-right-panel.tsx:21 -msgid "controls.hint.configuring.chart" -msgstr "Seleziona un elemento di design o una dimensione dei dati per modificarne le opzioni." - -#: app/configurator/components/empty-right-panel.tsx:31 -#~ msgid "controls.hint.describing.chart" -#~ msgstr "Seleziona una delle annotazioni proposte per modificarla." - #: app/configurator/components/field-i18n.ts:87 msgid "controls.imputation" msgstr "Tipo di imputazione" -#: app/configurator/components/chart-options-selector.tsx:881 +#: app/configurator/components/chart-options-selector.tsx:878 #: app/configurator/components/field-i18n.ts:99 msgid "controls.imputation.type.linear" msgstr "Interpolazione lineare" -#: app/configurator/components/chart-options-selector.tsx:874 -#: app/configurator/components/chart-options-selector.tsx:886 +#: app/configurator/components/chart-options-selector.tsx:871 +#: app/configurator/components/chart-options-selector.tsx:883 #: app/configurator/components/field-i18n.ts:91 msgid "controls.imputation.type.none" msgstr "-" -#: app/configurator/components/chart-options-selector.tsx:876 +#: app/configurator/components/chart-options-selector.tsx:873 #: app/configurator/components/field-i18n.ts:95 msgid "controls.imputation.type.zeros" msgstr "Zeri" @@ -491,7 +475,7 @@ msgstr "Attivo" msgid "controls.option.isNotActive" msgstr "Inattivo" -#: app/configurator/components/chart-options-selector.tsx:779 +#: app/configurator/components/chart-options-selector.tsx:776 msgid "controls.scale.type" msgstr "Tipo di scala" @@ -499,7 +483,7 @@ msgstr "Tipo di scala" msgid "controls.search.clear" msgstr "Cancella la ricerca" -#: app/configurator/components/chart-options-selector.tsx:356 +#: app/configurator/components/chart-options-selector.tsx:353 msgid "controls.section.additional-information" msgstr "Informazioni aggiuntive" @@ -523,8 +507,8 @@ msgstr "Filtri" msgid "controls.section.description" msgstr "Titolo e descrizione" -#: app/configurator/components/chart-options-selector.tsx:411 -#: app/configurator/components/chart-options-selector.tsx:415 +#: app/configurator/components/chart-options-selector.tsx:408 +#: app/configurator/components/chart-options-selector.tsx:412 #: app/configurator/table/table-chart-options.tsx:314 #: app/configurator/table/table-chart-options.tsx:318 #: app/configurator/table/table-chart-options.tsx:338 @@ -536,11 +520,11 @@ msgstr "Filtro" msgid "controls.section.groups" msgstr "Gruppi" -#: app/configurator/components/chart-options-selector.tsx:915 +#: app/configurator/components/chart-options-selector.tsx:912 msgid "controls.section.imputation" msgstr "Valori mancanti" -#: app/configurator/components/chart-options-selector.tsx:920 +#: app/configurator/components/chart-options-selector.tsx:917 msgid "controls.section.imputation.explanation" msgstr "Per questo tipo di grafico, i valori di sostituzione devono essere assegnati ai valori mancanti. Decidi la logica di imputazione o passa a un altro tipo di grafico." @@ -553,11 +537,11 @@ msgstr "Filtri interattivi" msgid "controls.section.interactiveFilters.dataFilters" msgstr "Filtri di dati" -#: app/configurator/components/chart-options-selector.tsx:365 +#: app/configurator/components/chart-options-selector.tsx:362 msgid "controls.section.show-standard-error" msgstr "Mostra l'errore standard" -#: app/configurator/components/chart-options-selector.tsx:557 +#: app/configurator/components/chart-options-selector.tsx:554 msgid "controls.section.sorting" msgstr "Ordina" @@ -583,7 +567,7 @@ msgstr "Aggiungi un titolo o una descrizione" msgid "controls.select.chart.type" msgstr "Tipo di grafico" -#: app/configurator/components/chart-options-selector.tsx:461 +#: app/configurator/components/chart-options-selector.tsx:458 msgid "controls.select.column.layout" msgstr "Layout a colonne" @@ -619,14 +603,14 @@ msgstr "Colore del testo" msgid "controls.select.columnStyle.textStyle" msgstr "Stile del testo" -#: app/configurator/components/chart-options-selector.tsx:220 +#: app/configurator/components/chart-options-selector.tsx:217 #: app/configurator/interactive-filters/interactive-filters-config-options.tsx:310 msgid "controls.select.dimension" msgstr "Seleziona una dimensione" -#: app/configurator/components/chart-options-selector.tsx:221 -#: app/configurator/components/chart-options-selector.tsx:647 -#: app/configurator/components/chart-options-selector.tsx:725 +#: app/configurator/components/chart-options-selector.tsx:218 +#: app/configurator/components/chart-options-selector.tsx:644 +#: app/configurator/components/chart-options-selector.tsx:722 msgid "controls.select.measure" msgstr "Seleziona una misura" @@ -649,7 +633,7 @@ msgstr "Pour de meilleurs résultats, ne sélectionnez pas plus de 7 valeurs dan msgid "controls.set-values-apply" msgstr "Appliquer les filtres" -#: app/configurator/components/chart-options-selector.tsx:639 +#: app/configurator/components/chart-options-selector.tsx:636 msgid "controls.size" msgstr "Grandezza" @@ -657,12 +641,12 @@ msgstr "Grandezza" msgid "controls.sorting.addDimension" msgstr "Aggiungi una dimensione" -#: app/configurator/components/chart-options-selector.tsx:509 +#: app/configurator/components/chart-options-selector.tsx:506 msgid "controls.sorting.byAuto" msgstr "" -#: app/configurator/components/chart-options-selector.tsx:503 -#: app/configurator/components/chart-options-selector.tsx:513 +#: app/configurator/components/chart-options-selector.tsx:500 +#: app/configurator/components/chart-options-selector.tsx:510 msgid "controls.sorting.byDimensionLabel" msgstr "Nome" @@ -676,7 +660,7 @@ msgstr "A → Z" msgid "controls.sorting.byDimensionLabel.descending" msgstr "Z → A" -#: app/configurator/components/chart-options-selector.tsx:505 +#: app/configurator/components/chart-options-selector.tsx:502 msgid "controls.sorting.byMeasure" msgstr "Misura" @@ -688,7 +672,7 @@ msgstr "1 → 9" msgid "controls.sorting.byMeasure.descending" msgstr "9 → 1" -#: app/configurator/components/chart-options-selector.tsx:507 +#: app/configurator/components/chart-options-selector.tsx:504 msgid "controls.sorting.byTotalSize" msgstr "Grandezza totale" From 71f52713a31d8886428e8b30c90384e7118eddcf Mon Sep 17 00:00:00 2001 From: Patrick Browne Date: Tue, 8 Nov 2022 15:25:38 +0100 Subject: [PATCH 31/34] test: Use new data-testid for panel-drawer --- app/configurator/components/configurator.tsx | 2 +- e2e/actions.ts | 2 +- e2e/filter-position.spec.ts | 4 ++-- e2e/selectors.ts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/configurator/components/configurator.tsx b/app/configurator/components/configurator.tsx index 28ccaf564..fbf933842 100644 --- a/app/configurator/components/configurator.tsx +++ b/app/configurator/components/configurator.tsx @@ -130,7 +130,7 @@ const ConfigureChartStep = () => { hideBackdrop onClose={handleClosePanel} > -
+