-
Notifications
You must be signed in to change notification settings - Fork 936
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
Refactor embed.js.erb with layers.yml #5571
Conversation
This function doesn't update any existing marker.
This function adds a marker to notes layer. This controller doesn't need to do anything with markers of existing notes.
We want the new note marker in the same layer with its halo. Also we don't want to put anything in noteLayer because it clears its contents on certain zoom levels.
newHalo() wasn't always creating new halos. It had an event type argument that was checked against drag event. Depending on this check, newHalo() could remove the halo.
This ensures that marker is always added/removed together with its halo.
It was also called from noteCreated() but that triggered page.unload() via OSM.router.route().
Same reasons as in the previous commit.
Note that addNoteButton.hasClass("active") check in page.load is useless because page.unload removes this class.
If not done, it's possible to lose the marker when starting from low zooms.
It was supposed to mean that the block is past its end date but still wasn't read by the user. That turned out to be confusing because although it said "expired", such blocks were active.
Generated by 🚫 Danger |
Ok I don't think I could've failed harder in squashing the previous commits 🫠 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code changes here look great now but the commit history is rather messy - can we get rid of the merges please and rebase it instead? and merge any fixup commits into the thing they're fixing - having two Refactor embed.js.erb with layers.yml
commits in one PR can't be right.
Remove other whitespace in layerId too Consolidate options destructuring Add Sprockets directive
…treetmap-website into embed-yaml-layers
Well, I tried to and failed miserably, as you may have seen. I fixed it in another branch, but as PRs can't have the source branch changed, I opened #5580. |
You don't need to "change the source branch" because the source branch will still be master. What you need to do is to rebase, and then force push. |
But I don't want to pull from the master anyway but from my dev branch, the master should stay the target branch (why would I want to change that now).
What do you think have I been trying to do? Unnecessarily messing up the commit history? This is what I get for trying to follow CONTRIBUTING.md |
git rebase master your-branch-name |
In this case But it you've done a separate PR now then I can review that instead so probably no point in redoing this one now, just something to bear in mind for the future. |
Like #5550 but with reading the layers.yml file instead of duplicating information