From 5f91a0fa9d694f92058be0551edfdb13fccc3ff9 Mon Sep 17 00:00:00 2001 From: alan-wu Date: Fri, 20 Sep 2024 09:33:07 +1200 Subject: [PATCH 1/4] Increase loading container z-index to cover the header. --- app.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.vue b/app.vue index 1846c235..b71aea71 100644 --- a/app.vue +++ b/app.vue @@ -65,7 +65,7 @@ export default { .loading-container { position: fixed; top: 0; - z-index: 1; + z-index: 101; background-color: white; opacity: .5; width: 100vw; From a940834a0f37d6ad43203040434c335e0d048d77 Mon Sep 17 00:00:00 2001 From: alan-wu Date: Fri, 20 Sep 2024 12:17:48 +1200 Subject: [PATCH 2/4] Set hitsPerPage to 0 when requesting the facets. --- pages/datasets/[datasetId].vue | 1 + utils/algolia.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/pages/datasets/[datasetId].vue b/pages/datasets/[datasetId].vue index 1f6ad1ec..8fd52bb3 100644 --- a/pages/datasets/[datasetId].vue +++ b/pages/datasets/[datasetId].vue @@ -151,6 +151,7 @@ const getDownloadsSummary = async (config, axios) => { const getOrganizationNames = async (algoliaIndex) => { try { await algoliaIndex.search('', { + hitsPerPage: 0, sortFacetValuesBy: 'alpha', facets: 'pennsieve.organization.name', }).then(({ facets }) => { diff --git a/utils/algolia.ts b/utils/algolia.ts index 768618e7..963e8a1c 100644 --- a/utils/algolia.ts +++ b/utils/algolia.ts @@ -60,6 +60,7 @@ export const getAlgoliaFacets = function(algoliaIndex : SearchIndex, propPathMap var facetId = 0 return algoliaIndex .search('', { + hitsPerPage: 0, sortFacetValuesBy: 'alpha', facets: facetPropPaths.concat(facetSubpropPaths), filters: filters || '' From e10ae7f2ad2ff1f6cd10512b8156fb8686976229 Mon Sep 17 00:00:00 2001 From: alan-wu Date: Fri, 20 Sep 2024 12:18:22 +1200 Subject: [PATCH 3/4] Set the default map to human. --- components/ImagesGallery/ImagesGallery.vue | 4 ++-- package.json | 2 +- pages/apps/maps/index.vue | 6 +++--- yarn.lock | 18 +++++++++--------- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/components/ImagesGallery/ImagesGallery.vue b/components/ImagesGallery/ImagesGallery.vue index b4a77d6a..dcf21923 100644 --- a/components/ImagesGallery/ImagesGallery.vue +++ b/components/ImagesGallery/ImagesGallery.vue @@ -97,8 +97,8 @@ const getThumbnailData = async (datasetDoi, datasetId, datasetVersion, datasetFa species = speciesArray[0].children[0].label.toLowerCase() } - // check if there is a flatmap for the given species, use a rat if there is not - const taxo = species && species in Uberons.species ? Uberons.species[species] : Uberons.species['rat'] + // check if there is a flatmap for the given species, use human if there is not + const taxo = species && species in Uberons.species ? Uberons.species[species] : Uberons.species['human'] // Check if flatmap has the anatomy for this species. This is done by asking the flatmap knowledge base // if a flatmap of (species) has (anatomy) diff --git a/package.json b/package.json index 00d5a0e3..9844227c 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "sitemap": "^7.1.1" }, "dependencies": { - "@abi-software/mapintegratedvuer": "1.4.2", + "@abi-software/mapintegratedvuer": "1.5.0", "@abi-software/plotvuer": "1.0.0", "@abi-software/simulationvuer": "1.0.0", "@element-plus/nuxt": "^1.0.6", diff --git a/pages/apps/maps/index.vue b/pages/apps/maps/index.vue index 1dd98429..d4f59daa 100644 --- a/pages/apps/maps/index.vue +++ b/pages/apps/maps/index.vue @@ -132,7 +132,7 @@ const checkSpecies = (route, organ, organ_name, taxo, for_species) => { for_species && for_species !== 'undefined' ) { if (for_species !== target) { - failMessage = `Sorry! A flatmap for ${for_species} species does not yet exist. The ${organ_name} of a rat has been shown instead.` + failMessage = `Sorry! A flatmap for ${for_species} species does not yet exist. The ${organ_name} of a human male has been shown instead.` } else if (!organ) { failMessage = `Sorry! Applicable entity is not yet available. A generic flatmap for ${for_species} species has been shown instead.` } @@ -141,9 +141,9 @@ const checkSpecies = (route, organ, organ_name, taxo, for_species) => { } else { if (!target) { if (organ) { - failMessage += `The ${organ_name} of a rat has been shown instead.` + failMessage += `The ${organ_name} of a human male has been shown instead.` } else { - failMessage += 'A generic rat flatmap has been shown instead.' + failMessage += 'A generic human male flatmap has been shown instead.' } } } diff --git a/yarn.lock b/yarn.lock index 728418d4..12f1e276 100644 --- a/yarn.lock +++ b/yarn.lock @@ -74,10 +74,10 @@ unplugin-vue-components "^0.26.0" vue "^3.4.15" -"@abi-software/flatmapvuer@^1.4.4": - version "1.4.4" - resolved "https://registry.yarnpkg.com/@abi-software/flatmapvuer/-/flatmapvuer-1.4.4.tgz#1cda1ff1d6d02da9cac2a9451b634f38f1fa64ae" - integrity sha512-3lDto9qQWKrizGDCyB/GzNVrfoDgtAZI87JjfhCCV6NAChUJbPKsi5lGSTjie2WP+mVA1uiid7hiuvyYLSBSAw== +"@abi-software/flatmapvuer@^1.5.1": + version "1.5.1" + resolved "https://registry.yarnpkg.com/@abi-software/flatmapvuer/-/flatmapvuer-1.5.1.tgz#7a2eb2a7626c5617fda1db666d86e60b3094df7d" + integrity sha512-VR+DKsE9j3Cf865kqzxba3lGFvJ/oYR21kxGUP6Yh4Y6ZCu0Let+oeSG+dleoEAIdNUIdT0VuPLpQrB1dWRg9g== dependencies: "@abi-software/flatmap-viewer" "3.1.8" "@abi-software/map-utilities" "1.1.0" @@ -129,12 +129,12 @@ mitt "^3.0.1" vue "^3.4.21" -"@abi-software/mapintegratedvuer@1.4.2": - version "1.4.2" - resolved "https://registry.yarnpkg.com/@abi-software/mapintegratedvuer/-/mapintegratedvuer-1.4.2.tgz#781083f4c322fe5e79a09f717dc55876d92d81b3" - integrity sha512-qvTwEpXeD8dkJ2d0WLnlZ9lq2ek6PG+aHAxNvdYSQLAKZ7YDIyl3SWi+0H1ud/7uIN/ebLjhq9kYbuNfMDDIaw== +"@abi-software/mapintegratedvuer@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@abi-software/mapintegratedvuer/-/mapintegratedvuer-1.5.0.tgz#6918b7e6fc887857886125d960bef0cabf2fa413" + integrity sha512-aXPtOePiPtu2+fW0sJjH69zk+sTH1VUfzHcRfnryrh2k+MZlRitrMEbngnvibs4Txe56wREtdtBR5+ZhwZf86Q== dependencies: - "@abi-software/flatmapvuer" "^1.4.4" + "@abi-software/flatmapvuer" "^1.5.1" "@abi-software/map-side-bar" "^2.4.1" "@abi-software/map-utilities" "^1.1.0" "@abi-software/plotvuer" "1.0.0" From 15ec4c5782bb832f8a2b790407284ee8e82f13b9 Mon Sep 17 00:00:00 2001 From: alan-wu Date: Fri, 20 Sep 2024 12:43:42 +1200 Subject: [PATCH 4/4] Small update on the test. --- tests/cypress/e2e/mapsviewer.cy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cypress/e2e/mapsviewer.cy.js b/tests/cypress/e2e/mapsviewer.cy.js index 470137f9..16e8f72f 100644 --- a/tests/cypress/e2e/mapsviewer.cy.js +++ b/tests/cypress/e2e/mapsviewer.cy.js @@ -43,7 +43,7 @@ describe('Maps Viewer', { testIsolation: false }, function () { if (index === 0) { cy.wait(['@query', '@flatmap', '@dataset_info', '@datasets'], { timeout: 20000 }) cy.waitForLoadingMask() - loadedModels.add('Rat') + loadedModels.add('Human Male') } // Switch to the second flatmap