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

Output for glyphs and sprites #18

Merged
merged 2 commits into from
Apr 19, 2023
Merged

Output for glyphs and sprites #18

merged 2 commits into from
Apr 19, 2023

Conversation

aparlato
Copy link
Collaborator

@aparlato aparlato commented Apr 17, 2023

Pre-req to https://github.com/stamen/mapbox-gl-style-diff-viewer/issues/8

This adds glyphs and sprite diffs to the output.

I haven't been in this code in a while, but it looks like this hasn't had much updating since the original code was borrowed from setStyle in GLJS. I think it would be worth opening a follow up here to make all this cleaner for our own purposes since we're kind of just using what's helpful to us in here with a lot of cruft (for us).

[edit]: Opened an issue for cleanup: #19

@aparlato aparlato mentioned this pull request Apr 18, 2023
Copy link
Contributor

@ebrelsford ebrelsford left a comment

Choose a reason for hiding this comment

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

One inline comment, otherwise I tested it and it works great.

src/lib/diff.js Outdated
@@ -213,6 +223,7 @@ function diffSources(before, after, commands, sourcesRemoved, differ) {
} else {
// no update command, must remove then add
updateSource(sourceId, after, commands, sourcesRemoved);
// TODO Update differ?
Copy link
Contributor

Choose a reason for hiding this comment

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

Would you mind expanding on this? It isn't obvious to me what's actionable here / should there be an issue for it / would it be completely superseded by #19.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah yea, sorry that was a personal note I thought I removed. I'll remove it and open an issue. The way things are structured with now, we don't get super helpful diffs for updating a source url which we do often. It appears as "remove" + "add".

This could be superseded by #19 but I think I may want to open an issue to document separately for posterity anyway.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

#20

@aparlato aparlato merged commit 530bb8d into main Apr 19, 2023
@aparlato aparlato deleted the glyphs-sprites branch April 19, 2023 17:53
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.

2 participants