60 Commits

Author SHA1 Message Date
Kyle Hensel
90c4241723 fix dependency cycle caused by utilDisplayLabel importing presetManager 2024-08-24 11:34:46 +10:00
Martin Raifer
eb18de83a9 fix crash caused by wrongly set title of validation fix 2022-07-19 19:14:05 +02:00
Martin Raifer
8bb1d39431 refactor validation modules to not inject html 2022-06-24 13:25:56 +02:00
Martin Raifer
9f3f8e1366 rename method 2021-11-29 19:26:18 +01:00
Martin Raifer
d78c357588 replace raw html injection of localized texts
by using d3 to insert the localized text spans directly into the DOM
2021-11-26 18:51:45 +01:00
Quincy Morgan
80eb197212 Merge pull request #7752 from peternewman/patch-6
Fix a lot of typos and initial codespell action run
2020-10-05 14:02:19 -04:00
Quincy Morgan
7b5df1bc40 Add lang attribute to issue fix labels (re: #7963) 2020-09-22 17:48:35 -04:00
Quincy Morgan
aa9b44a0bf Add the lang attribute to issue messages (re: #7963) 2020-09-22 17:25:18 -04:00
Quincy Morgan
5435082d9c Revert t function to returning the plain string by default
Add `t.html` function for getting the string with the `lang` attribute
2020-09-22 12:03:29 -04:00
Quincy Morgan
32f8274929 Make t function return a span element with a lang attribute unless html: false is specified in the options (re: #7963)
Update `text` functions to `html` to support inserting the `span` elements
Specify `html: false` for various instances where a `span` is not desired, e.g. `placeholder` and `title` attributes
2020-09-15 21:56:22 -04:00
Peter Newman
2c47a11008 Fix the seemingly safe spellings found by codespell
Untested, only checked by inspection.
2020-06-28 23:06:44 +01:00
Quincy Morgan
9d70ad4119 Improve performance by only checking nearby segments for almost_junction validation connections 2020-06-22 17:17:45 -04:00
Quincy Morgan
0120b009fa Take a graph parameter in utilDisplayLabel instead of the context 2020-04-01 13:29:17 -07:00
Quincy Morgan
a1af118f0e Ensure locales and presets are loaded before the UI loads (close #7406)
Consolidate localization behavior and init to a coreLocalizer function and singleton
Explicitly support `en-US` locale
Rename coreData to coreFileFetcher and export a singleton rather than using a property of coreContext
Add `apiConnections` property of coreContext to simplify adding a source switcher
Replace some init functions with re-callable, promise-supporting `ensureLoaded` functions
Make coreContext itself load the UI if a container has been specified at init time
Fix code tests
2020-03-31 12:23:31 -07:00
SilentSpike
142126f7fe Store node for quick fix in data not entityIds
Realised these are used for highlighting and should remain as is.
2020-02-11 16:10:46 +00:00
SilentSpike
0b4a690a08 Move close endpoint handling into quick fix
Just a bit more optimised since this is only relevant to check when the
quick fix is used
2020-02-11 16:10:45 +00:00
SilentSpike
006e692449 Convert to 2 space indentation 2020-02-11 16:10:45 +00:00
SilentSpike
3c7b092534 Update almost junction validation with ES6 syntax 2020-02-11 16:10:45 +00:00
SilentSpike
ec6ad0000b Show derivation of close node thresholds in code 2020-02-11 16:10:44 +00:00
SilentSpike
6976251ac2 Handle almost junction where end node are close
Based on distances at which nodes are joined by the quickfix and the
validation extends ahead of an end node, if both ways have close end
nodes and joining them would result in a small change of angle for the
edited way then they will be joined.

Closes #7201
2020-02-11 16:10:44 +00:00
Quincy Morgan
22266c66b1 Suggest noexit fix for almost junctions even if the endpoint has uninteresting tags 2019-11-22 15:47:34 -05:00
Quincy Morgan
24c72b64d1 Load issue fixes dynamically instead of cacheing them (close #7037) 2019-11-13 14:35:01 -05:00
Quincy Morgan
a3d6097d40 Rename "Fix Me" Requests validation rule to more general Help Requests
Add subtypes to almost_junction and disconnected_way validation rules
Add additional validation documentation (re: #6100)
2019-10-09 15:00:28 +02:00
Quincy Morgan
1ed73b6531 Convert validation rules to validate against a specific graph, not always the current graph (re: #6459) 2019-06-06 16:27:31 -04:00
Quincy Morgan
28db4df86b Flag detached points that are very close together (close #6394)
Fix lint error
2019-05-22 15:50:20 -04:00
Quincy Morgan
030b4b3efa Flag almost junctions between highways and themselves (close #6373) 2019-05-22 14:12:23 -04:00
Quincy Morgan
93a475c9a2 Correct issue with almost junction layer handling 2019-05-14 16:48:24 -04:00
Quincy Morgan
bb4aa84a3b Don't flag almost junction issues between features on different layers or levels (close #6355) 2019-05-13 13:03:34 -04:00
Quincy Morgan
f264cc47f0 Don't flag almost junctions when endpoint is building or parking entrance
Include issues for disabled rules in entity issues
2019-05-09 14:38:19 -04:00
Quincy Morgan
97cb90b562 Make issue messages dynamic (close #6331) 2019-05-07 14:48:30 -04:00
Quincy Morgan
375779882d Add ability to ignore warnings
Replace issue's array of entities with array of entity IDs
Improve issue ID hashing
2019-04-29 17:52:32 -07:00
Quincy Morgan
ecc217f5d8 Add validation rule to flag impossible oneway highways and waterways (close #6216) 2019-04-26 12:04:43 -07:00
Quincy Morgan
d01bb78707 Reduce circular dependencies caused by importing from indexes, the location of the validation models, and the location of areaKeys (close #6237) 2019-04-24 13:45:59 -07:00
Bryan Housel
2ebbb68604 Restore tooltips on rule checkboxes, separate 'tip' and 'reference'
Reference will show on clicking info button, and can contain more
useful information than a tooltip can.
2019-04-19 13:24:55 -04:00
Bryan Housel
01d2e3eaf3 Replace validator tooltip with reference function, add tag diff 2019-04-16 17:07:53 -04:00
Bryan Housel
294ce00211 substitute 'info' for 'data' (so I can use 'info' for an info drawer) 2019-04-15 16:56:21 -04:00
Bryan Housel
9100ce3ee4 Don't validate vertices which extend beyond the downloaded map
(closes #5938)
2019-04-10 13:40:06 -04:00
Bryan Housel
6508edf820 Avoid anonymous functions as validators
Givnig them names makes it easier to understand in the profiler
2019-04-05 09:50:22 -04:00
Quincy Morgan
e71b139171 Simplify almost junction validation 2019-04-03 16:41:26 -07:00
Quincy Morgan
6641f62685 Reduce duplicate code in almost junction validation 2019-04-03 15:44:45 -07:00
Quincy Morgan
cbae090f08 Fix crash in almost junction validation 2019-04-03 14:23:21 -07:00
Bryan Housel
3673a7c7e7 Remove lodash cloneDeep
(re #6087)

- some were able to do a different approach
    (validations/almost_junction, and settings/*)
- some were replaced with custom speedy cloners
   (in orthogonalize clonePoints and osm.js cloneNoteCache)
- some just replaced with JSON.parse(JSON.stringify()))
2019-03-29 17:18:40 -04:00
Quincy Morgan
af5012107f Fix crash when drawing a favorite highway 2019-02-27 11:44:47 -05:00
Quincy Morgan
2d6c49b92b Ignore proposed features for crossings ways, almost junction, and disconnected way validations (close #5922) 2019-02-21 10:14:25 -05:00
Quincy Morgan
ba68d921fe Add icons for crossing ways fixes and almost junction connection fix 2019-02-20 09:02:05 -05:00
Quincy Morgan
b43796a4c7 Don't flag almost junctions for points endpoints that also occur earlier in the way 2019-02-19 09:16:32 -05:00
Quincy Morgan
397097ac1f Tweak issue and fix strings
Different strings for one vs. a combination of deprecated tags
2019-02-15 14:24:11 -05:00
Quincy Morgan
1821c3e955 Update fixes UI for icons, link styling, and non-actionable fixes
Fix several bugs
2019-02-14 15:56:04 -05:00
Bryan Housel
c4fe42653a s/coordinates/loc and replace legacy names in tests
In iD codebase `loc` is usually a single coordinate pair
and `coordinates` is usually an array of pairs
2019-02-12 21:18:25 -05:00
Bryan Housel
14896b0ce5 Documentation, and move validation type up to top of each file 2019-02-12 16:07:08 -05:00