Skip to content

Commit

Permalink
Merge pull request #194 from Dataport/feature/text-locator-result-sou…
Browse files Browse the repository at this point in the history
…rce-indicator

Feature/text locator result source indicator
  • Loading branch information
warm-coolguy authored Nov 18, 2024
2 parents 1498992 + 67403bf commit 2ec2fe0
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 4 deletions.
2 changes: 2 additions & 0 deletions packages/clients/textLocator/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

- Breaking: Adapt client to new backend API. Previous versions are no longer runnable due the backend API change.
- Feature: Implement document search, that is, the AddressSearch bar now also offers results for documents and clicking on one will retrieve a list of toponyms from the backend and resolve them against the gazetteer. Previously, we had a "get all documents regarding place" functionality. Now, a "get all places regarding document" feature is implemented. Additionally to the AddressSearch, this can be triggered on documents found in the previously implemented way; the "get all places regarding document" functionality is available from within the GeoSearch result display.
- Feature: The result display now features a display regarding what kind of search interaction the current search results stem from. This is meant to enhance interpretability of the results' scope.
- Feature: Add a display regarding what kind of search interaction the current search results stem from to the result display. This is meant to enhance interpretability of the results' scope.
- Fix: Adjust heatmap feature to match the new data structure and have it working again.

## 1.0.0-alpha.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@
<v-card-title class="text-locator-collapse">
{{ $t('common:plugins.geometrySearch.results.title') }}
</v-card-title>
<v-card-subtitle v-if="lastSearch">
{{
$t('common:plugins.geometrySearch.results.source', {
searchType: $t(
`common:plugins.geometrySearch.results.sourceOptions.${lastSearch}`
),
})
}}
</v-card-subtitle>
<v-card-text>
<ViewToggle />
<TreeView v-if="treeViewItems.length" />
Expand All @@ -29,7 +38,7 @@ export default Vue.extend({
ViewToggle,
},
computed: {
...mapGetters('plugin/geometrySearch', ['treeViewItems']),
...mapGetters('plugin/geometrySearch', ['treeViewItems', 'lastSearch']),
},
})
</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ const language: LanguageOption[] = [
},
results: {
title: 'Funde',
source: 'aus der {{ searchType }}',
sourceOptions: {
geometrySearch: 'Geometriesuche',
literatureSearch: 'Literatursuche',
toponymSearch: 'Ortssuche',
},
byLocation: 'Ort',
byText: 'Text',
none: 'Keine Suchergebnisse',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const getInitialState = (): GeometrySearchState => ({
featureCollection: getEmptyFeatureCollection(),
titleLocationFrequency: {},
byCategory: 'text',
lastSearch: null,
})

// OK for module creation
Expand Down Expand Up @@ -64,11 +65,12 @@ export const makeStoreModule = () => {
commit('setFeatureCollection', result)
dispatch('updateFrequencies')
})
.finally(() =>
.finally(() => {
commit('plugin/loadingIndicator/removeLoadingKey', loadingKey, {
root: true,
})
)
commit('setLastSearch', 'geometrySearch')
})
},
changeActiveData(
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export interface GeometrySearchState {
>
titleLocationFrequency: TitleLocationFrequency
byCategory: TextLocatorCategories
lastSearch: 'geometrySearch' | 'literatureSearch' | 'toponymSearch' | null
}

export type GeometrySearchGetters = GeometrySearchState
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,5 @@ export const selectResult: SelectResultFunction<
{ root: true }
)
dispatch('plugin/geometrySearch/updateFrequencies', null, { root: true })
commit('plugin/geometrySearch/setLastSearch', 'toponymSearch', { root: true })
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ const processLiteratureToponyms = (feature: LiteratureFeature) =>
{} as TitleLocationFrequency['string']['location_frequency'],
]
)

commit('plugin/geometrySearch/setFeatureCollection', featureCollection, {
root: true,
})
commit('plugin/geometrySearch/setLastSearch', 'literatureSearch')
const nextTitleLocationFrequency: TitleLocationFrequency = {
[feature.id]: {
title: feature.title,
Expand Down

0 comments on commit 2ec2fe0

Please sign in to comment.