72 Commits

Author SHA1 Message Date
Kyℓe Hensel
2c0f8a4b5f handle cycleway:both=* (#9587)
this works for any `directionalCombo` field, including `sidewalk:both`
2025-02-05 10:41:48 +01:00
Martin Raifer
42f274f73f move reused regex to exported constant 2024-07-16 17:04:49 +02:00
Sam Ho
43c65bf994 Fix localized field hidden despite nonempty subkeys (Closes#10323) 2024-07-16 12:38:06 +01:00
Martin Raifer
46a2d6365f show tag reference info for the currently filled-in tag value, closes #9786 2023-07-21 11:03:28 +02:00
Martin Raifer
d9695f1cef update directionalCombo fields to tagging schema v6 schema
keeping a fallback to v5's `cycleway` field type for now

for #9477
2023-01-24 14:25:53 +01:00
Bryan Housel
2b2a71f597 Don't pre-resolve and index complex locationSets into GeoJSON.
This was taking a lot of time at app startup.

Instad now we resolve and index only the include and exclude parts.
We can still determine the valid locationSets at runtime in `locationSetsAt()`
by checking the `_locationIncludedIn` and `_locationExcludedIn` caches.

This also upgrades the locationManger to an ES6 class.

This also includes some hacky code in nsi.js so that the NSI will continue to work.
The NSI matcher can build its own location index, but it doesn't need to do this.
We monkeypatch a few of the matcher collections to work with the new LocationManager.
2022-10-28 10:49:01 -04:00
Martin Raifer
e9bdd79887 fix content of locked ui field tooltip 2022-09-19 13:43:04 +02:00
Martin Raifer
ac77289b4d refactor localized text rendering in tooltips, flash messages 2022-06-23 18:55:57 +02:00
Martin Raifer
9576e95d83 change label of ui fields from raw html to a callback function
fixes #9159
2022-06-23 10:49:38 +02:00
Bryan Housel
271e1c2e19 Use locationManager to filter fields/presets/defaults 2021-01-08 16:06:57 -05:00
Quincy Morgan
d57ed85e98 Merge branch develop 2020-12-16 11:43:36 -05:00
Quincy Morgan
baabd81987 Unbundle id-tagging-schema data and translations
Update for id-tagging-schema 2.0.0
2020-12-01 11:14:14 -05:00
Quincy Morgan
2769ac87f1 Support territories in preset and field country limiters (re: #8102) 2020-10-21 18:21:17 -04:00
Quincy Morgan
47ae71ce16 Revert "Support territories in preset and field country limiters (re: #8102)"
This reverts commit a3a9259859.
2020-10-21 18:17:52 -04:00
Quincy Morgan
a3a9259859 Support territories in preset and field country limiters (re: #8102) 2020-10-19 13:12:05 -04:00
Quincy Morgan
21a49bbec8 Initial support for D3 v6.2.0 2020-10-06 15:08:39 -04:00
Quincy Morgan
9da4c4bb62 Add lang attribute to more labels (re: #7963) 2020-09-23 10:44:38 -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
a3549f9a76 Merge branch 'develop' into lang-attributes
# Conflicts:
#	modules/ui/commit_warnings.js
#	modules/ui/field.js
#	modules/ui/fields/wikidata.js
#	modules/ui/fields/wikipedia.js
#	modules/ui/full_screen.js
#	modules/ui/panels/history.js
#	modules/ui/sections/entity_issues.js
#	modules/ui/sections/map_features.js
#	modules/ui/sections/raw_member_editor.js
#	modules/ui/sections/validation_rules.js
#	modules/ui/tag_reference.js
2020-09-22 10:55:07 -04:00
Quincy Morgan
58014ace62 Don't prevent default tabbing to elements (re: #8004) 2020-09-17 12:07:20 -04:00
Quincy Morgan
a3f9c3fb81 Merge branch 'develop' into lang-attributes
# Conflicts:
#	modules/ui/fields/combo.js
2020-09-17 09:07:18 -04:00
Quincy Morgan
98bea69947 Add Vehicles field for public_transport presets (close #6142, re: #7970)
Enable variant type of `multiCombo` field that works for any listed keys, not ones under a prefix
2020-09-16 15:15:10 -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
Quincy Morgan
dffb21a730 Fix issue with prerequisiteTag 2020-03-31 13:15:03 -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
Quincy Morgan
a7e639d514 Make the field geometry property accept multiple types
Make the Elevation field only universal for nodes (re: #5719)
Remove the elevation field from route presets (close #7479)
2020-03-28 13:57:06 -07:00
Quincy Morgan
d62a62cba8 Make popover and tooltip part of the UI module instead of utils 2020-03-24 17:32:09 -07:00
Quincy Morgan
e340111a2a Fix issue where field geometry restrictions were not obeyed 2020-03-23 12:01:29 -07:00
Quincy Morgan
4872b06a28 Randomize form field ids to thwart browser memory and help with embedding iD (close #6444) 2020-03-21 13:16:40 -07:00
Quincy Morgan
1c7a150854 Fix issue with fields in commit UI 2020-01-31 14:26:33 -05:00
Quincy Morgan
1b331bb678 Add mechanism for fields to support editing during multiselection (re: #7276)
Add `utilCombinedTags` method and use it for the raw tag editor as well as fields
Pass `entityIDs` array into fields instead of single `entity` object
Give field revertion its own path separate from `change`
Add multiselection editing to fields in files: access, address, check, combo, cycleway, input, maxspeed, textarea, and wikidata
2020-01-30 13:53:29 -05:00
Quincy Morgan
1647b9addf Add countryCodes and notCountryCodes properties for fields (close #7085)
Add documentation note about `prerequisiteTag` property getting ignored if a value is present
2019-12-03 20:11:39 -05:00
Quincy Morgan
aa0a4400ad Don't remove moreFields UI when clearing a value (close #6580) 2019-12-03 15:23:41 -05:00
Quincy Morgan
7c8a7b8de6 Fix lint error 2019-09-13 15:19:04 -04:00
Quincy Morgan
029e2ee9f5 Make the Level field non-universal and add it only to related presets (re: #5719)
Allow specifying a key that will prevent a field from displaying
Don't show the Level field on features with a `building` tag
2019-09-13 14:07:12 -04:00
Bryan Housel
69a25fd6aa Move locking code from input and localized up to uiField
Also adjust styles some more for wikidata tagged items
2019-05-20 17:50:50 -04:00
Bryan Housel
06bdfbfb8a Use gray stroke on marker and lock icon on field for locked item 2019-05-20 15:36:10 -04:00
Quincy Morgan
401c3a5005 Fix issue with the Label field by changing the class name of form-field-label (close #6344) 2019-05-13 10:36:21 -04: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
7a6c63fcc5 Remove lodash extend (re: #6087) 2019-03-23 00:38:39 -04:00
Bryan Housel
7e6f68a1b2 Remove lodash some
(re: #6087)
2019-03-23 00:07:52 -04:00
Bryan Housel
0e90167513 Remove lodash clone
(re: #6087)
2019-03-22 23:18:25 -04:00
Quincy Morgan
f2f4c2d9c7 Make optional multiCombo fields appear if a value exists (closes #5764) 2019-01-25 09:43:07 -05:00
Bryan Housel
09e574983f Don't call formFields.tagsChanged() when presetEditor.tags change
(closes #5690)

This change also makes sure to use the latest copy of the entity in
field.isAllowed() to ensure the prerequisite field check works
and fieldsArr is filtered properly for #5583
2019-01-11 17:42:34 -05:00
Quincy Morgan
7c192a2e36 Fixed bug where the entity ID could not be found for the field 2018-12-20 12:25:35 -05:00
Quincy Morgan
a61cdc8208 Removed unused function 2018-12-13 17:29:59 -08:00
Quincy Morgan
a4b2924e4e Merge branch 'master' into field-prerequisite-tags 2018-12-13 17:23:54 -08:00
Bryan Housel
9aceb8f725 Fix lazy instantiation of the fields
They are shown either if `_show=true` or `isPresent()`
2018-12-11 19:01:23 -05:00
Bryan Housel
0d958f04c1 Don't try to render a field that's not yet shown 2018-12-11 16:37:36 -05:00
Bryan Housel
39b3f1df68 Avoid creating comboboxes
(closes #5568)

Several strategies in here:
- Move uiCombobox() from inside the render function to class variable
- Don't render stuff like the raw tag editor when it's collapsed
- Don't show as many fields/combos on hover
- Don't instantiate fields (like universal/more) until they're actually shown
- Bind the combo on enter selection not on update selection
2018-12-11 16:07:00 -05:00