Skip to content

Commit

Permalink
Merge branch 'main' into update/polar-core-documentation_plugin.fields
Browse files Browse the repository at this point in the history
  • Loading branch information
dopenguin authored Aug 1, 2024
2 parents c59f501 + 4a5733f commit 272c336
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 6 deletions.
1 change: 1 addition & 0 deletions packages/plugins/Attributions/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## unpublished

- Feature: Add new option `'footer'` to configuration parameter `renderType` that changes the attributions to be displayed as a small version of the information box that is always visible.
- Refactor: Replace redundant props with computed properties.

## 1.2.1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
<template>
<v-scroll-x-reverse-transition>
<v-card dense filled :width="width" :color="color" :max-width="maxWidth">
<v-card-title>
<v-card
:class="renderType === 'footer' ? 'polar-plugin-attributions-footer' : ''"
dense
filled
:width="width"
:color="color"
:max-width="maxWidth"
>
<v-card-title v-if="renderType !== 'footer'">
{{ $t('common:plugins.attributions.title') }}
</v-card-title>
<!-- NOTE: The usage of v-html is considered unsafe as it
Expand Down Expand Up @@ -48,7 +55,9 @@ export default Vue.extend({
return this.renderType === 'independent'
},
color() {
return this.renderIndependently ? '#ffffffdd' : ''
return this.renderType === 'independent' || this.renderType === 'footer'
? '#ffffffdd'
: ''
},
maxWidth() {
return this.renderIndependently
Expand Down Expand Up @@ -76,4 +85,13 @@ export default Vue.extend({
})
</script>

<style scoped lang="scss"></style>
<style scoped lang="scss">
.polar-plugin-attributions-footer {
margin: 4px;
}
.polar-plugin-attributions-footer .v-card__text {
font-size: 0.8rem;
padding: 2px;
line-height: 1.1;
}
</style>
2 changes: 1 addition & 1 deletion packages/plugins/Attributions/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export interface AttributionsGetters extends AttributionsState {
listenToChanges: string[]
mapInfo: string[]
initiallyOpen: boolean
renderType: 'independent' | 'iconMenu'
renderType: 'independent' | 'iconMenu' | 'footer'
staticAttributions: string[]
windowWidth: number
}
1 change: 1 addition & 0 deletions packages/types/custom/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- Feature: Add `afterResultComponent` to `AddressSearchConfiguration` for custom search result suffixes.
- Feature: Add `mapHasDimensions` to `CoreState` and `CoreGetters`.
- Feature: Add new getter `deviceIsHorizontal` to `CoreGetters`.
- Feature: Add `footer` to `RenderType` as an option to display attributions in a footer.
- Fix: Add `string` as option for `SearchType` since arbitrary strings can be registered.
- Fix: Remove unused parameters `proxyUrl` and `loadingStrategy` from `LayerConfigurationOptions`.
- Fix: Properly document optional parameters of interfaces `AddressSearchConfiguration`, `FeatureList`, `FilterConfigurationTime`, `FilterConfigurationTimeOption`, `GeoLocationConfiguration`, `LayerConfigurationOptionLayers` and `PinsConfiguration`
Expand Down
2 changes: 1 addition & 1 deletion packages/types/custom/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export interface PluginOptions {
layoutTag?: string // TODO: Might it be useful to move declaration of NineLayoutTag here?
}

export type RenderType = 'iconMenu' | 'independent'
export type RenderType = 'iconMenu' | 'independent' | 'footer'

/** Possible search methods by type */
export type SearchType = 'bkg' | 'gazetteer' | 'wfs' | 'mpapi' | string
Expand Down

0 comments on commit 272c336

Please sign in to comment.