bkkhack / hackmap

App to help collaboration at hacknights.
https://bkkhack.github.io/hackmap/
MIT License
10 stars 9 forks source link

Position should reset if coordinate data is removed manually #78

Open ches opened 5 years ago

ches commented 5 years ago

There's probably another bug to try to reproduce here, but I added a hack and when dragging it onto the map it snapped to a location near the edge of the canvas, not where I tried to drop it. I couldn't move it. Upon refreshing, I can't see it at all, not even in the sidebar listing. The comment posted to GitHub just fine and is still there.

The coordinates in the HTML comment looked kinda bogus (I unfortunately deleted them by accident instead of cutting to clipboard to document them here 😞But they were at least positive numbers as I recall, no NaN or anything). I tried to manually set them, close to another existing hack's coordinates. I also tried resetting them to the default <!-- undefined,undefined -->. Nothing worked, still can't see my hack anywhere.

As far as I'm aware we don't store/cache any state except for auth, nothing in LocalStorage, etc. I tried an Incognito window too, no difference. Haven't seen any errors in JS console.

So this issue could track one of two things depending on what I'm able to reproduce when I try:

  1. Hack getting lost from the map/listing when GH issue comment still exists—how does that happen?
  2. Removing coordinates completely from a GH issue comment should behave as resetting a hack to unpositioned, as a troubleshooting mechanism. This might work as desired already, I just want to confirm it and I'm in a state right now where I cannot do that.

Maybe relevant details:

waf commented 5 years ago

when I look at the JSON response coming back from the GitHub API, your comment isn't in there at all! Maybe there's some caching going on?