Commit Graph

46 Commits

Author SHA1 Message Date
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
Martin Raifer 674421eec7 implement fetching string references
see https://github.com/openstreetmap/id-tagging-schema/pull/598
2022-10-07 12:04:23 +02:00
Martin Raifer cd4f4f37f1 clear "None" placehoder in fields, fixes #8984 2022-02-15 18:34:30 +01: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
Martin Raifer f3e8852808 don't select option on ambiguous multi-key radio fields
this matches the behaviour of a multi-selection: all matching options are still highlighted, but the radio-option is not set.

also fixes a minor bug with multi-selections not taking `<key> = no` properly into account

closes #8796
2021-11-09 15:10:47 +01:00
Quincy Morgan cb7f1c2b3c Update to id-tagging-schema v3.0.0
Add UI for translatable combo fields
2020-12-08 15:23:51 -05: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
Quincy Morgan 60f7dc7c0b Replace presets property of context with singleton
Remove utilPreset
2020-04-01 13:08:45 -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 2783408fc3 Add tooltips to mixed values in semicombo, multicombo, and radio fields 2020-01-31 14:07:16 -05:00
Quincy Morgan af928e3dc1 Support radio fields during multiselections 2020-01-31 13:02:30 -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 f5995dffb0 Cherry pick crossing buildings fix 2019-10-03 20:09:49 +02:00
Quincy Morgan 1371b3cfdc Make single-key radio fields translatable like combo fields (close #6878) 2019-09-24 19:27:50 +02:00
Quincy Morgan 5a0f8b3453 Autocomplete labels in the Wikidata field (close #5544) 2019-03-28 19:34:47 -04:00
Bryan Housel 5e1ff74199 Replace lodash difference, intersects, union
(re: 6087)
2019-03-27 01:22:11 -04:00
Bryan Housel eb0d0a35d1 Remove lodash pull
(re: #6087)
2019-03-25 22:03:39 -04:00
Bryan Housel 0e90167513 Remove lodash clone
(re: #6087)
2019-03-22 23:18:25 -04:00
Quincy Morgan b0dccc81de Condenses CSS for access, cycleway, and structure field lists 2018-12-01 11:55:21 -08:00
Bryan Housel 50d204866b Flexbox the raw member, membership controls, finish tag editor 2018-11-29 22:31:58 -05:00
Bryan Housel 958d7fac4f wip changing all fields to use flexbox everywhere 2018-11-28 18:15:38 -05:00
Bryan Housel 4533603a88 preset-input-wrap -> form-field-input-wrap
This better describes what it does.
Also, took this opportunity to update a bunch of the uifield code
(no multi line variable declarations, prefix state variables with _,
eliminate unnecessray lodash, etc)
2018-11-27 10:54:03 -05:00
Quincy Morgan 7bad67ff76 Flexbox preset field, member, and membership UI 2018-11-18 11:28:48 -05:00
Bryan Housel b882ae46bb Add code so tunnel=building_passage doesn't default to layer=-1
(closes #4516)
2017-11-09 14:54:00 -05:00
Bryan Housel 2b47ac4b3e Replace tunnel_waterway combo with structure_water radio
(closes #4384)

- adds the `layer` field so it works like the structure field on highways
- also defaults the tunnel type to `culvert` for waterways
- also fixed so that `layer` gets removed if user changes types or clicks delete
2017-10-02 11:24:59 -04:00
Bryan Housel 7376787c44 If showing layer= field, add to field.keys so delete will remove it 2017-10-02 09:40:54 -04:00
Bryan Housel 7ba3bf3a45 Don't hard code form-field-structure field name
(radiobox with structure extras can be used for other fields)
2017-10-02 09:26:54 -04:00
Bryan Housel 6d65a1c89a Convert lodah-es and d3 to named imports for ui/fields 2017-09-26 00:17:13 -04:00
Bryan Housel 077ee6d4b5 refactor structure type field to use uiField 2017-08-05 23:30:34 -04:00
Bryan Housel 8a399096b2 Add options for fields, allow unwrapped fields (no label, buttons, etc) 2017-08-05 00:33:20 -04:00
Bryan Housel 76e605568e WIP: refactor bridge/tunnel layer field to use uiField 2017-08-04 17:45:47 -04:00
Wille Marcel e6f2d27a9c invert position of increment/decrement buttons in structure layers 2017-05-08 11:34:25 -03:00
Bryan Housel 5f44c9a00a Add combobox menus to id-container instead of document.body
(re: https://github.com/openstreetmap/iD/issues/3925#issuecomment-290718356)
2017-03-31 13:44:55 -04:00
Bryan Housel d1ab5d6fc4 Bring over some more code from combo, add translation strings 2017-03-20 13:16:56 -04:00
Bryan Housel 02f1eac72b Add snake/unsnake helpers, remember recently used type tag 2017-03-19 11:44:33 -04:00
Bryan Housel 1f49bf81a4 Add a taginfo combo to the structure type field 2017-03-18 11:05:30 -04:00
Bryan Housel 74cc038c57 Add layer and type subfields below structure field
(see #2087)
2017-03-18 02:09:33 -04:00
Bryan Housel 3102a4ae6a Rename all the things to include pseudonamespaces 2016-10-04 19:06:20 -04:00
Bryan Housel 0ea59a043d Fields mostly working (but not dispatch/update) 2016-09-20 22:41:05 -04:00
Bryan Housel a86f34b4ef Pacify eslint, get build and tests running again 2016-08-26 01:15:07 -04:00
Tom MacWright cdb533fa84 Begin d3 v4 update 2016-08-21 15:19:27 -04:00
Bryan Housel 747b9f37d5 Pacify eslint 2016-07-24 17:39:06 -07:00
Tom MacWright af776501d3 Require locale, second pass (#3259)
* Require locale, second pass

* Remove t global, remove t where it isn't needed
2016-07-21 16:20:13 -04:00
Kushan Joshi 7188065a6c disband ui/core 2016-07-02 19:04:51 +05:30