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

feat: add cooperative gestures for maps #206

Merged

Conversation

RafaelSzmarowski
Copy link
Contributor

@RafaelSzmarowski RafaelSzmarowski commented Nov 20, 2023

Summary

The goal for this PR is to add the option of cooperative gestures for maps, both POI and Choropleth.

This PR needs an update of Maplibre at least up to version 2.2.0 but as the version 2.2.1 fixes some typings issue on Maplibre expressions, it seems better to already update to 2.2.1.

I had troubles to fix the way we defined FilterExpression, If you see better solutions, please let me know ! And also this upgrade will have consequences for our users, some types changes will be necessary even if it doesn't appear heavy.

Please check if there is no regression due to the types changes (I've slightly changed the way the functions are made)

There is a change in Chromatic that I can't really explain: https://www.chromatic.com/test?appId=616594e84c1692003af430f3&id=655b8ed6701077f47cbd3365. It doesn't affect many stories so this must be really niche.

(Internal for Opendatasoft only) Associated Shortcut ticket: sc-44646.

Changes

  • Update Maplibre to 2.2.1
  • Adapt types changes on Maplibre expressions
  • Add some CSS to default cooperative gesture screen rules.

Open discussion

Do you see better typing changes ?

To be tested

Regression and Chromatic tests 🙏

Review checklist

  • Description is complete
  • Commits respect the Conventional Commits Specification
  • 2 reviewers (1 if trivial)
  • Tests coverage has improved
  • Code is ready for a release on NPM

@RafaelSzmarowski RafaelSzmarowski marked this pull request as ready for review November 21, 2023 09:27
Copy link
Contributor

@KevinFabre-ods KevinFabre-ods left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌

Minor the lint error 😉

Copy link
Contributor

@etienneburdet etienneburdet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I left one minor TS comment that led to think the array was exactly 3 elements, appart from that works super well!

packages/visualizations/src/components/types.ts Outdated Show resolved Hide resolved
@KevinFabre-ods KevinFabre-ods merged commit c51854f into main Nov 24, 2023
7 checks passed
@KevinFabre-ods KevinFabre-ods deleted the feature/sc-44646/add-cooperative-gestures-for-maps branch November 24, 2023 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants