maplibre / ngx-maplibre-gl

Angular binding of maplibre-gl
https://maplibre.org/ngx-maplibre-gl/
MIT License
72 stars 25 forks source link

Migrate showcase to new control flow #168

Closed marcjulian closed 3 months ago

marcjulian commented 4 months ago

Added prettier for consistent formatting with the new Angular Control Flow.

Schematics for new control flow: https://angular.dev/reference/migrations/control-flow#

ng generate @angular/core:control-flow

marcjulian commented 4 months ago

The only component in the library using NgIf and NgFor is MarkersForClustersComponent. Migrating the component is straight forward, but when viewed in the demos (http://localhost:4200/demo/ngx-cluster-html) an error is thrown in the console when scrolling the map with clusters:

CleanShot 2024-06-03 at 11 59 44

marcjulian commented 4 months ago

Strange the unit test are failing for me even in the main branch. Not sure whats going on.

HarelM commented 4 months ago

Might be a chrome version change that doesn't load webgl when in headless mode. This is just a thought according to the error message and what you said.

marcjulian commented 4 months ago

Might be a chrome version change that doesn't load webgl when in headless mode. This is just a thought according to the error message and what you said.

You might be right. Last successful unit test in ci (https://github.com/maplibre/ngx-maplibre-gl/actions/runs/8726346554/job/23941372299) used Chrome Headless 123.0.6312.124 (Mac OS 10.15.7).

The failing ci test uses Chrome Headless 125.0.6422.113 (Mac OS 10.15.7) and locally I have Chrome Headless 125.0.6422.141 (Mac OS 10.15.7) both failing the same tests.

HarelM commented 3 months ago

Let's remove prittier and merge this, we can discuss if we want to introduce prittier in another PR/issue/discussion.