From 5caec402cceaf6426526565f9baa8f01947d4089 Mon Sep 17 00:00:00 2001 From: Bartosz Prusinowski Date: Fri, 22 Sep 2023 16:00:05 +0200 Subject: [PATCH 01/14] fix: Retrieve either ComponentsWithHierarchies or Components (cache) --- CHANGELOG.md | 1 + app/configurator/configurator-state.tsx | 33 ++++++++++++++----------- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e6c57eed0..b874b9dc0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ You can also check the [release page](https://github.com/visualize-admin/visuali - Fixes - Cube checker now correctly checks if dimensions are present + - It's now possible to change the chart type for copied, non-hierarchical charts without having to open an options panel first # [3.22.6] - 2023-09-19 diff --git a/app/configurator/configurator-state.tsx b/app/configurator/configurator-state.tsx index ea01a42a8..8b36811f5 100644 --- a/app/configurator/configurator-state.tsx +++ b/app/configurator/configurator-state.tsx @@ -58,6 +58,9 @@ import { DimensionValue, isGeoDimension } from "@/domain/data"; import { DEFAULT_DATA_SOURCE } from "@/domain/datasource"; import { client } from "@/graphql/client"; import { + ComponentsDocument, + ComponentsQuery, + ComponentsQueryVariables, ComponentsWithHierarchiesDocument, ComponentsWithHierarchiesQuery, ComponentsWithHierarchiesQueryVariables, @@ -329,24 +332,26 @@ const getCachedMetadata = ( draft: ConfiguratorStateConfiguringChart, locale: Locale ): DataCubeMetadataWithHierarchies | null => { - const metadataQuery = client.readQuery< - DataCubeMetadataQuery, - DataCubeMetadataQueryVariables - >(DataCubeMetadataDocument, { - iri: draft.dataSet, - locale, - sourceType: draft.dataSource.type, - sourceUrl: draft.dataSource.url, - }); - const componentsQuery = client.readQuery< - ComponentsWithHierarchiesQuery, - ComponentsWithHierarchiesQueryVariables - >(ComponentsWithHierarchiesDocument, { + const variables = { iri: draft.dataSet, locale, sourceType: draft.dataSource.type, sourceUrl: draft.dataSource.url, - }); + }; + const metadataQuery = client.readQuery< + DataCubeMetadataQuery, + DataCubeMetadataQueryVariables + >(DataCubeMetadataDocument, variables); + // Some charts use hierarchical query, so we need to check for both. + const componentsQuery = + client.readQuery< + ComponentsWithHierarchiesQuery, + ComponentsWithHierarchiesQueryVariables + >(ComponentsWithHierarchiesDocument, variables) ?? + client.readQuery( + ComponentsDocument, + variables + ); return metadataQuery?.data?.dataCubeByIri && componentsQuery?.data?.dataCubeByIri From 873349a20b6f3ec155f55b868ed011b9f87685ee Mon Sep 17 00:00:00 2001 From: Bartosz Prusinowski Date: Tue, 26 Sep 2023 10:11:03 +0200 Subject: [PATCH 02/14] perf: Disable loading of dimension values for preview query --- CHANGELOG.md | 2 ++ app/graphql/queries/data-cubes.graphql | 25 +++++++++++++-- app/graphql/query-hooks.ts | 42 +++++++++++++++++++++++--- app/graphql/resolver-types.ts | 17 +++++++++-- app/graphql/resolvers/rdf.ts | 6 +++- app/graphql/schema.graphql | 13 ++++++++ 6 files changed, 94 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e6c57eed0..e496e2c0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ You can also check the [release page](https://github.com/visualize-admin/visuali - Fixes - Cube checker now correctly checks if dimensions are present +- Performance + - Dataset preview should now load quicker as we no longer fetch dimension values along with it # [3.22.6] - 2023-09-19 diff --git a/app/graphql/queries/data-cubes.graphql b/app/graphql/queries/data-cubes.graphql index ed35a11a3..b60f068c9 100644 --- a/app/graphql/queries/data-cubes.graphql +++ b/app/graphql/queries/data-cubes.graphql @@ -7,7 +7,12 @@ fragment dimensionMetadata on Dimension { dataType scaleType order - values(sourceType: $sourceType, sourceUrl: $sourceUrl, filters: $filters) + values( + sourceType: $sourceType + sourceUrl: $sourceUrl + filters: $filters + disableLoad: $disableValuesLoad + ) unit related { iri @@ -120,6 +125,7 @@ query DataCubePreview( $locale: String! $latest: Boolean $filters: Filters + $disableValuesLoad: Boolean = true ) { dataCubeByIri( iri: $iri @@ -127,15 +133,24 @@ query DataCubePreview( sourceUrl: $sourceUrl locale: $locale latest: $latest + disableValuesLoad: $disableValuesLoad ) { iri title description publicationStatus - dimensions(sourceType: $sourceType, sourceUrl: $sourceUrl) { + dimensions( + sourceType: $sourceType + sourceUrl: $sourceUrl + disableValuesLoad: $disableValuesLoad + ) { ...dimensionMetadata } - measures(sourceType: $sourceType, sourceUrl: $sourceUrl) { + measures( + sourceType: $sourceType + sourceUrl: $sourceUrl + disableValuesLoad: $disableValuesLoad + ) { ...dimensionMetadata } observations(sourceType: $sourceType, sourceUrl: $sourceUrl, limit: 10) { @@ -193,6 +208,7 @@ query Components( $latest: Boolean $filters: Filters $componentIris: [String!] + $disableValuesLoad: Boolean = false ) { dataCubeByIri( iri: $iri @@ -200,11 +216,13 @@ query Components( sourceUrl: $sourceUrl locale: $locale latest: $latest + disableValuesLoad: $disableValuesLoad ) { dimensions( sourceType: $sourceType sourceUrl: $sourceUrl componentIris: $componentIris + disableValuesLoad: $disableValuesLoad ) { ...dimensionMetadata } @@ -212,6 +230,7 @@ query Components( sourceType: $sourceType sourceUrl: $sourceUrl componentIris: $componentIris + disableValuesLoad: $disableValuesLoad ) { ...dimensionMetadata } diff --git a/app/graphql/query-hooks.ts b/app/graphql/query-hooks.ts index 3970f4392..12560b4f8 100644 --- a/app/graphql/query-hooks.ts +++ b/app/graphql/query-hooks.ts @@ -64,6 +64,7 @@ export type DataCubeDimensionsArgs = { sourceType: Scalars['String']; sourceUrl: Scalars['String']; componentIris?: Maybe>; + disableValuesLoad?: Maybe; }; @@ -78,6 +79,7 @@ export type DataCubeMeasuresArgs = { sourceType: Scalars['String']; sourceUrl: Scalars['String']; componentIris?: Maybe>; + disableValuesLoad?: Maybe; }; export type DataCubeOrganization = { @@ -142,6 +144,7 @@ export type DimensionValuesArgs = { sourceType: Scalars['String']; sourceUrl: Scalars['String']; filters?: Maybe; + disableLoad?: Maybe; }; @@ -183,6 +186,7 @@ export type GeoCoordinatesDimensionValuesArgs = { sourceType: Scalars['String']; sourceUrl: Scalars['String']; filters?: Maybe; + disableLoad?: Maybe; }; @@ -214,6 +218,7 @@ export type GeoShapesDimensionValuesArgs = { sourceType: Scalars['String']; sourceUrl: Scalars['String']; filters?: Maybe; + disableLoad?: Maybe; }; @@ -258,6 +263,7 @@ export type NominalDimensionValuesArgs = { sourceType: Scalars['String']; sourceUrl: Scalars['String']; filters?: Maybe; + disableLoad?: Maybe; }; @@ -291,6 +297,7 @@ export type NumericalMeasureValuesArgs = { sourceType: Scalars['String']; sourceUrl: Scalars['String']; filters?: Maybe; + disableLoad?: Maybe; }; @@ -340,6 +347,7 @@ export type OrdinalDimensionValuesArgs = { sourceType: Scalars['String']; sourceUrl: Scalars['String']; filters?: Maybe; + disableLoad?: Maybe; }; @@ -369,6 +377,7 @@ export type OrdinalMeasureValuesArgs = { sourceType: Scalars['String']; sourceUrl: Scalars['String']; filters?: Maybe; + disableLoad?: Maybe; }; @@ -397,6 +406,7 @@ export type QueryDataCubeByIriArgs = { latest?: Maybe; filters?: Maybe; componentIris?: Maybe>; + disableValuesLoad?: Maybe; }; @@ -485,6 +495,7 @@ export type StandardErrorDimensionValuesArgs = { sourceType: Scalars['String']; sourceUrl: Scalars['String']; filters?: Maybe; + disableLoad?: Maybe; }; @@ -516,6 +527,7 @@ export type TemporalDimensionValuesArgs = { sourceType: Scalars['String']; sourceUrl: Scalars['String']; filters?: Maybe; + disableLoad?: Maybe; }; @@ -545,6 +557,7 @@ export type TemporalOrdinalDimensionValuesArgs = { sourceType: Scalars['String']; sourceUrl: Scalars['String']; filters?: Maybe; + disableLoad?: Maybe; }; @@ -834,6 +847,7 @@ export type DataCubePreviewQueryVariables = Exact<{ locale: Scalars['String']; latest?: Maybe; filters?: Maybe; + disableValuesLoad?: Maybe; }>; @@ -891,6 +905,7 @@ export type ComponentsQueryVariables = Exact<{ latest?: Maybe; filters?: Maybe; componentIris?: Maybe | Scalars['String']>; + disableValuesLoad?: Maybe; }>; @@ -1153,7 +1168,12 @@ export const DimensionMetadataFragmentDoc = gql` dataType scaleType order - values(sourceType: $sourceType, sourceUrl: $sourceUrl, filters: $filters) + values( + sourceType: $sourceType + sourceUrl: $sourceUrl + filters: $filters + disableLoad: $disableValuesLoad + ) unit related { iri @@ -1271,22 +1291,31 @@ export function useDataCubesQuery(options: Omit({ query: DataCubesDocument, ...options }); }; export const DataCubePreviewDocument = gql` - query DataCubePreview($iri: String!, $sourceType: String!, $sourceUrl: String!, $locale: String!, $latest: Boolean, $filters: Filters) { + query DataCubePreview($iri: String!, $sourceType: String!, $sourceUrl: String!, $locale: String!, $latest: Boolean, $filters: Filters, $disableValuesLoad: Boolean = true) { dataCubeByIri( iri: $iri sourceType: $sourceType sourceUrl: $sourceUrl locale: $locale latest: $latest + disableValuesLoad: $disableValuesLoad ) { iri title description publicationStatus - dimensions(sourceType: $sourceType, sourceUrl: $sourceUrl) { + dimensions( + sourceType: $sourceType + sourceUrl: $sourceUrl + disableValuesLoad: $disableValuesLoad + ) { ...dimensionMetadata } - measures(sourceType: $sourceType, sourceUrl: $sourceUrl) { + measures( + sourceType: $sourceType + sourceUrl: $sourceUrl + disableValuesLoad: $disableValuesLoad + ) { ...dimensionMetadata } observations(sourceType: $sourceType, sourceUrl: $sourceUrl, limit: 10) { @@ -1340,18 +1369,20 @@ export function useDataCubeMetadataQuery(options: Omit({ query: DataCubeMetadataDocument, ...options }); }; export const ComponentsDocument = gql` - query Components($iri: String!, $sourceType: String!, $sourceUrl: String!, $locale: String!, $latest: Boolean, $filters: Filters, $componentIris: [String!]) { + query Components($iri: String!, $sourceType: String!, $sourceUrl: String!, $locale: String!, $latest: Boolean, $filters: Filters, $componentIris: [String!], $disableValuesLoad: Boolean = false) { dataCubeByIri( iri: $iri sourceType: $sourceType sourceUrl: $sourceUrl locale: $locale latest: $latest + disableValuesLoad: $disableValuesLoad ) { dimensions( sourceType: $sourceType sourceUrl: $sourceUrl componentIris: $componentIris + disableValuesLoad: $disableValuesLoad ) { ...dimensionMetadata } @@ -1359,6 +1390,7 @@ export const ComponentsDocument = gql` sourceType: $sourceType sourceUrl: $sourceUrl componentIris: $componentIris + disableValuesLoad: $disableValuesLoad ) { ...dimensionMetadata } diff --git a/app/graphql/resolver-types.ts b/app/graphql/resolver-types.ts index d70feb5b6..2a66d770c 100644 --- a/app/graphql/resolver-types.ts +++ b/app/graphql/resolver-types.ts @@ -66,6 +66,7 @@ export type DataCubeDimensionsArgs = { sourceType: Scalars['String']; sourceUrl: Scalars['String']; componentIris?: Maybe>; + disableValuesLoad?: Maybe; }; @@ -80,6 +81,7 @@ export type DataCubeMeasuresArgs = { sourceType: Scalars['String']; sourceUrl: Scalars['String']; componentIris?: Maybe>; + disableValuesLoad?: Maybe; }; export type DataCubeOrganization = { @@ -144,6 +146,7 @@ export type DimensionValuesArgs = { sourceType: Scalars['String']; sourceUrl: Scalars['String']; filters?: Maybe; + disableLoad?: Maybe; }; @@ -185,6 +188,7 @@ export type GeoCoordinatesDimensionValuesArgs = { sourceType: Scalars['String']; sourceUrl: Scalars['String']; filters?: Maybe; + disableLoad?: Maybe; }; @@ -216,6 +220,7 @@ export type GeoShapesDimensionValuesArgs = { sourceType: Scalars['String']; sourceUrl: Scalars['String']; filters?: Maybe; + disableLoad?: Maybe; }; @@ -260,6 +265,7 @@ export type NominalDimensionValuesArgs = { sourceType: Scalars['String']; sourceUrl: Scalars['String']; filters?: Maybe; + disableLoad?: Maybe; }; @@ -293,6 +299,7 @@ export type NumericalMeasureValuesArgs = { sourceType: Scalars['String']; sourceUrl: Scalars['String']; filters?: Maybe; + disableLoad?: Maybe; }; @@ -342,6 +349,7 @@ export type OrdinalDimensionValuesArgs = { sourceType: Scalars['String']; sourceUrl: Scalars['String']; filters?: Maybe; + disableLoad?: Maybe; }; @@ -371,6 +379,7 @@ export type OrdinalMeasureValuesArgs = { sourceType: Scalars['String']; sourceUrl: Scalars['String']; filters?: Maybe; + disableLoad?: Maybe; }; @@ -399,6 +408,7 @@ export type QueryDataCubeByIriArgs = { latest?: Maybe; filters?: Maybe; componentIris?: Maybe>; + disableValuesLoad?: Maybe; }; @@ -487,6 +497,7 @@ export type StandardErrorDimensionValuesArgs = { sourceType: Scalars['String']; sourceUrl: Scalars['String']; filters?: Maybe; + disableLoad?: Maybe; }; @@ -518,6 +529,7 @@ export type TemporalDimensionValuesArgs = { sourceType: Scalars['String']; sourceUrl: Scalars['String']; filters?: Maybe; + disableLoad?: Maybe; }; @@ -547,6 +559,7 @@ export type TemporalOrdinalDimensionValuesArgs = { sourceType: Scalars['String']; sourceUrl: Scalars['String']; filters?: Maybe; + disableLoad?: Maybe; }; @@ -636,6 +649,7 @@ export type ResolversTypes = ResolversObject<{ DataCube: ResolverTypeWrapper; String: ResolverTypeWrapper; Int: ResolverTypeWrapper; + Boolean: ResolverTypeWrapper; DataCubeOrganization: ResolverTypeWrapper; DataCubePublicationStatus: DataCubePublicationStatus; DataCubeResult: ResolverTypeWrapper & { dataCube: ResolversTypes['DataCube'] }>; @@ -645,7 +659,6 @@ export type ResolversTypes = ResolversObject<{ DataCubeTheme: ResolverTypeWrapper; DatasetCount: ResolverTypeWrapper; Dimension: ResolverTypeWrapper; - Boolean: ResolverTypeWrapper; DimensionValue: ResolverTypeWrapper; FilterValue: ResolverTypeWrapper; Filters: ResolverTypeWrapper; @@ -679,6 +692,7 @@ export type ResolversParentTypes = ResolversObject<{ DataCube: ResolvedDataCube; String: Scalars['String']; Int: Scalars['Int']; + Boolean: Scalars['Boolean']; DataCubeOrganization: DataCubeOrganization; DataCubeResult: Omit & { dataCube: ResolversParentTypes['DataCube'] }; Float: Scalars['Float']; @@ -686,7 +700,6 @@ export type ResolversParentTypes = ResolversObject<{ DataCubeTheme: DataCubeTheme; DatasetCount: DatasetCount; Dimension: ResolvedDimension; - Boolean: Scalars['Boolean']; DimensionValue: Scalars['DimensionValue']; FilterValue: Scalars['FilterValue']; Filters: Scalars['Filters']; diff --git a/app/graphql/resolvers/rdf.ts b/app/graphql/resolvers/rdf.ts index 080983814..95e80be32 100644 --- a/app/graphql/resolvers/rdf.ts +++ b/app/graphql/resolvers/rdf.ts @@ -333,7 +333,11 @@ export const hierarchy: NonNullable = async ( export const dimensionValues: NonNullable< NonNullable["values"] -> = async (parent, { filters }, { setup }, info) => { +> = async (parent, { filters, disableLoad }, { setup }, info) => { + if (disableLoad) { + return []; + } + const { loaders, sparqlClient, cache } = await setup(info); // Different loader if we have filters or not const loader = getDimensionValuesLoader( diff --git a/app/graphql/schema.graphql b/app/graphql/schema.graphql index a926324bc..51c33d7c4 100644 --- a/app/graphql/schema.graphql +++ b/app/graphql/schema.graphql @@ -57,6 +57,7 @@ type DataCube { sourceType: String! sourceUrl: String! componentIris: [String!] + disableValuesLoad: Boolean ): [Dimension!]! dimensionByIri( iri: String! @@ -67,6 +68,7 @@ type DataCube { sourceType: String! sourceUrl: String! componentIris: [String!] + disableValuesLoad: Boolean ): [Measure!]! themes: [DataCubeTheme!]! } @@ -102,6 +104,7 @@ interface Dimension { sourceType: String! sourceUrl: String! filters: Filters + disableLoad: Boolean ): [DimensionValue!]! related: [RelatedDimension!] hierarchy(sourceType: String!, sourceUrl: String!): [HierarchyValue!] @@ -128,6 +131,7 @@ type GeoCoordinatesDimension implements Dimension { sourceType: String! sourceUrl: String! filters: Filters + disableLoad: Boolean ): [DimensionValue!]! geoCoordinates: [GeoCoordinates!] related: [RelatedDimension!] @@ -154,6 +158,7 @@ type GeoShapesDimension implements Dimension { sourceType: String! sourceUrl: String! filters: Filters + disableLoad: Boolean ): [DimensionValue!]! geoShapes: GeoShapes related: [RelatedDimension!] @@ -174,6 +179,7 @@ type NominalDimension implements Dimension { sourceType: String! sourceUrl: String! filters: Filters + disableLoad: Boolean ): [DimensionValue!]! related: [RelatedDimension!] hierarchy(sourceType: String!, sourceUrl: String!): [HierarchyValue!] @@ -193,6 +199,7 @@ type OrdinalDimension implements Dimension { sourceType: String! sourceUrl: String! filters: Filters + disableLoad: Boolean ): [DimensionValue!]! related: [RelatedDimension!] hierarchy(sourceType: String!, sourceUrl: String!): [HierarchyValue!] @@ -212,6 +219,7 @@ type StandardErrorDimension implements Dimension { sourceType: String! sourceUrl: String! filters: Filters + disableLoad: Boolean ): [DimensionValue!]! related: [RelatedDimension!] hierarchy(sourceType: String!, sourceUrl: String!): [HierarchyValue!] @@ -243,6 +251,7 @@ type TemporalDimension implements Dimension { sourceType: String! sourceUrl: String! filters: Filters + disableLoad: Boolean ): [DimensionValue!]! related: [RelatedDimension!] hierarchy(sourceType: String!, sourceUrl: String!): [HierarchyValue!] @@ -262,6 +271,7 @@ type TemporalOrdinalDimension implements Dimension { sourceType: String! sourceUrl: String! filters: Filters + disableLoad: Boolean ): [DimensionValue!]! related: [RelatedDimension!] hierarchy(sourceType: String!, sourceUrl: String!): [HierarchyValue!] @@ -287,6 +297,7 @@ type NumericalMeasure implements Dimension { sourceType: String! sourceUrl: String! filters: Filters + disableLoad: Boolean ): [DimensionValue!]! related: [RelatedDimension!] hierarchy(sourceType: String!, sourceUrl: String!): [HierarchyValue!] @@ -306,6 +317,7 @@ type OrdinalMeasure implements Dimension { sourceType: String! sourceUrl: String! filters: Filters + disableLoad: Boolean ): [DimensionValue!]! related: [RelatedDimension!] hierarchy(sourceType: String!, sourceUrl: String!): [HierarchyValue!] @@ -355,6 +367,7 @@ type Query { latest: Boolean = true filters: Filters componentIris: [String!] + disableValuesLoad: Boolean ): DataCube possibleFilters( iri: String! From 8b8bbb69c7373fc46fd647180237c343a0a4db9d Mon Sep 17 00:00:00 2001 From: Bartosz Prusinowski Date: Tue, 26 Sep 2023 12:15:07 +0200 Subject: [PATCH 03/14] fix: E2E color -> segmentation --- e2e/abbreviations.spec.ts | 4 ++-- e2e/color-mapping-maps.spec.ts | 4 +++- e2e/filter-position.spec.ts | 2 +- e2e/ordinal-measures.spec.ts | 2 +- e2e/sorting.spec.ts | 8 ++++---- e2e/symbol-layer-colors.spec.ts | 2 +- 6 files changed, 12 insertions(+), 10 deletions(-) diff --git a/e2e/abbreviations.spec.ts b/e2e/abbreviations.spec.ts index 41f5c0d60..dd6653183 100644 --- a/e2e/abbreviations.spec.ts +++ b/e2e/abbreviations.spec.ts @@ -47,7 +47,7 @@ test("it should be possible to enable abbreviations for colors & x field (column await actions.drawer.close(); - await actions.editor.selectActiveField("Color"); + await actions.editor.selectActiveField("Segmentation"); await (await selectors.panels.drawer().within().findByText("None")).click(); @@ -80,7 +80,7 @@ test("hierarchies: it should be possible to enable abbreviations for colors", as ); await selectors.edition.drawerLoaded(); - await actions.editor.selectActiveField("Color"); + await actions.editor.selectActiveField("Segmentation"); await (await selectors.panels.drawer().within().findByText("None")).click(); diff --git a/e2e/color-mapping-maps.spec.ts b/e2e/color-mapping-maps.spec.ts index c9b9f14a4..6db13af9e 100644 --- a/e2e/color-mapping-maps.spec.ts +++ b/e2e/color-mapping-maps.spec.ts @@ -26,7 +26,9 @@ test("should be possible to de-select options from color component in maps", asy await selectors.chart.loaded(); - const colorControlSection = within(selectors.edition.controlSection("Color")); + const colorControlSection = within( + selectors.edition.controlSection("Segmentation") + ); const filtersButton = await colorControlSection.findByText( "Edit filters", diff --git a/e2e/filter-position.spec.ts b/e2e/filter-position.spec.ts index dd79e76bf..7a7bade26 100644 --- a/e2e/filter-position.spec.ts +++ b/e2e/filter-position.spec.ts @@ -10,7 +10,7 @@ test("Filters should be sorted by position", async ({ selectors, actions }) => { await selectors.edition.drawerLoaded(); - await actions.editor.selectActiveField("Color"); + await actions.editor.selectActiveField("Segmentation"); const selectorLocator = await selectors.panels .drawer() diff --git a/e2e/ordinal-measures.spec.ts b/e2e/ordinal-measures.spec.ts index 57411a65b..49be77084 100644 --- a/e2e/ordinal-measures.spec.ts +++ b/e2e/ordinal-measures.spec.ts @@ -69,7 +69,7 @@ describe("viewing a dataset with only ordinal measures", () => { // Chart needs to re-load when symbol layer is selected await selectors.chart.loaded(); - await within(selectors.edition.controlSection("Color")) + await within(selectors.edition.controlSection("Segmentation")) .getByText("None") .click(); diff --git a/e2e/sorting.spec.ts b/e2e/sorting.spec.ts index 82773258f..d2db422b2 100644 --- a/e2e/sorting.spec.ts +++ b/e2e/sorting.spec.ts @@ -32,11 +32,11 @@ test("Segment sorting", async ({ for (const chartType of ["Columns", "Lines", "Areas", "Pie"] as const) { await selectors.edition.drawerLoaded(); await actions.editor.changeChartType(chartType); - await actions.editor.selectActiveField("Color"); + await actions.editor.selectActiveField("Segmentation"); // Switch color on the first chart if (chartType === "Columns") { - await within(selectors.edition.controlSection("Color")) + await within(selectors.edition.controlSection("Segmentation")) .getByText("None") .click(); @@ -92,11 +92,11 @@ test("Segment sorting with hierarchy", async ({ ); await selectors.edition.drawerLoaded(); - await actions.editor.selectActiveField("Color"); + await actions.editor.selectActiveField("Segmentation"); await sleep(3_000); - const colorSection = selectors.edition.controlSection("Color"); + const colorSection = selectors.edition.controlSection("Segmentation"); await within(colorSection).getByText("None").click(); await actions.mui.selectOption("Region"); diff --git a/e2e/symbol-layer-colors.spec.ts b/e2e/symbol-layer-colors.spec.ts index fd343b017..63932f55c 100644 --- a/e2e/symbol-layer-colors.spec.ts +++ b/e2e/symbol-layer-colors.spec.ts @@ -18,7 +18,7 @@ test("Selecting SymbolLayer colors> should be possible to select geo dimension a await selectors.chart.loaded(); - await within(selectors.edition.controlSection("Color")) + await within(selectors.edition.controlSection("Segmentation")) .getByText("None") .click(); From 22a456547ccae48e1044e60b24fbf70678e37673 Mon Sep 17 00:00:00 2001 From: Bartosz Prusinowski Date: Wed, 27 Sep 2023 12:01:18 +0200 Subject: [PATCH 04/14] fix: Use the same y padding across different filters --- app/components/select-tree.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/select-tree.tsx b/app/components/select-tree.tsx index a2538bc4b..7aa454776 100644 --- a/app/components/select-tree.tsx +++ b/app/components/select-tree.tsx @@ -481,7 +481,7 @@ function SelectTree({ return (
{label && ( -