Bryan Housel
f5b6024988
Revise name/branch splitting code
...
This now breaks the name into fragments and reruns the fragments against the NSi matcher
rather than using flaky regular expressions. Has a few advantages:
(re: https://github.com/osmlab/name-suggestion-index/issues/4543#issuecomment-797577999 )
2021-03-12 15:03:50 -05:00
Bryan Housel
3cf5f69082
Allow missing locationSetID on presets, fields, categories
...
This simplifies the code a bit, just treat it as worldwide if missing
2021-03-12 12:27:50 -05:00
Bryan Housel
f95e7db8c9
Create the categories like the presets
...
The lack of locationSet was causing them to not show up, which indirectly
broke the tutorial at the step where user needs to pick the road category.
2021-03-12 12:04:52 -05:00
Bryan Housel
d282140999
If we match a generic name, stop looking
...
This is for "nextbike"
(re: https://github.com/osmlab/name-suggestion-index/issues/4543#issuecomment-796126041 )
2021-03-11 17:51:09 -05:00
Bryan Housel
98a622f41a
Make sure a name is either primary or alternate (can't be both)
2021-03-11 17:46:09 -05:00
Bryan Housel
2e9c463837
update imagery
2021-03-11 17:01:52 -05:00
Bryan Housel
19a8fd16d2
Be smarter about identifying what tree an osm feature might be in
...
Needed this after I added `highway=bus_stop` to the transit tree
2021-03-11 16:28:26 -05:00
Bryan Housel
9f30ebf551
Adjust verbose utilDisplayLabel call, use for more validation messages
...
(re: https://github.com/osmlab/name-suggestion-index/issues/4543#issuecomment-794527259 )
2021-03-10 10:30:57 -05:00
Bryan Housel
2b7adf89fa
Remember user's preference for expanding issue-info section
...
This shows the tag diff, and other helpful information about the detected issues.
It is expanded by default now
(closes #6408 , closes #8143 )
2021-03-08 15:10:30 -05:00
Bryan Housel
c3e9e8c8ff
Support a more verbose format for listing issues
...
Includes the feature type in the label
(re: https://github.com/osmlab/name-suggestion-index/issues/4543#issuecomment-791919134 )
2021-03-08 12:15:17 -05:00
Bryan Housel
a827e13a6d
Be less aggressive about removing toplevel tags
...
(re: https://github.com/openstreetmap/iD/pull/8305#issuecomment-792871448 )
2021-03-08 11:36:41 -05:00
Bryan Housel
a656106373
Include nsi_dissolved in test setup
2021-03-05 11:59:36 -05:00
Bryan Housel
7a82dba825
Only match alternate amenity/yes if it actually is tagged that way
2021-03-05 10:59:15 -05:00
Bryan Housel
3f8faec413
Improvements to name gathering
...
- Actually bail out properly if namelike values contain semicolon ';'
- Prioritize the canonical tags like `brand:wikidata`, `operator:wikidata`
- Don't insert a name into 'alternate' set if it's already in 'primary' set
2021-03-05 10:40:06 -05:00
Bryan Housel
1b1bf8eed2
Don't offer upgrades to dissolved items
2021-03-05 10:04:29 -05:00
Bryan Housel
bbed217625
For some names, consider splitting name into name and branch..
2021-03-05 09:54:47 -05:00
Bryan Housel
dc2267866e
Unsquish the issue messages by adding more side padding
2021-03-03 13:26:35 -05:00
Bryan Housel
42dccbf123
When displaying a preset image, use display:none for siblings
...
visibility:hidden still preserves space, which would uncenter the image in some cases
2021-03-03 13:18:56 -05:00
Bryan Housel
1f6a2121c4
Move all of NSI into a service, rewrite matcher code
2021-03-03 12:04:37 -05:00
Bryan Housel
4d9336b1c7
Checkin en.min.json
2021-02-12 18:15:30 -05:00
Bryan Housel
76943351ca
Better handling of headGraph, separate head and base queues
...
This involves a few things to make the validator less weird
- _headGraph shouldn't be allowed to change while validation is happening..
- So we don't allow that to happen anymore, and keep track of _headPromise and _headIsCurrent
- If head graph falls behind, kick off another validation to catch it up
- Separate head and base work queues, so we aren't waiting for the base entities to validate
before providing feedback to the user about what they are editing
(the base queue can get quite large around metropolitan areas)
2021-02-12 18:07:36 -05:00
Bryan Housel
90bbe38fe8
Remove the brand combo from the name field
...
This has caused problems going back a long time, and now that we have a validator
and very visible brand presets with logos, it's not necessary anymore.
(re: #5558 , closes #8271 , closes #8304 )
2021-02-12 10:41:47 -05:00
Bryan Housel
3665f80d46
Also include operator:wikidata as a wikidata tag
...
osmEntity#hasWikipedia was only used by the suspicious_name validator
2021-01-29 11:11:59 -05:00
Bryan Housel
b032cd9f01
Adust NSI matching validation code:
...
- don't try matching semicolon-separated lists to NSI
- better matching for flagpoles with a `country` tag
- better lists of namelike keys (don't match flag operator)
see: https://github.com/openstreetmap/iD/pull/8305#issuecomment-769174070
2021-01-28 17:17:49 -05:00
Bryan Housel
3640e15fa2
Fix misspelling "coprorate" -> "corporate"
2021-01-27 11:54:39 -05:00
Bryan Housel
16f2f07300
Merge pull request #8319 from openstreetmap/promisify_validation
...
Promisify validation
2021-01-27 11:49:27 -05:00
Bryan Housel
f87c2d9357
Allow validators to return provisional results, revalidate after delay
...
Also add a ton of commments to validator.js
2021-01-27 10:38:48 -05:00
Bryan Housel
11201eb822
Rewrite the validator in ES6/Promises, several improvements here:
...
- implements a validation work queue, jobs are run during browser idle callbacks
- when merging base entities, don't run validations 2x on both base and head graphs (this was wasteful)
- keep track of resolved issues in a separate set (it's not a simple compare of base/head anymore)
this happens after validation queue is empty and avoids race conditions and inaccurate resolved counts
2021-01-25 12:50:11 -05:00
Bryan Housel
4f369a85a5
Match the prereleased nsi v5 (for now)
2021-01-22 11:59:14 -05:00
Bryan Housel
96298f2836
Preserve name value if this preset shows brand or operator field
...
This also fixes the logic for calculating whether the preset shows a
`brand` or `operator` field - it needs to use `fields()` to actually
resolve the fields, as these fields can be inherited from another preset.
This also includes a change to match "primary" names before
"alternate" names (aka the "Baby Gap" / "Gap" problem)
2021-01-19 13:15:16 -05:00
Bryan Housel
f61a3ef5e3
Don't replace flag:name tag - it's expected to be in local language
2021-01-18 21:44:27 -05:00
Bryan Housel
a32553595c
name:pronunciation is not namelike
2021-01-18 21:39:06 -05:00
Bryan Housel
74d28257c4
Fix teh misspellings
2021-01-18 19:48:35 -05:00
Bryan Housel
4228b65602
Support more *:wikidata tags for field locking and pin styling
2021-01-18 17:18:37 -05:00
Bryan Housel
f39f73e3ae
Make sure suggestion preset terms get used in the search
2021-01-18 15:02:07 -05:00
Bryan Housel
a38a93c073
Actually assign the locationSetID properties on the given objects
...
(should have been in 868db8819 )
2021-01-18 13:41:46 -05:00
Bryan Housel
0b3795cde3
NSI match returns an object now
2021-01-15 17:25:24 -05:00
Bryan Housel
d3fb8c60f9
Upgrade validations outdated_tags, suspicious_names to NSI v5
2021-01-13 13:46:00 -05:00
Bryan Housel
2d8c90786f
coreLocation tests, documentation
2021-01-11 13:01:30 -05:00
Bryan Housel
868db8819f
Have mergeLocationSets work on Objects, add locationSetID property
...
This means less work for the other parts of the code,
now they don't need to chain that extra step after the promise.
2021-01-09 10:34:58 -05:00
Bryan Housel
c4daf1b377
Use locationManager to resolve/query community index
2021-01-08 17:05:37 -05:00
Bryan Housel
271e1c2e19
Use locationManager to filter fields/presets/defaults
2021-01-08 16:06:57 -05:00
Bryan Housel
ab85590eb4
Pre-resolve the world locationSet
2021-01-08 14:00:49 -05:00
Bryan Housel
0ad7de0f10
Move the location index and resolver into a global coreLocations
2021-01-08 11:29:51 -05:00
Bryan Housel
9eb6f8781f
Update presetIndex to resolve and index locationSets
...
Added a deferred work queue to do this with requestIdleCallback in the background
2021-01-06 16:26:12 -05:00
Bryan Housel
b0800c10ed
Update to name-suggestion-index v5
...
Merge in NSI presets after UI has initialized
2021-01-05 12:44:33 -05:00
Quincy Morgan
2c2eabb145
Don't count tags under the name namespace as descriptive tags ( close #8273 )
...
Don't count `description`, `note`, `start_date`, or tags under those namespaces as descriptive tags
2021-01-05 09:56:19 -05:00
Quincy Morgan
1997aa2193
Merge pull request #8282 from openstreetmap/dependabot/npm_and_yarn/js-yaml-4.0.0
...
Bump js-yaml from 3.14.1 to 4.0.0
2021-01-05 09:19:22 -05:00
dependabot[bot]
f5ea15d3c2
Bump js-yaml from 3.14.1 to 4.0.0
...
Bumps [js-yaml](https://github.com/nodeca/js-yaml ) from 3.14.1 to 4.0.0.
- [Release notes](https://github.com/nodeca/js-yaml/releases )
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md )
- [Commits](https://github.com/nodeca/js-yaml/compare/3.14.1...4.0.0 )
Signed-off-by: dependabot[bot] <support@github.com >
2021-01-05 05:09:41 +00:00
Quincy Morgan
cf75c814e4
Merge pull request #8274 from openstreetmap/dependabot/npm_and_yarn/ideditor/location-conflation-0.7.0
...
Bump @ideditor/location-conflation from 0.6.0 to 0.7.0
2021-01-04 10:37:15 -05:00