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

Jvectormap next #12359

Merged
merged 3 commits into from May 19, 2023
Merged

Jvectormap next #12359

merged 3 commits into from May 19, 2023

Conversation

escopecz
Copy link
Sponsor Member

Q A
Bug fix? (use the a.b branch) [y]
New feature/enhancement? (use the a.x branch) [ ]
Deprecations? [ ]
BC breaks? (use the c.x branch) [y]
Automated tests included? [ ]
Related user documentation PR URL mautic/mautic-documentation#...
Related developer documentation PR URL mautic/developer-documentation#...
Issue(s) addressed Fixes https://mautic.atlassian.net/browse/TPROD-440

Description:

The hard-coded jvectormap library is not maintained anymore and in https://www.npmjs.com/package/jvectormap there is this alert:

This package has been deprecated. jvectormap is not maintained since Aug 2015. You can use jvectormap-next or jqvmap instead.

So I replaced the hard-coded library with https://www.npmjs.com/package/jvectormap-next loaded via NPM. We run on the latest version 3.1.1.

There was no need to change any Mautic's code. It all worked when I swapped the library.

Steps to test this PR:

  1. Open this PR on Gitpod or pull down for testing locally (see docs on testing PRs here)
  2. The map is used in 2 places and both load the location from different data.
  3. Create a landing page and visit it in an incognito browser. This will create an anonymous contact.
  4. Open that contact detail page. If it has the latitude and longitude info in the IP address record then you'll see the Map tab and you'll be able to see the spot on the map:
    Screenshot 2023-05-17 at 17 29 59
  5. Add the map widget to your dashboard
  6. Make sure you have a contact with some country
  7. The contact should highlight the country on the map:
    Screenshot 2023-05-17 at 17 30 09

@escopecz escopecz added bug Issues or PR's relating to bugs ready-to-test PR's that are ready to test refactoring The change does not change behavior but improves the code labels May 17, 2023
@escopecz escopecz added this to the 5.0-alpha milestone May 17, 2023
@codecov
Copy link

codecov bot commented May 17, 2023

Codecov Report

Merging #12359 (1342067) into 5.x (8cc7abf) will increase coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##                5.x   #12359   +/-   ##
=========================================
  Coverage     55.88%   55.88%           
  Complexity    35959    35959           
=========================================
  Files          2258     2258           
  Lines        107805   107805           
=========================================
+ Hits          60246    60247    +1     
+ Misses        47559    47558    -1     
Impacted Files Coverage Δ
...undles/CoreBundle/Helper/AssetGenerationHelper.php 56.95% <ø> (ø)

... and 1 file with indirect coverage changes

Copy link
Member

@mabumusa1 mabumusa1 left a comment

Choose a reason for hiding this comment

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

The PR works as expected, Maps loaded as required

@mabumusa1 mabumusa1 added pending-test-confirmation PR's that require one test before they can be merged and removed ready-to-test PR's that are ready to test labels May 19, 2023
@escopecz escopecz removed the pending-test-confirmation PR's that require one test before they can be merged label May 19, 2023
@escopecz escopecz merged commit 3052c4d into mautic:5.x May 19, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues or PR's relating to bugs refactoring The change does not change behavior but improves the code
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants