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

Notes #5107

Merged
merged 86 commits into from
Jul 16, 2018
Merged

Notes #5107

merged 86 commits into from
Jul 16, 2018

Conversation

thomas-hervey
Copy link
Collaborator

Added initial display functionality of osm notes. There are several small bugs to fix including repeatedly appending svg tags within notes. Next, I will focus on hover triggers that will populate the sidebar with details related to a hovered note.

utilIdleWorker
} from '../util';

var urlroot = 'https://api.openstreetmap.org',
Copy link
Contributor

Choose a reason for hiding this comment

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

This shouldn't really be a hardcoded URL endpoint, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

thanks @mmd-osm !
It is hard coded in the other services including osm.js. The remainder of the url includes the notes portion and then a bounding box once it is determined. What would you suggest?

Copy link
Contributor

Choose a reason for hiding this comment

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

I was just wondering if you could run the Notes feature against a local database only (which is convenient for testing). As I have the osm.js part running in such a way, I'm assuming that there's some override mechanism in place. Looking very briefly at your implementation I couldn't find something similar for notes. Could be I simply missed it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@mmd-osm no I think you're right. There isn't anything in place to point to a local server. I will address this and check the incoming options to see if a different path is provided. Thoughts @bhousel ?

Copy link
Member

Choose a reason for hiding this comment

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

Hmm yeah @mmd-osm and @thomas-hervey - it might make sense to refactor this notes service into services/osm.js, which already is setup to switch between dev and live servers.

For now, let's just test it how it is..

@bhousel
Copy link
Member

bhousel commented Jun 30, 2018

This is awesome 👏
Nice work @thomas-hervey, love where this is headed.

screenshot 2018-06-29 21 59 08

bhousel and others added 4 commits June 29, 2018 22:11
This makes the osmNote work a bit more like other osm objects in iD.

- When working with the osm objects, we'll treat them as immutable.
  So all modifications will be through the update method:

  e.g. can do this in a repl, like chrome devtools console:
  >  n = iD.osmNote()
  osmNote { id: -1 }
  > n = n.update({ foo: 'bar' });
  osmNote { foo: "bar", id: -1, v: 1 }

- none of the other osm objects have getters, and in JavaScript all the
  properties are public anyway
@mmd-osm
Copy link
Contributor

mmd-osm commented Jun 30, 2018

I bit of feedback from local testing: sometimes, a note has quite a number of comments and you want to scroll through the list on the left hand side to see all details. Currently, I don't see a way to focus a specific note and easily browse through that list.
Am I missing something here and this is by chance already implemented?

Image (click to open)

peek 2018-06-30 09-38

This seems like a lot but the main things here are:
- remove the _loadingTiles "global" variable.  It was causing problems because
it was being checked from the callbacks, which are async.
- cleanup the caches
- use DOM API getElementsByTagName('id') to get note id
- set a lower tilezoom z13 for notes (meaning: fetch larger bounding boxes)
@bhousel
Copy link
Member

bhousel commented Jun 30, 2018

I bit of feedback from local testing: sometimes, a note has quite a number of comments and you want to scroll through the list on the left hand side to see all details. Currently, I don't see a way to focus a specific note and easily browse through that list.
Am I missing something here and this is by chance already implemented?

Yep, this isn't implemented yet - coming soon!

@thomas-hervey thomas-hervey added wip Work in progress new-feature A new feature for iD labels Jul 14, 2018
thomas-hervey and others added 4 commits July 16, 2018 10:54
Before: We drew 2 fontawesome comment icons, on on top of the other
After: Moved icon into iD spritesheet and gave it an actual `stroke` property that can be styled
@tordans
Copy link
Collaborator

tordans commented Jul 19, 2018

Thanks for this feature! Where would you like to collect feedback – Ideas, issues, …? Separate issues in iD? Or here? Or somewhere external like a reply on Twitter?

@bhousel
Copy link
Member

bhousel commented Jul 19, 2018

Thanks for this feature! Where would you like to collect feedback – Ideas, issues, …? Separate issues in iD? Or here? Or somewhere external like a reply on Twitter?

Separate issues would be perfect, and we already have a few. I read the replies on Twitter too because I know not everyone wants to use GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature A new feature for iD
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants