Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/text locator result source indicator #194

Merged
merged 13 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading