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/map clustering distance prop #1291

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
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## v2.13.1

[compare changes](https://github.com/dpc-sdp/ripple-framework/compare/v2.13.0...v2.13.1)


### 🩹 Fixes

- **@dpc-sdp/ripple-tide-api:** 🐛 fixed getTaxonomy only getting first 50 items ([f46ed87fb](https://github.com/dpc-sdp/ripple-framework/commit/f46ed87fb))

### ❤️ Contributors

- Jeffrey Dowdle <jeffrey.dowdle@dpc.vic.gov.au>

## v2.13.0

[compare changes](https://github.com/dpc-sdp/ripple-framework/compare/v2.12.0...v2.13.0)
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.13.0",
"version": "2.13.1",
"npmClient": "pnpm",
"exact": true,
"command": {
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-ripple/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dpc-sdp/eslint-config-ripple",
"description": "ESLint config for Ripple projects",
"version": "2.13.0",
"version": "2.13.1",
"license": "Apache-2.0",
"repository": "https://github.com/dpc-sdp/ripple-framework",
"main": "index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/nuxt-ripple-analytics/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dpc-sdp/nuxt-ripple-analytics",
"description": "Nuxt module for handling event tracking.",
"version": "2.13.0",
"version": "2.13.1",
"license": "Apache-2.0",
"main": "./nuxt.config.ts",
"repository": "https://github.com/dpc-sdp/ripple-framework",
Expand Down
2 changes: 1 addition & 1 deletion packages/nuxt-ripple-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dpc-sdp/nuxt-ripple-cli",
"description": "A CLI for simplifying common setup and scaffolding tasks",
"version": "2.13.0",
"version": "2.13.1",
"license": "Apache-2.0",
"repository": "https://github.com/dpc-sdp/ripple-framework",
"main": "./dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/nuxt-ripple-preview/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dpc-sdp/nuxt-ripple-preview",
"description": "Adds support for drupal preview links in Ripple frontend sites",
"version": "2.13.0",
"version": "2.13.1",
"license": "Apache-2.0",
"main": "./nuxt.config.ts",
"repository": "https://github.com/dpc-sdp/ripple-framework",
Expand Down
2 changes: 1 addition & 1 deletion packages/nuxt-ripple/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dpc-sdp/nuxt-ripple",
"description": "Nuxt module for integrating Ripple and Tide",
"version": "2.13.0",
"version": "2.13.1",
"license": "Apache-2.0",
"main": "./nuxt.config.ts",
"repository": "https://github.com/dpc-sdp/ripple-framework",
Expand Down
2 changes: 1 addition & 1 deletion packages/ripple-sdp-core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dpc-sdp/ripple-sdp-core",
"description": "SDP core content types",
"version": "2.13.0",
"version": "2.13.1",
"license": "Apache-2.0",
"repository": "https://github.com/dpc-sdp/ripple-framework",
"main": "./nuxt.config.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/ripple-storybook/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ripple-storybook",
"description": "Ripple Storybook instance",
"version": "2.13.0",
"version": "2.13.1",
"license": "Apache-2.0",
"private": true,
"repository": "https://github.com/dpc-sdp/ripple-framework",
Expand Down
2 changes: 1 addition & 1 deletion packages/ripple-test-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dpc-sdp/ripple-test-utils",
"description": "Test utils for Ripple sites",
"version": "2.13.0",
"version": "2.13.1",
"license": "Apache-2.0",
"type": "module",
"main": "./dist/config/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/ripple-tide-api/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dpc-sdp/ripple-tide-api",
"description": "Ripple API endpoints for Tide Drupal backend",
"version": "2.13.0",
"version": "2.13.1",
"license": "Apache-2.0",
"repository": "https://github.com/dpc-sdp/ripple-framework",
"main": "./dist/index.js",
Expand Down
22 changes: 5 additions & 17 deletions packages/ripple-tide-api/src/services/tide-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -327,10 +327,10 @@ export default class TidePageApi extends TideApiBase {
async getEntityList(
entityType,
bundle,
filtering,
includes,
pagination,
sorting,
filtering?,
includes?,
pagination?,
sorting?,
{ allPages = true } = {}
) {
const params: Record<string, any> = {
Expand Down Expand Up @@ -442,20 +442,8 @@ export default class TidePageApi extends TideApiBase {
}

async getTaxonomy(taxonomyName: string) {
const params = {
site: this.site
}
try {
const { data: response } = await this.get(
`/taxonomy_term/${taxonomyName}`,
{
params
}
)
if (response) {
const resource = jsonapiParse.parse(response).data
return resource
}
return await this.getEntityList('taxonomy_term', taxonomyName)
} catch (error: any) {
throw new ApplicationError('Error fetching taxonomy', { cause: error })
}
Expand Down
2 changes: 1 addition & 1 deletion packages/ripple-tide-event/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dpc-sdp/ripple-tide-event",
"description": "Ripple mappings and components for Tide Event Content type",
"version": "2.13.0",
"version": "2.13.1",
"license": "Apache-2.0",
"main": "./nuxt.config.ts",
"repository": "https://github.com/dpc-sdp/ripple-framework",
Expand Down
2 changes: 1 addition & 1 deletion packages/ripple-tide-grant/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dpc-sdp/ripple-tide-grant",
"description": "Ripple mappings and components for Tide Grant Content type",
"version": "2.13.0",
"version": "2.13.1",
"license": "Apache-2.0",
"repository": "https://github.com/dpc-sdp/ripple-framework",
"main": "./nuxt.config.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/ripple-tide-landing-page/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dpc-sdp/ripple-tide-landing-page",
"description": "Ripple mappings and components for Tide landing-page Content type",
"version": "2.13.0",
"version": "2.13.1",
"license": "Apache-2.0",
"repository": "https://github.com/dpc-sdp/ripple-framework",
"main": "./nuxt.config.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/ripple-tide-media/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dpc-sdp/ripple-tide-media",
"description": "Ripple mappings and components for Tide media",
"version": "2.13.0",
"version": "2.13.1",
"license": "Apache-2.0",
"repository": "https://github.com/dpc-sdp/ripple-framework",
"main": "./nuxt.config.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/ripple-tide-news/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dpc-sdp/ripple-tide-news",
"description": "Ripple mappings and components for Tide News content type",
"version": "2.13.0",
"version": "2.13.1",
"license": "Apache-2.0",
"repository": "https://github.com/dpc-sdp/ripple-framework",
"main": "./nuxt.config.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/ripple-tide-publication/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dpc-sdp/ripple-tide-publication",
"description": "Ripple mappings and components for Tide Publication Content type",
"version": "2.13.0",
"version": "2.13.1",
"license": "Apache-2.0",
"repository": "https://github.com/dpc-sdp/ripple-framework",
"main": "./nuxt.config.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/ripple-tide-search/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dpc-sdp/ripple-tide-search",
"description": "Ripple search UI and services for connecting to Tide search",
"version": "2.13.0",
"version": "2.13.1",
"license": "Apache-2.0",
"repository": "https://github.com/dpc-sdp/ripple-framework",
"main": "./nuxt.config.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/ripple-tide-topic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"./mapping": "./mapping/index.ts",
"./types": "./types.ts"
},
"version": "2.13.0",
"version": "2.13.1",
"dependencies": {
"@dpc-sdp/nuxt-ripple": "workspace:*",
"@dpc-sdp/ripple-tide-api": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/ripple-tide-webform/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dpc-sdp/ripple-tide-webform",
"description": "Ripple mappings and components for Tide webforms",
"version": "2.13.0",
"version": "2.13.1",
"license": "Apache-2.0",
"repository": "https://github.com/dpc-sdp/ripple-framework",
"main": "./nuxt.config.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/ripple-ui-core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dpc-sdp/ripple-ui-core",
"description": "Ripple UI Core component library",
"version": "2.13.0",
"version": "2.13.1",
"license": "Apache-2.0",
"repository": "https://github.com/dpc-sdp/ripple-framework",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion packages/ripple-ui-forms/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dpc-sdp/ripple-ui-forms",
"description": "A form component library built with Formkit",
"version": "2.13.0",
"version": "2.13.1",
"license": "Apache-2.0",
"repository": "https://github.com/dpc-sdp/ripple-framework",
"main": "./dist/rpl-forms.umd.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/ripple-ui-maps/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dpc-sdp/ripple-ui-maps",
"description": "Ripple UI Core component library",
"version": "2.13.0",
"version": "2.13.1",
"license": "Apache-2.0",
"repository": "https://github.com/dpc-sdp/ripple-framework",
"files": [
Expand Down
22 changes: 22 additions & 0 deletions packages/ripple-ui-maps/src/components/map/RplMap.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,26 @@ export const Template = (args) => ({
>
{Template.bind()}
</Story>
<Story
name='Clustering Nearer'
args={{
id: '123',
features:featureData,
provider: 'mapbox',
clusteringDistance: 25
}}
>
{Template.bind()}
</Story>
<Story
name='Clustering Disabled'
args={{
id: '123',
features:featureData,
provider: 'mapbox',
clusteringDistance: 0
}}
>
{Template.bind()}
</Story>
</Canvas>
6 changes: 4 additions & 2 deletions packages/ripple-ui-maps/src/components/map/RplMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ interface Props {
hasSidePanel?: boolean
noresults?: boolean
getFeatureTitle?: (feature: any) => string
clusteringDistance?: number
}

const props = withDefaults(defineProps<Props>(), {
Expand All @@ -75,7 +76,8 @@ const props = withDefaults(defineProps<Props>(), {
return ic
},
noresults: false,
getFeatureTitle: (feature: any) => (feature ? feature.title : '')
getFeatureTitle: (feature: any) => (feature ? feature.title : ''),
clusteringDistance: 100
})

const zoom = ref(props.initialZoom)
Expand Down Expand Up @@ -365,7 +367,7 @@ const noResultsRef = ref(null)
<ol-animated-clusterlayer
title="clusterLayer"
:animationDuration="300"
:distance="100"
:distance="clusteringDistance"
:zIndex="4"
>
<ol-source-vector :features="mapFeatures"> </ol-source-vector>
Expand Down
2 changes: 1 addition & 1 deletion packages/stylelint-config-ripple/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dpc-sdp/stylelint-config-ripple",
"description": "ESLint config for Ripple projects",
"version": "2.13.0",
"version": "2.13.1",
"license": "Apache-2.0",
"repository": "https://github.com/dpc-sdp/ripple-framework",
"main": "index.js",
Expand Down