499 Commits

Author SHA1 Message Date
Martin Raifer
42ea10d30a properly update number fields with non-numeric values
fixes a bug where the field was not properly filled in when the tag contained a non-numeric value (e.g. `direction=S`), which could eventually cause the tag be deleted inadvertently after focussing/blurring the field.

closes #11076

this regressed in 2b64d70352
2025-06-03 21:11:41 +02:00
Martin Raifer
c11b661ef3 fix oneway field showing "Assumed to be Yes" if cycled through
…back to the default state. This was a slight regression from the refactoring in #10730: In an intermeditate step, the entity has `oneway=yes`, which should actually be ignored when determining if an entity has an implicit oneway state.
2025-05-15 11:26:40 +02:00
Martin Raifer
7f8e676af3 refresh numeric fields on blur (#11027) 2025-05-12 18:09:39 +02:00
Martin Raifer
9b7a98862d Merge remote-tracking branch 'origin/housenumber-labels' into develop 2025-05-12 18:02:47 +02:00
Martin Raifer
6798f33598 link label of address field to housenumber input element
this makes the most sense, as it should be almost always present in the address field and be the most "unique/important" value to edit for an address

closes #11004
2025-04-29 14:40:35 +02:00
Martin Raifer
4254e67ca7 render addresses (housenumber/housename)
* points with a dedicated marker
* text inside of areas
2025-04-17 17:47:08 +02:00
Martin Raifer
95143219a2 suggest housenumber/housename values from surrounding features (#10949)
housenumber/housename are taken from surrounding areas, as well as address points that are inside (or on the perimeter of) the same building as the selected feature
2025-04-17 12:40:30 +02:00
Martin Raifer
03a5aa5058 sync dropdown keys with address tags from id-tagging-schema 2025-04-09 21:46:28 +02:00
Martin Raifer
7d933f3875 add default implied access values for ways with "motorroad=yes"
see https://wiki.openstreetmap.org/wiki/OSM_tags_for_routing/Access_restrictions
addresses https://github.com/openstreetmap/id-tagging-schema/issues/609
2025-03-20 13:54:51 +01:00
Martin Raifer
771ad4dbd9 fix calculation of access field placeholder on multiselections 2025-03-20 13:54:47 +01:00
Kyℓe Hensel
9d16588f19 move deprecatedTags logic out of osmEntity and into a helper function (#10842) 2025-03-07 18:29:25 +01:00
Chaitanya Kadu
3fa84a2abc deduplicate postcode suggestions (#10847) 2025-03-07 13:04:21 +01:00
Martin Raifer
671e9f0069 use aqueduct as default value for tunnel tag in waterway structure field
(prerequisite for https://github.com/openstreetmap/id-tagging-schema/pull/1273)
2025-02-26 11:50:44 +01:00
Martin Raifer
813f9ef8cd hide carret when options exhausted also for comboboxes w/ static values 2025-02-25 18:30:49 +01:00
Martin Raifer
fa501696e5 fix false-positive missing translation, for street+place subfield
closes #10812
2025-02-24 15:33:43 +01:00
Kyℓe Hensel
33c68064a6 Enable autofill for the source tag in the changeset panel (#10764) 2025-02-12 15:22:50 +01:00
Kyℓe Hensel
4747ae253c refactor isOneWay to properly support bidirectional ways (#10730) 2025-02-12 14:22:09 +01:00
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
Nick Doiron
6dcc73cf7c Add lang atttribute on multilingual names, wikidata/wikipedia fields (#10716)
This improves rendering of CJK names that contain unified ideographs that share a unicode codepoint, such as 化.
2025-01-31 13:49:49 +01:00
Kyℓe Hensel
d1b48ece73 fix bug preventing cardinal direction increment (#9932) 2025-01-15 11:31:33 +01:00
Martin Raifer
42f274f73f move reused regex to exported constant 2024-07-16 17:04:49 +02:00
Martin Raifer
97d1aa5e2d Fix address field overwriting existing data when switching features
fixes #12060

This bug can occur occasionally under the following circumstances:

* map feature 1 is selected
* the cursor is in an address (sub) field
* map feature 2 gets selected directly
* now, in some cases, the contents of the address fields of feature 2 are written into feature 1's tags
2024-06-05 19:55:51 +02:00
Kyle Hensel
c7731f5499 support highway=ladder 2024-05-25 16:25:59 +10:00
laigyu
6a6f30b5a8 fix link button when dragging combo field chips #10153 (#10209) 2024-04-24 12:24:52 +02:00
Martin Raifer
211b6dde5f upgrade to eslintv9 (config format, lint to updated rules) 2024-04-12 18:44:04 +02:00
Hirako
85278c35e4 Field: fix wikiURL by URL encoding it - and slight refactors (#10165)
* Field: fix wikiURL by URL encoding it - and slight refactors

* Field: fix wikiURL only encodeURIComponent instead of redundant full URL

* Field: refactors function to generate wikiURL, ensures anchor part is also URI encoded, ensures the anchor ref is not encoded, adds unit tests

* Field: refactors wikipedia URI encoding of the anchor logic, removes legacy anchorencode effort via try-catch that replaced percentage character with dots, adds unit further  tests, reduces exessive inlining
2024-03-21 00:42:08 -07:00
Tobias
b72a089f35 Field: Fix html tag type of wikidata label (#10144)
The `span` need to be a `div` after https://github.com/openstreetmap/iD/pull/10127/files
2024-03-04 19:25:53 +01:00
Tobias
ce51b33cf2 Improve combobox dropdown styling to give labels more room and readability (#10127)
* Fields: Break long lines in combo dropdown instead of ellipsis

Longer translations keys are not readable with ellipsis and the tooltip only shows the description (or fallback), not the title.

This change makes long use line breaks with small line height to make the whole text visible.

* Fields: Use table styles for rows to maximize available space

The flex box solution gave a lot of space to the label. This solution minimizes that space to give more space to the values dropdown.
2024-02-26 14:02:22 +01:00
Ramith Kulal
179fa71cdf Fix cursor on foreign link field links, fixes #9992 2023-12-06 13:03:26 +01:00
Martin Raifer
ea47581bae show turn restriction editor also when there is only one _to_ way, fixes #9983
as there might exist turn restrictions with that way as _via_.
2023-11-22 16:39:47 +01:00
Martin Raifer
20b72a2b68 only render route colours if the value is a valid color
addresses https://github.com/openstreetmap/iD/pull/9424#discussion_r1046495633
2023-11-17 13:47:16 +01:00
Kyℓe Hensel
3b24932bda fix highway=busway not supported in the turn restriction editor (#9633) 2023-11-14 09:53:23 +01:00
Le_Futuriste
100d94955f feat(fields/combo): add navigate button to web links in "chip" fields (#9974)
The common use case is for the `sources` key, often you have multiple URLs separated with semicolon.

This allow to navigate to URL and check them more easily instead of
doing manual work to select the URL copy and paste.

Created with the help of Martin Raifer at the sotmeu2023!
2023-11-13 23:06:05 +01:00
Martin Raifer
dabbd89e5d suppress autocomplete for taginfo results if field has static values
fixes #9898

Fixes a problem that occurs because the order of the field `options`
can be in general different from the order returned by taginfo
(taginfo sorts by usage, while presets typically are sorted alphabetically),
causing different values to be potentially selected for autocomplete values.
As the taginfo results typically come in a few moments delayed, this can
lead to confusing behaviour.

This solves it by just not reattempting an autocomplete using the taginfo
results, if a field has static options available.
2023-11-08 10:42:09 +01:00
Martin Raifer
a2d3cf8f9a fix jumping cursor while editing in some input fields
fixes #9233
2023-08-03 16:49:37 +02:00
Martin Raifer
57ca36227b fix clearing of contents of some input field when the tag is removed
e.g. when using the trash can icon on the UI field
2023-08-02 17:54:48 +02:00
Martin Raifer
61af54c069 fix combo field's dropdown when tag reference info is displayed
show it immediately after the input field instead of after the tag documentation text
2023-07-21 10:44:21 +02:00
Martin Raifer
9bd5817ecc don't crash on invalid identifiers
fixes a bug where the link button would not be correctly disabled on invalid identifier values

(regression in 7015fae91c)
2023-07-17 19:40:36 +02:00
Martin Raifer
7b44dfaa1b fix sorting of nearby streets in address field dropdown 2023-07-17 14:09:36 +02:00
Martin Raifer
1c1086662e fix crash when a multisel. contains empty&non-empty numeric vals, fixes #9739
this is a regression/bug in 559a4ba
2023-07-07 18:22:18 +02:00
Martin Raifer
85affbadc8 lint 2023-07-07 13:34:08 +02:00
Martin Raifer
ea054a00a5 fix bug in "lang=badvalue" handling for wikidata api
see https://github.com/openstreetmap/iD/pull/9638#issuecomment-1623497481
2023-07-07 12:49:55 +02:00
Martin Raifer
9595e997e9 Merge branch 'develop' into addr_place 2023-05-26 20:37:54 +02:00
Martin Raifer
f19a55fa13 Add support for icons on multiCombo/semiCombo fields (#9433) 2023-05-26 20:35:12 +02:00
Martin Raifer
53f77fb852 accept raw number input also for roadspeed/roadheight fields 2023-05-26 19:34:32 +02:00
Martin Raifer
2b64d70352 generalize implementation to skip input value update
when contents are "equivalent" in a given context, e.g. for numeric values with potentially different formatting in number fields
2023-05-26 19:24:10 +02:00
Martin Raifer
e0f11af2b2 also allow "raw" numbers to be input in numeric fields
when a user enters a decimal number using the "international"/English/OSM-raw-data formatting (e.g. as in `0.5`), it is parsed using the basic, non-localized, number parser. In such cases, the content of the input field should not be overwritten with the localized formatting, as that would cause unexpected glitches and make editing harder (e.g. when thousands-grouping characters seemingly "magically" disappear or appear while typing).

see https://github.com/openstreetmap/iD/pull/8769/#pullrequestreview-1324246437 ff.
2023-05-26 18:38:16 +02:00
Martin Raifer
b266ec57ad treat "empty" numbers in semicolon separated "list" as invalid 2023-05-26 15:00:10 +02:00
Martin Raifer
6d01c05f76 allow numbers to be input in "raw" format 2023-05-26 13:44:50 +02:00
Martin Raifer
249771d747 fix variable declarations 2023-05-26 13:25:59 +02:00