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

Add preset for building=farm_auxiliary and rename preset for building=farm #4826

Closed
lakedistrictOSM opened this issue Feb 20, 2018 · 4 comments
Labels
good first issue Best for first-time contributors. No experience necessary! preset An issue with an OpenStreetMap preset or tag

Comments

@lakedistrictOSM
Copy link

building=farm_auxiliary

building=farm

@bhousel bhousel added good first issue Best for first-time contributors. No experience necessary! preset An issue with an OpenStreetMap preset or tag labels Feb 20, 2018
@MaciejWWojcik
Copy link
Contributor

Hello, sorry for that stupid questions - I'm new and want to learn and help.

I want to make this issue, so I writed my code in presets.yaml and then start npm test, because of contributing.md

There I have two problems:

  1. My changes in yaml disappeared
  2. Test stuck at iD.uiFieldWikipedia 2)"before each" hook

What I'm misssing?

@bhousel
Copy link
Member

bhousel commented Feb 28, 2018

Hey @MaciejWWojcik thanks!
We have a special readme just for working with presets and fields:
https://github.com/openstreetmap/iD/blob/master/data/presets/README.md

There is a lot of info in there, but the tl;dr is

  • presets and fields are all defined in the .json files
  • run npm run build to rebuild the generated files (you found that the .yaml is one)

So for this request, the steps to do are:

  1. copy /data/presets/presets/building/farm.json to /data/presets/presets/building/farm_auxiliary.json
  2. edit farm_auxiliary.json and change the "tags" to contain "building": "farm_auxiliary"
  3. edit farm.json and change the "name" from "Farm Building" to "Farm House"
  4. npm run build

You can test whether it worked by running npm run start and using iD on localhost. You should be able to find both presets "Farm House" (which will add the tag building=farm) and "Farm Building" (which will add the tag building=farm_auxiliary).

I'm not sure what is causing the other test failure, but it sounds probably unrelated.

@MaciejWWojcik
Copy link
Contributor

Okay, thanks a lot! I will work on this ;)

@MaciejWWojcik
Copy link
Contributor

MaciejWWojcik commented Feb 28, 2018

#4839 I think I fixed it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Best for first-time contributors. No experience necessary! preset An issue with an OpenStreetMap preset or tag
Projects
None yet
Development

No branches or pull requests

3 participants