-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'maps-integreation' into feature/maps-search-bar
- Loading branch information
Showing
34 changed files
with
1,147 additions
and
194 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 33 additions & 23 deletions
56
examples/nuxt-app/components/global/VSBAMapPopupContent.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,52 @@ | ||
<template> | ||
<div class="vsba-map-popup-content" v-if="!hasMultiple"> | ||
<p class="rpl-type-p-small"> | ||
{{ selectedFeature[0].field_about_project_processed[0] }} | ||
</p> | ||
<RplTextLink | ||
class="rpl-type-p-small rpl-u-margin-t-4" | ||
:url="formatUrl(selectedFeature[0].url[0])" | ||
<div class="vsba-map-popup-content"> | ||
<h4 class="rpl-type-p-small">What's happening?</h4> | ||
|
||
<p | ||
v-if="feature.field_project_title?.length === 1" | ||
class="rpl-type-p-small" | ||
> | ||
View page | ||
</RplTextLink> | ||
{{ feature.title[0] }} | ||
</p> | ||
<RplContent v-else class="vsba-map-popup-list"> | ||
<ul> | ||
<li v-for="project in feature.field_project_title" :key="project"> | ||
{{ project }} | ||
</li> | ||
</ul> | ||
</RplContent> | ||
|
||
<p class="rpl-type-p-small rpl-u-margin-t-3"> | ||
<RplTextLink :url="formatUrl(feature.url[0])"> | ||
View {{ feature.title[0] }} | ||
</RplTextLink> | ||
</p> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
interface Props { | ||
selectedFeature: any | ||
feature: any | ||
} | ||
const props = withDefaults(defineProps<Props>(), {}) | ||
const hasMultiple = computed(() => { | ||
return ( | ||
Array.isArray(props.selectedFeature) && props.selectedFeature.length > 1 | ||
) | ||
}) | ||
const formatUrl = (str) => str.replace(/\/site-(\d+)/, '') | ||
const url = computed(() => { | ||
if (!hasMultiple && props.selectedFeature[0].url) { | ||
return props.selectedFeature[0].url[0].replace(/\/site-(\d+)/, '') | ||
} | ||
return false | ||
}) | ||
</script> | ||
|
||
<style> | ||
.vsba-map-popup-content { | ||
display: flex; | ||
flex-direction: column; | ||
padding: var(--rpl-sp-4); | ||
} | ||
.vsba-map-popup-list ul { | ||
font-size: var(--rpl-type-size-1); | ||
line-height: var(--rpl-type-lh-3); | ||
letter-spacing: var(--rpl-type-ls-1); | ||
} | ||
.vsba-map-popup-list ul li:before { | ||
top: 0.6rem; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
examples/nuxt-app/test/features/data-table/table-filters.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Feature: Custom Collection | ||
|
||
As an editor I want to be able to add a view of results in a search index to a landing page with filters | ||
|
||
Background: | ||
Given the page endpoint for path "/" returns fixture "/map-table/ise/page" with status 200 | ||
Given the site endpoint returns fixture "/site/reference" with status 200 | ||
And the search autocomplete request is stubbed with "/search-listing/suggestions/none" fixture | ||
Given I am using a "macbook-16" device | ||
|
||
@mockserver | ||
Scenario: On load | ||
Given the "/api/tide/elasticsearch/sdp_data_pipelines_ise/_search" network request is stubbed with fixture "/map-table/ise/response" and status 200 as alias "cslReq" | ||
Given the "/api/tide/elasticsearch/sdp_data_pipelines_ise/_search" aggregation request is stubbed with fixture "/map-table/ise/aggregations" and status 200 as alias "aggReq" | ||
Given I visit the page "/" | ||
Then the landing page component "TideDataDrivenMap" should exist | ||
And the custom collection component should have a search input bar | ||
And the custom collection component results count should read "Displaying 1-10 of 8269 results" | ||
And the "cslReq" network request should be made to the elasticsearch endpoint | ||
And the "aggReq" network request should be made to the elasticsearch endpoint | ||
And the search listing layout should be "table" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
examples/nuxt-app/test/fixtures/landingpage/maps/vsba/aggregations.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ | ||
"took": 1, | ||
"timed_out": false, | ||
"_shards": { | ||
"total": 5, | ||
"successful": 5, | ||
"skipped": 0, | ||
"failed": 0 | ||
}, | ||
"hits": { | ||
"total": { | ||
"value": 2129, | ||
"relation": "eq" | ||
}, | ||
"max_score": null, | ||
"hits": [] | ||
}, | ||
"aggregations": { | ||
"category": { | ||
"doc_count_error_upper_bound": 0, | ||
"sum_other_doc_count": 0, | ||
"buckets": [ | ||
{ | ||
"key": "Early childhood", | ||
"doc_count": 274 | ||
}, | ||
{ | ||
"key": "New school", | ||
"doc_count": 87 | ||
}, | ||
{ | ||
"key": "Non-government grant", | ||
"doc_count": 198 | ||
}, | ||
{ | ||
"key": "Planning", | ||
"doc_count": 13 | ||
}, | ||
{ | ||
"key": "School upgrade", | ||
"doc_count": 991 | ||
}, | ||
{ | ||
"key": "Tech school", | ||
"doc_count": 10 | ||
} | ||
] | ||
} | ||
} | ||
} |
Oops, something went wrong.