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

fix: Make contries map responsive #9003

Merged
merged 5 commits into from
Sep 15, 2023
Merged

fix: Make contries map responsive #9003

merged 5 commits into from
Sep 15, 2023

Conversation

hangy
Copy link
Member

@hangy hangy commented Sep 14, 2023

What

Replaced jvectormap with jsvectormap, made the map have a min and max size, and restyled the map. Also moved the map code to a separate JS file, so that it can be linted, and edited more easily, and added separate RTL and LTR formats for tooltips.

Screenshot

  • Map at min width:
    image
  • Map at max width:
    image

Related issue(s) and discussion

jvectormap (and jvectormap-next for that matter) seem to be unmaintained.
jsvectormap is a fork, which doesn't depend on jQuery any more, and
is actually updated regularly. Also, `updateSize` doesn't seem to work in
jvectormap.

This change also moves the map initialization code from Display.pm to
it's own JS file, so that it can be linted correctly.
Has better styling for the different countries.
Now uses a few OFF colours from _variables.scss.
@hangy hangy added 🐛 bug This is a bug, not a feature request. facets facets allow you to explore products according to various criterion. Based on MongoDB responsive ux 🗺️ Maps labels Sep 14, 2023
@hangy hangy requested a review from a team as a code owner September 14, 2023 22:17
@hangy hangy self-assigned this Sep 14, 2023
@github-actions github-actions bot added JavaScript CSS dependencies Pull requests that update a dependency file Display labels Sep 14, 2023
@sonarcloud
Copy link

sonarcloud bot commented Sep 14, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Contributor

@stephanegigandet stephanegigandet left a comment

Choose a reason for hiding this comment

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

Perfect, thank you!

@stephanegigandet stephanegigandet merged commit 16830a9 into main Sep 15, 2023
15 checks passed
@stephanegigandet stephanegigandet deleted the issue/8997 branch September 15, 2023 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug This is a bug, not a feature request. CSS dependencies Pull requests that update a dependency file Display facets facets allow you to explore products according to various criterion. Based on MongoDB JavaScript 🗺️ Maps responsive ux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The map on facets should be responsive
2 participants