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

Remove duplicate mapboxgl-css classes #1575

Merged
merged 5 commits into from
Aug 29, 2022
Merged

Remove duplicate mapboxgl-css classes #1575

merged 5 commits into from
Aug 29, 2022

Conversation

birkskyum
Copy link
Member

@birkskyum birkskyum commented Aug 29, 2022

These duplicate classes were introduced to bring improved backward compatibility to the 1.x release. This cleanup reverts that, which was intended to happen with the v2 release where we would start looking forward. See #203, #83

@birkskyum birkskyum changed the title Remove deprecated mapbox-css classes Remove deprecated mapboxgl-css classes Aug 29, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Aug 29, 2022

Bundle size report:

Size Change: -927 B
Total Size Before: 205 kB
Total Size After: 204 kB

Output file Before After Change
maplibre-gl.js 195 kB 195 kB -307 B
maplibre-gl.css 9.65 kB 9.03 kB -620 B
ℹ️ View Details No major changes

@birkskyum birkskyum changed the title Remove deprecated mapboxgl-css classes Remove duplicate mapboxgl-css classes Aug 29, 2022
@birkskyum birkskyum requested a review from wipfli August 29, 2022 09:08
@HarelM
Copy link
Collaborator

HarelM commented Aug 29, 2022

Great, I would consider adding to the readme a section where one could use an older version of the css file (form some CDN) in order to keep backwards compatibility, but that this file may not work for future versions.
Your call.
Otherwise looks good.

@HarelM
Copy link
Collaborator

HarelM commented Aug 29, 2022

Does this require version 3 now?

@birkskyum
Copy link
Member Author

I updated the readme to be a bit more contemporary because for the migration guide it kind of assumed that people were using Mapbox v1 which can't be assumed anymore.

It's arguably already-deprecated classes that we remove, so in that context, I think it's okay to have it in 2.x.

@birkskyum birkskyum merged commit a3568e0 into main Aug 29, 2022
@birkskyum birkskyum deleted the remove-mapbox-classes branch August 29, 2022 10:14
@birkskyum
Copy link
Member Author

I'll go through https://maplibre.org/maplibre-gl-js-docs/plugins/ to assess if any of the plugins need a PR.

@wipfli
Copy link
Contributor

wipfli commented Aug 29, 2022

It is a breaking change and requires a major version bump I think.

@HarelM
Copy link
Collaborator

HarelM commented Aug 29, 2022

I agree. Let's see if we can introduce other breaking changes before releasing a new version so that we do less breaking changes in the future, if possible.

@wipfli
Copy link
Contributor

wipfli commented Aug 29, 2022

The unit tests did not seem to cover the mapbox css stuff. Do they cover the maplibre css stuff?

@birkskyum
Copy link
Member Author

Many of our unit tests use the maplibregl- classes to query etc., whereas none of them used the mapboxgl-.

@birkskyum
Copy link
Member Author

birkskyum commented Aug 29, 2022

But i.e. navigation_control.ts doesn't have unit tests at all right now, and it uses the classes, but the jest coverage report picks up on it now.

@HarelM
Copy link
Collaborator

HarelM commented Aug 29, 2022

The addition of the mapbox css classes was a mitigation to ease the transition to maplibre. The original state was that we replaced all usages of mapbox with maplibre and only after that we added back the mapbox prefix to the css, so yes, it wasn't tested as this was an after thought basically...

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.

4 participants