From 411fffeb939b8f98b8e97e8ce01c0256ef0d009f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Hornych?= Date: Sat, 4 Nov 2023 12:10:24 +0100 Subject: [PATCH 01/11] ci: fix minor version is not bumped if number of issue is specified in commit message --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8f092bd0..15af0d0d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,7 +43,7 @@ jobs: uses: codacy/git-version@2.7.1 with: prefix: 'v' - minor-identifier: 'feat:' + minor-identifier: 'feat' major-identifier: '(breaking)' # this should be placed somewhere in the commit message like "feat: (breaking) some message" - name: Setup Node.js From 484f8378319fb5600c16bfe396e4aaef9a120ab0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Hornych?= Date: Sat, 4 Nov 2023 15:22:05 +0100 Subject: [PATCH 02/11] perf(#62): big performance optimization for listing large number of group/facet statistics and hierarchy trees The biggest perf. blockers are chips with tooltips which are now being lazy loaded. Another problem is that there maybe large number of facets and groups. This is solved paginated list iterator --- src/components/base/VListItemLazyIterator.vue | 41 ++++++++++ ...orResultVisualiserFacetGroupStatistics.vue | 53 +++++++------ ...bEditorResultVisualiserFacetStatistics.vue | 68 ++++++++--------- ...isualiserReferenceFacetGroupStatistics.vue | 57 +++++++++----- ...ditorResultVisualiserHierarchyTreeNode.vue | 23 ++++-- ...ResultVisualiserHierarchyTreeNodeTitle.vue | 74 ++++++++++--------- ...abEditorResultVisualiserNamedHierarchy.vue | 62 +++++++++------- ...ultVisualiserReferenceNamedHierarchies.vue | 1 + 8 files changed, 238 insertions(+), 141 deletions(-) create mode 100644 src/components/base/VListItemLazyIterator.vue diff --git a/src/components/base/VListItemLazyIterator.vue b/src/components/base/VListItemLazyIterator.vue new file mode 100644 index 00000000..ed18b1f3 --- /dev/null +++ b/src/components/base/VListItemLazyIterator.vue @@ -0,0 +1,41 @@ + + + + + diff --git a/src/components/lab/editor/result-visualiser/facet-summary/LabEditorResultVisualiserFacetGroupStatistics.vue b/src/components/lab/editor/result-visualiser/facet-summary/LabEditorResultVisualiserFacetGroupStatistics.vue index 27a52526..399418a1 100644 --- a/src/components/lab/editor/result-visualiser/facet-summary/LabEditorResultVisualiserFacetGroupStatistics.vue +++ b/src/components/lab/editor/result-visualiser/facet-summary/LabEditorResultVisualiserFacetGroupStatistics.vue @@ -11,6 +11,9 @@ import LabEditorResultVisualiserFacetStatistics from '@/components/lab/editor/result-visualiser/facet-summary/LabEditorResultVisualiserFacetStatistics.vue' import { ResultVisualiserService } from '@/services/editor/result-visualiser/result-visualiser.service' import { Result, VisualisedFacetGroupStatistics } from '@/model/editor/result-visualiser' +import VListItemLazyIterator from '@/components/base/VListItemLazyIterator.vue' + +const facetStatisticsPageSize: number = 10 const toaster: Toaster = useToaster() @@ -50,7 +53,7 @@ const facetStatisticsResults = computed(() => { return [] } }) - +const facetStatisticsResultsPage = ref(1) function initializeFacets(): void { // todo lho this makes quick hide of the facet group, it looks weird @@ -89,31 +92,39 @@ function copyPrimaryKey(): void { - - - - {{ groupStatistics?.count ?? '-' }} - - - - The total number of entities matching any facet from this group without user filter. - - - - + + + + + {{ groupStatistics?.count ?? '-' }} + + + + The total number of entities matching any facet from this group without user filter. + + + + + diff --git a/src/components/lab/editor/result-visualiser/facet-summary/LabEditorResultVisualiserFacetStatistics.vue b/src/components/lab/editor/result-visualiser/facet-summary/LabEditorResultVisualiserFacetStatistics.vue index cebdb1be..cb384161 100644 --- a/src/components/lab/editor/result-visualiser/facet-summary/LabEditorResultVisualiserFacetStatistics.vue +++ b/src/components/lab/editor/result-visualiser/facet-summary/LabEditorResultVisualiserFacetStatistics.vue @@ -81,45 +81,47 @@ function copyPrimaryKey(): void { - - - - {{ facetStatistics?.numberOfEntities ?? '-' }} + + + + + {{ facetStatistics?.numberOfEntities ?? '-' }} + + + + The total number of entities matching the user filter. + + +  /  + + {{ facetStatistics?.impactDifference ?? '-' }} + + + + The difference from the current number of entities matching the user filter if this facet was requested. + + + + + + {{ facetStatistics?.impactMatchCount ?? '-' }} - + - The total number of entities matching the user filter. + The total number of entities matching the user filter if this facet was requested. - -  /  - - {{ facetStatistics?.impactDifference ?? '-' }} + + + + {{ facetStatistics?.count ?? '-' }} - + - The difference from the current number of entities matching the user filter if this facet was requested. + The total number of entities matching this facet without the user filter. - - - - - {{ facetStatistics?.impactMatchCount ?? '-' }} - - - - The total number of entities matching the user filter if this facet was requested. - - - - - {{ facetStatistics?.count ?? '-' }} - - - - The total number of entities matching this facet without the user filter. - - - + + + diff --git a/src/components/lab/editor/result-visualiser/facet-summary/LabEditorResultVisualiserReferenceFacetGroupStatistics.vue b/src/components/lab/editor/result-visualiser/facet-summary/LabEditorResultVisualiserReferenceFacetGroupStatistics.vue index af87cca4..18971af1 100644 --- a/src/components/lab/editor/result-visualiser/facet-summary/LabEditorResultVisualiserReferenceFacetGroupStatistics.vue +++ b/src/components/lab/editor/result-visualiser/facet-summary/LabEditorResultVisualiserReferenceFacetGroupStatistics.vue @@ -13,6 +13,9 @@ import LabEditorResultVisualiserFacetStatistics from '@/components/lab/editor/result-visualiser/facet-summary/LabEditorResultVisualiserFacetStatistics.vue' import { Result } from '@/model/editor/result-visualiser' import { ResultVisualiserService } from '@/services/editor/result-visualiser/result-visualiser.service' +import VListItemLazyIterator from '@/components/base/VListItemLazyIterator.vue' + +const statisticsPageSize: number = 10 const labService: LabService = useLabService() const toaster: Toaster = useToaster() @@ -26,6 +29,7 @@ const props = defineProps<{ }>() const initialized = ref(false) +const groupStatisticsResultsPage = ref(1) const groupRepresentativeAttributes: string[] = [] const facetRepresentativeAttributes: string[] = [] @@ -33,9 +37,9 @@ const isGroupedFacets = computed(() => { return props.referenceSchema.referencedGroupType != undefined }) -const facetStatisticsResults = computed(() => { +const facetStatisticsResults = computed(() => { if (isGroupedFacets.value) { - return undefined + return [] } if (props.groupStatisticsResults.length === 0) { return [] @@ -46,9 +50,10 @@ const facetStatisticsResults = computed(() => { .findFacetStatisticsResults(props.groupStatisticsResults[0]) } catch (e: any) { toaster.error(e) - return undefined + return [] } }) +const facetStatisticsResultsPage = ref(1) function initialize() { let pipeline: Promise @@ -95,25 +100,37 @@ initialize() diff --git a/src/components/lab/editor/result-visualiser/hierarchy/LabEditorResultVisualiserHierarchyTreeNode.vue b/src/components/lab/editor/result-visualiser/hierarchy/LabEditorResultVisualiserHierarchyTreeNode.vue index 2f2710cc..2b8b7d2b 100644 --- a/src/components/lab/editor/result-visualiser/hierarchy/LabEditorResultVisualiserHierarchyTreeNode.vue +++ b/src/components/lab/editor/result-visualiser/hierarchy/LabEditorResultVisualiserHierarchyTreeNode.vue @@ -6,12 +6,17 @@ import LabEditorResultVisualiserHierarchyTreeNodeTitle from '@/components/lab/editor/result-visualiser/hierarchy/LabEditorResultVisualiserHierarchyTreeNodeTitle.vue' import { VisualisedHierarchyTreeNode } from '@/model/editor/result-visualiser' +import VListItemLazyIterator from '@/components/base/VListItemLazyIterator.vue' +import { ref } from 'vue' + +const nodeChildrenPageSize: number = 10 const props = defineProps<{ node: VisualisedHierarchyTreeNode, entityRepresentativeAttributes: string[] }>() +const nodeChildrenPage = ref(1) - + + + diff --git a/src/components/lab/editor/result-visualiser/hierarchy/LabEditorResultVisualiserHierarchyTreeNodeTitle.vue b/src/components/lab/editor/result-visualiser/hierarchy/LabEditorResultVisualiserHierarchyTreeNodeTitle.vue index 6043e746..5aeecb4f 100644 --- a/src/components/lab/editor/result-visualiser/hierarchy/LabEditorResultVisualiserHierarchyTreeNodeTitle.vue +++ b/src/components/lab/editor/result-visualiser/hierarchy/LabEditorResultVisualiserHierarchyTreeNodeTitle.vue @@ -65,44 +65,46 @@ function copyParentPrimaryKey(): void { - - - Requested - - - - - + + + + Requested + + + + + - - {{ node.childrenCount ?? '-' }} - - - - - The count of child hierarchy nodes that exist in the hierarchy tree below the given node; - the count is correct regardless of whether the children themselves are requested/traversed - by the constraint definition, and respects hierarchyOfReference settings for automatic - removal of hierarchy nodes that would contain empty result set of queried entities - (REMOVE_EMPTY). - - - + + {{ node.childrenCount ?? '-' }} + + + + + The count of child hierarchy nodes that exist in the hierarchy tree below the given node; + the count is correct regardless of whether the children themselves are requested/traversed + by the constraint definition, and respects hierarchyOfReference settings for automatic + removal of hierarchy nodes that would contain empty result set of queried entities + (REMOVE_EMPTY). + + + - - {{ node.queriedEntityCount ?? '-' }} - - - - - The total number of queried entities that will be returned if the current query is focused - on this particular hierarchy node using the hierarchyWithin filter constraint - (the possible refining constraint in the form of directRelation and excludingRoot is not - taken into account). - - - - + + {{ node.queriedEntityCount ?? '-' }} + + + + + The total number of queried entities that will be returned if the current query is focused + on this particular hierarchy node using the hierarchyWithin filter constraint + (the possible refining constraint in the form of directRelation and excludingRoot is not + taken into account). + + + + + diff --git a/src/components/lab/editor/result-visualiser/hierarchy/LabEditorResultVisualiserNamedHierarchy.vue b/src/components/lab/editor/result-visualiser/hierarchy/LabEditorResultVisualiserNamedHierarchy.vue index 797fdaa5..6b3132da 100644 --- a/src/components/lab/editor/result-visualiser/hierarchy/LabEditorResultVisualiserNamedHierarchy.vue +++ b/src/components/lab/editor/result-visualiser/hierarchy/LabEditorResultVisualiserNamedHierarchy.vue @@ -10,6 +10,9 @@ import LabEditorResultVisualiserHierarchyTreeNode import { Result, VisualisedNamedHierarchy } from '@/model/editor/result-visualiser' import { ResultVisualiserService } from '@/services/editor/result-visualiser/result-visualiser.service' import VMarkdown from '@/components/base/VMarkdown.vue' +import VListItemLazyIterator from '@/components/base/VListItemLazyIterator.vue' + +const namedHierarchyTreesPageSize: number = 10 const toaster: Toaster = useToaster() @@ -30,6 +33,7 @@ const namedHierarchy = computed(() => { return undefined } }) +const namedHierarchyTreesPage = ref(1) const initialized = ref(false) function initialize(): void { @@ -46,37 +50,45 @@ function initialize(): void { {{ name }} - - - - {{ namedHierarchy?.count }} + + + + + {{ namedHierarchy?.count }} + + + The number of actually fetched nodes. + + + + + + {{ namedHierarchy?.requestedNode?.primaryKey != undefined ? `${namedHierarchy?.requestedNode?.primaryKey}: ` : '' }} + {{ namedHierarchy?.requestedNode?.title }} - - The number of actually fetched nodes. + + - - - - - {{ namedHierarchy?.requestedNode?.primaryKey != undefined ? `${namedHierarchy?.requestedNode?.primaryKey}: ` : '' }} - {{ namedHierarchy?.requestedNode?.title }} - - - - - - + + + - diff --git a/src/components/lab/editor/result-visualiser/hierarchy/LabEditorResultVisualiserReferenceNamedHierarchies.vue b/src/components/lab/editor/result-visualiser/hierarchy/LabEditorResultVisualiserReferenceNamedHierarchies.vue index 785e2551..0ccc8531 100644 --- a/src/components/lab/editor/result-visualiser/hierarchy/LabEditorResultVisualiserReferenceNamedHierarchies.vue +++ b/src/components/lab/editor/result-visualiser/hierarchy/LabEditorResultVisualiserReferenceNamedHierarchies.vue @@ -11,6 +11,7 @@ import LabEditorResultVisualiserNamedHierarchy from '@/components/lab/editor/result-visualiser/hierarchy/LabEditorResultVisualiserNamedHierarchy.vue' import { Result } from '@/model/editor/result-visualiser' import { ResultVisualiserService } from '@/services/editor/result-visualiser/result-visualiser.service' +import VListItemLazyIterator from '@/components/base/VListItemLazyIterator.vue' const labService: LabService = useLabService() const toaster: Toaster = useToaster() From ad7802814aae1e79c4df0efc9899b9f0d1affb8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Hornych?= Date: Sat, 4 Nov 2023 18:45:11 +0100 Subject: [PATCH 03/11] styles(#62): better facet statistics counts visualisation --- ...bEditorResultVisualiserFacetStatistics.vue | 94 ++++++++++++------- 1 file changed, 60 insertions(+), 34 deletions(-) diff --git a/src/components/lab/editor/result-visualiser/facet-summary/LabEditorResultVisualiserFacetStatistics.vue b/src/components/lab/editor/result-visualiser/facet-summary/LabEditorResultVisualiserFacetStatistics.vue index cb384161..8220c294 100644 --- a/src/components/lab/editor/result-visualiser/facet-summary/LabEditorResultVisualiserFacetStatistics.vue +++ b/src/components/lab/editor/result-visualiser/facet-summary/LabEditorResultVisualiserFacetStatistics.vue @@ -83,43 +83,57 @@ function copyPrimaryKey(): void { - - - {{ facetStatistics?.numberOfEntities ?? '-' }} - - - - The total number of entities matching the user filter. - - -  /  - - {{ facetStatistics?.impactDifference ?? '-' }} - - - - The difference from the current number of entities matching the user filter if this facet was requested. - - + +
+
+ mdi-set-right + {{ facetStatistics?.numberOfEntities ?? '-' }} / {{ facetStatistics?.impactDifference ?? '-' }} +
+
+ mdi-set-all + {{ facetStatistics?.impactMatchCount ?? '-' }} +
+
+ mdi-counter + {{ facetStatistics?.count ?? '-' }} +
+
- - {{ facetStatistics?.impactMatchCount ?? '-' }} - - - - The total number of entities matching the user filter if this facet was requested. - - + + mdi-set-right +
- - {{ facetStatistics?.count ?? '-' }} - - - - The total number of entities matching this facet without the user filter. - - + + + The total number of entities matching the user filter. + +
+ + + + The difference from the current number of entities matching the user filter if this facet was requested. + +
+
+ + mdi-set-all +
+ + + + The total number of entities matching the user filter if this facet was requested. + +
+
+ + mdi-counter +
+ + + + The total number of entities matching this facet without the user filter. +
@@ -139,4 +153,16 @@ function copyPrimaryKey(): void { .facet-checkbox--disabled { opacity: var(--v-disabled-opacity) } + +.facet-title-counter { + display: flex; + column-gap: 0.625rem; + align-items: center; + + &__section { + display: flex; + column-gap: 0.25rem; + align-items: center; + } +} From 3085ffbb9a8bbc07ff4d23af8ed70af2889e7753 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Hornych?= Date: Sat, 4 Nov 2023 18:48:28 +0100 Subject: [PATCH 04/11] styles: max width for tooltip so it cannot occupy entire screen --- src/plugins/vuetify.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/vuetify.ts b/src/plugins/vuetify.ts index 818141ff..0bb64382 100644 --- a/src/plugins/vuetify.ts +++ b/src/plugins/vuetify.ts @@ -39,6 +39,7 @@ export default createVuetify({ }, VTooltip: { contentClass: 'bg-primary-dark', + maxWidth: 450 }, VListItem: { activeColor: 'bg-primary-dark', From ff314f60bbbc299a76939690e73c3351b38ac519 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Hornych?= Date: Sat, 4 Nov 2023 20:25:48 +0100 Subject: [PATCH 05/11] fix: reference schema viewer not properly displaying external referenced types --- .../LabEditorSchemaViewerReference.vue | 68 +++++++++++-------- 1 file changed, 38 insertions(+), 30 deletions(-) diff --git a/src/components/lab/editor/schema-viewer/LabEditorSchemaViewerReference.vue b/src/components/lab/editor/schema-viewer/LabEditorSchemaViewerReference.vue index 1d852685..736d7422 100644 --- a/src/components/lab/editor/schema-viewer/LabEditorSchemaViewerReference.vue +++ b/src/components/lab/editor/schema-viewer/LabEditorSchemaViewerReference.vue @@ -18,39 +18,47 @@ const properties: [string, any, ((item?: string) => void)?][] = [] properties.push(['Description', props.schema.description]) properties.push(['Deprecation notice', props.schema.deprecationNotice]) properties.push(['Cardinality', [props.schema.cardinality]]) -properties.push([ - 'Referenced entity', - [props.schema.referencedEntityType], - item => { - if (!props.schema.referencedEntityTypeManaged) { - return +if (props.schema.referencedEntityTypeManaged) { + properties.push([ + 'Referenced entity', + [props.schema.referencedEntityType], + item => { + editorService.createTabRequest(new SchemaViewerRequest( + props.dataPointer.connection, + new EntitySchemaPointer( + props.dataPointer.schemaPointer.catalogName, + props.schema.referencedEntityType + ) + )) } - editorService.createTabRequest(new SchemaViewerRequest( - props.dataPointer.connection, - new EntitySchemaPointer( - props.dataPointer.schemaPointer.catalogName, - props.schema.referencedEntityType - ) - )) - } -]) + ]) +} else { + properties.push([ + 'Referenced entity', + [props.schema.referencedEntityType] + ]) +} properties.push(['Referenced entity managed', props.schema.referencedEntityTypeManaged]) -properties.push([ - 'Referenced group', - props.schema.referencedGroupType ? [props.schema.referencedGroupType] : undefined, - item => { - if (!props.schema.referencedGroupTypeManaged) { - return +if (props.schema.referencedGroupTypeManaged) { + properties.push([ + 'Referenced group', + props.schema.referencedGroupType ? [props.schema.referencedGroupType] : undefined, + item => { + editorService.createTabRequest(new SchemaViewerRequest( + props.dataPointer.connection, + new EntitySchemaPointer( + props.dataPointer.schemaPointer.catalogName, + props.schema.referencedEntityType + ) + )) } - editorService.createTabRequest(new SchemaViewerRequest( - props.dataPointer.connection, - new EntitySchemaPointer( - props.dataPointer.schemaPointer.catalogName, - props.schema.referencedEntityType - ) - )) - } -]) + ]) +} else { + properties.push([ + 'Referenced group', + props.schema.referencedGroupType ? [props.schema.referencedGroupType] : undefined + ]) +} properties.push(['Referenced group managed', props.schema.referencedGroupTypeManaged]) properties.push(['Indexed', props.schema.indexed]) properties.push(['Faceted', props.schema.faceted]) From a0bcd883b0e92cba69491ff1a951478a6d4685aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Hornych?= Date: Sat, 4 Nov 2023 20:26:18 +0100 Subject: [PATCH 06/11] fix(#62): display facet count instead of group count if there is no group --- .../LabEditorResultVisualiserFacetSummary.vue | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/components/lab/editor/result-visualiser/facet-summary/LabEditorResultVisualiserFacetSummary.vue b/src/components/lab/editor/result-visualiser/facet-summary/LabEditorResultVisualiserFacetSummary.vue index fe26e9f7..32bc1380 100644 --- a/src/components/lab/editor/result-visualiser/facet-summary/LabEditorResultVisualiserFacetSummary.vue +++ b/src/components/lab/editor/result-visualiser/facet-summary/LabEditorResultVisualiserFacetSummary.vue @@ -34,13 +34,24 @@ const referencesWithGroupStatisticsResults = computed<[ReferenceSchema, Result[] return [] } }) + +function getCountForReference(referenceSchema: ReferenceSchema, groupStatisticsResults: Result[]): number { + if (referenceSchema.referencedGroupType != undefined) { + return groupStatisticsResults.length + } else { + return props.visualiserService + .getFacetSummaryService() + .findFacetStatisticsResults(groupStatisticsResults[0]) + .length + } +}