Skip to content

Commit

Permalink
Merge pull request #5126 from nboisteault/plotlyjs-update-and-custom-…
Browse files Browse the repository at this point in the history
…bundle

dataviz: update plotlyjs to v2.35.2 and do custom build to reduce file size
  • Loading branch information
nboisteault authored Dec 13, 2024
2 parents ff3f500 + c4858ec commit f826c1d
Show file tree
Hide file tree
Showing 18 changed files with 41 additions and 98 deletions.
4 changes: 2 additions & 2 deletions lizmap/modules/dataviz/classes/dataviz.listener.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ public function ongetMapAdditions($event)
if ($dv->getStatus()) {
$locale = substr(jApp::config()->locale, 0, 2);
$js = array(
$bp.'assets/js/dataviz/plotly-latest.min.js',
$bp.'assets/js/dataviz/plotly-custom.min.js',
$bp.'assets/js/dataviz/dataviz.js',
);
if (in_array($locale, array('de', 'el', 'es', 'fr', 'it', 'nl', 'ro'))) {
$js[] = $bp.'assets/js/dataviz/plotly-locale-'.$locale.'-latest.js';
$js[] = $bp.'assets/js/dataviz/plotly-locale-'.$locale.'.js';
}
$datavizConfig = array(
'url' => jUrl::get('dataviz~service:index', array('repository' => $event->repository, 'project' => $event->project)),
Expand Down
4 changes: 2 additions & 2 deletions lizmap/modules/dataviz/controllers/service.classic.php
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,8 @@ protected function GetPlot()
$basePath = jApp::config()->urlengine['basePath'];
$locale = substr(jApp::config()->locale, 0, 2);
$plot['plotly'] = array(
'script' => $basePath.'assets/js/dataviz/plotly-latest.min.js',
'locale' => $basePath.'assets/js/dataviz/plotly-locale-'.$locale.'-latest.js',
'script' => $basePath.'assets/js/dataviz/plotly-custom.min.js',
'locale' => $basePath.'assets/js/dataviz/plotly-locale-'.$locale.'.js',
);

$rep->data = $plot;
Expand Down
8 changes: 8 additions & 0 deletions lizmap/www/assets/js/dataviz/plotly-custom.min.js

Large diffs are not rendered by default.

65 changes: 0 additions & 65 deletions lizmap/www/assets/js/dataviz/plotly-latest.min.js

This file was deleted.

1 change: 0 additions & 1 deletion lizmap/www/assets/js/dataviz/plotly-locale-de-latest.js

This file was deleted.

1 change: 1 addition & 0 deletions lizmap/www/assets/js/dataviz/plotly-locale-de.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion lizmap/www/assets/js/dataviz/plotly-locale-es-latest.js

This file was deleted.

1 change: 1 addition & 0 deletions lizmap/www/assets/js/dataviz/plotly-locale-es.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion lizmap/www/assets/js/dataviz/plotly-locale-fr-latest.js

This file was deleted.

Loading

1 comment on commit f826c1d

@3liz-bot
Copy link
Contributor

Choose a reason for hiding this comment

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

The latest weekly run of end2end "cypress" tests failed with this latest commit on the branch release_3_9 😣

CC @nboisteault and @Gustry, please have a look to the logs. Maybe it's a false positive ?

Visit https://github.com/3liz/lizmap-web-client/actions/runs/12345441338

Please sign in to comment.