Commit Graph

74 Commits

Author SHA1 Message Date
Quincy Morgan
5fbaad1088 Make the waterway destination field separate from the road sign destination field (re: 7c5ec9be70)
Make the destination field for the destination_sign preset a semiCombo (re: #6970)
2020-06-24 16:31:28 -04:00
Quincy Morgan
cc52b6cfd4 Prevent empty combo fields from adding a blank tag 2020-06-18 10:51:12 -04:00
Quincy Morgan
5f93da5a59 Add a reusable function for calculating the combined extent of multiple entities (re: #7706) 2020-06-16 13:17:43 -04:00
Quincy Morgan
874c412b74 Enforce max unicode charachter length of keys, values, and relation roles through truncation upon input rather than HTML maxlength attribute (close #6817)
Normalize unicode when changing keys, values, and relation roles
2020-06-10 14:11:55 -04:00
Quincy Morgan
762307bd7d Restrict key, value, and role character limits based on unicode characters, not UTF-16 code units (re: #6817) 2020-06-09 15:41:15 -04: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
3c0b926ec7 Replace coreContext.geometry function with a more explicit coreGraph.geometry function 2020-03-21 14:23:44 -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
2783408fc3 Add tooltips to mixed values in semicombo, multicombo, and radio fields 2020-01-31 14:07:16 -05:00
Quincy Morgan
b3262a71dc Use newlines instead of semicolons to separate mutliselection tag values in tooltips (re: #7306) 2020-01-31 10:49:31 -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
Bryan Housel
567eeac587 Make several data external instead of bundled:
Also dist/data/* contains minified files now

These are now external and will fetch as needed:
-export { dataAddressFormats } from './address-formats.json';
-export { dataDeprecated } from './deprecated.json';
-export { dataDiscarded } from './discarded.json';
-export { dataLanguages } from './languages.json';
-export { dataPhoneFormats } from './phone-formats.json';
-export { dataShortcuts } from './shortcuts.json';
-export { dataTerritoryLanguages } from './territory-languages.json';
2020-01-28 22:21:31 -05:00
Quincy Morgan
89ce98f510 Don't require services/osm in order to get max OSM character lengths 2020-01-28 09:28:23 -05:00
Quincy Morgan
6dc02d7f22 Properly hide the input field on semicombos when there aren't enough characters remaining to add another value (re: #6817) 2020-01-27 16:35:15 -05:00
Quincy Morgan
17ae12b3d7 Address most common places where tag keys or values could exceed the 255 character API limit (close #6817) 2020-01-27 15:57:55 -05:00
Quincy Morgan
361358392f Don't show yes as a suggestion for typeCombo fields 2020-01-15 10:30:38 -05:00
Quincy Morgan
40b6fe7ff9 Fix semicombo drag-and-drop issues with stale data and target positioning (re: #7024) 2020-01-10 13:59:50 -05:00
Quincy Morgan
20fd66630b Update semicombo reordering (re: #7024):
Don't try reordering multiCombo fields
Fix offset behavior for full-width semicombos
Use grab/grabbing cursor style
Keep dragged chip above others
2020-01-09 14:43:18 -05:00
Arjun
ba00334f2b drag and drop of semicombos 2020-01-06 16:00:48 +00:00
Quincy Morgan
0a3b3df80c Filter out values with fewer 10 or fewer uses from combo field suggestions (close #7203) 2020-01-03 11:49:43 -05:00
Bryan Housel
16ff2b1373 Upgrade country-coder to scoped package @ideditor/country-coder 2019-12-02 13:51:04 -05:00
Quincy Morgan
d89996e52c Update country-coder to 2.0.0 (close #7029)
Localize address field in walkthrough without overwriting country coder function
2019-11-07 18:45:46 +01:00
Quincy Morgan
8c0740191f Replace remaining nominatim countryCode calls with country-coder calls (close #6941) 2019-11-01 18:15:35 +01: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
d5abe468b9 Remove rest of the lodash iterators: map, reduce, forEach
(re: #6087)
2019-03-29 15:14:21 -04:00
Quincy Morgan
748c9c9598 Filter out deprecated tag values from combobox suggestions (close #6084) 2019-03-27 17:15:10 -04:00
Bryan Housel
5b4aa529de Replace lodash uniq
(re: 6087)
2019-03-27 02:43:25 -04:00
Bryan Housel
963a4127db Remove lodash remove
(re: #6087)
2019-03-24 01:50:32 -04:00
Bryan Housel
5280d07bad Remove lodash reject (re: #6087) 2019-03-23 12:51:13 -04:00
Bryan Housel
76e0d13729 Remove lodash every and filter
(re: #6087)
2019-03-23 01:22:56 -04:00
Bryan Housel
7e6f68a1b2 Remove lodash some
(re: #6087)
2019-03-23 00:07:52 -04:00
Bryan Housel
ff4f8f005f Remove lodash find and findIndex
(re: #6087)
2019-03-22 17:31:41 -04:00
Bryan Housel
166a50028b Handle commas and semicolons typed into semi/multicombo values
(closes #6013)
2019-03-05 14:51:29 -05:00
Bryan Housel
26368522c9 Batch changes from raw tag editor so blur/remove tag don't conflict
(closes #5878)
2019-02-10 22:08:13 -05:00
Quincy Morgan
46beb31e74 Removed extra padding in comboboxes when the caret is hidden 2019-01-18 11:59:40 -05:00
Quincy Morgan
bf2574f4e3 Hide the dropdown arrow in combo fields if there are no suggestions from tagInfo (closes #5730) 2019-01-18 11:21:31 -05:00
Quincy Morgan
bc81a62a58 Made the value chips in the Destinations semiCombo field full-width to mimic the layout of highway signs (re: #4178)
The input and combobox caret elements in the multicombo field value list are now wrapped in a li element for consistency
2019-01-18 10:41:51 -05:00
Quincy Morgan
77cfde7913 combo, multiCombo, and semiCombo fields now correctly submit the typed value upon pressing enter/return without deselecting the feature (closes #5725) 2019-01-17 15:42:35 -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
Bryan Housel
15a54cab17 Use context.container instead of passing it in 2018-12-10 14:14:27 -05:00
Bryan Housel
e5dedeff8b Move lib/d3.combobox.js -> ui/combobox.js
As with other things from this lib/ folder, little original code remains
and turning these things into reusable d3 plugins is not a priority.
2018-12-10 12:38:21 -05:00
Bryan Housel
958d7fac4f wip changing all fields to use flexbox everywhere 2018-11-28 18:15:38 -05:00
Bryan Housel
71592f3c72 Treat multicombo values other than 'no' and '' as if they are set
And don't set a multicombo value to 'yes' if it already has a non-'no' value
(closes #5291)
2018-09-04 17:31:46 -04:00
Bryan Housel
91872d72f8 Code formatting, replace regex match with test
(minor point, but `test` is much faster when you just want a boolean result)
2018-09-04 16:16:34 -04:00
Bryan Housel
4a71aa6146 Use safer field ids in classes, element ids, css selectors
Fixes issue with nested/namespaced fields, such as `maxspeed/advisory`,
in situations where would try to use a css selector or element id.
Can't use characters like '/' in a css selector.
2018-03-15 00:57:41 -04:00
Bryan Housel
c0040f3cd6 Add caseSensitive option for combofields, use for source=*
(closes #4558)
2017-11-26 19:30:19 -05: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
746b54f3d2 Make combo field work without an entity 2017-08-15 15:34:34 -04: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
c3502a4e16 Only add the ellipses if the placeholder doesn't already end in one
(closes #3920)
2017-03-21 22:11:35 -04:00