-
-
Notifications
You must be signed in to change notification settings - Fork 717
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 attributes #713
Fix attributes #713
Conversation
Can you try maplibre-gl-js/.github/workflows/test-unit.yml Lines 35 to 49 in d00f754
|
If that works for you, feel free to update the contribution guidelines and submit a pull request. |
Bundle size report: Size Change: +12 B
ℹ️ View Details
|
Interestingly enough, the tests fail :-) this is the final version of your changes, right? |
Yes, it seems to be the latest version. Is it saying it failed on this test? That should work since it only removes that open attribute when the classes don't contain maplibregl-compact Line 164
In my testing that seems to work. the open attribute stays on resize below 640. |
I tried this but I still get many errors that seem to be related to WebGL not being able to initialize |
I think I fixed the tests in attribution_control.test.ts . It looks like it was complaining about the class order not matching the Inline Snapshot. In all the tests that failed the classes matched, but they were in a slightly different order. I was able to set up an environment in windows and tested it there
|
Cool!! The tests pass also in this CI, congrats :-) |
@acalcutt @HarelM In addition, I have integrated @acalcutt changes into my PR. Is that OK ? The git history shows that @acalcutt made the changes. Otherwise my PR can be closed and the changes of the tests can be integrated in another PR #668, if you like them. |
Looking at the code the tests were originally made for ( https://github.com/maplibre/maplibre-gl-js/blob/a1272d9f569057fed6ce3b163fc0602f824e7653/src/ui/control/attribution_control.ts ), I'm pretty sure the classes just changed order because in that version _updateAttributions(); is called before _updateCompact(); , where in my version I put _updateCompact() before _updateAttributions(). I don't think the class order will change again unless the order of those functions changes. |
Since both PRs now have (almost?) the same code I think we should close this one in favor of #668 |
Closed, since #668 has these updates + test fixes |
This PR is meant to fix the issues with attribution mentioned here ( #640 (comment) ) . It is a continuation of work done by astridx here ( #668 ) with some changes to make it a little more readable.
The test included in this were made by astridx and I am not familiar with testing them. I assume this is part or test-render, but I gt WebGL error when i try to run those tests on my headless server I use to build.
I have manually tested the various states of the compact option and the issues we found while resizing the window and they seem to work for me.
maplibre-gl-js
changelog:<changelog></changelog>
.