Commit Graph

1312 Commits

Author SHA1 Message Date
Bryan Housel 81127d71f3 Cache disabled() results in straighten action for consistent response
What could happen was:
- user could right click on a line
- this would trigger `disabled()` checks for each operation buttons
- the line was not fully downloaded, so would return `disabled()` 'not_downloaded'
  (and also start download of the missing tiles)
- then the tooltip would pop into existence, calling `tooltip()`
- which calls `disabled()` again
- but this time it's fine and the `disabled()` is false
- so you'd see a greyed out button but the tooltip said everyting is ok and
  you can click the button anyway

I fixed this by just caching the disabled test.  This is probably ok anyway
because these tests can be expensive, and then the user will see a consistent
message like "The line is not yet fully downloaded".

If the user clicks off the line and back onto it, iD will reenter select mode,
rebuild the menu, redo the disabled test, and they will see the button enabled.
2019-04-10 10:19:23 -04:00
Bryan Housel 8d66289cba Run validation when switching fields, or when applying an issue fix 2019-04-07 23:10:20 -04:00
Bryan Housel e377270372 WIP: introduce validatedGraph, try on mode change not history change 2019-04-06 13:39:19 -04:00
Bryan Housel 1bcc0f613c WIP: fix caches, replace id() function with plain id property 2019-04-05 17:41:04 -04:00
Bryan Housel 78acd999c8 WIP: switch from validating everything to validating differences 2019-04-05 13:29:57 -04:00
Bryan Housel 8b1c0551cc WIP: understand state held by the validator, avoid translations
- Make sure all state variables prefixed with `_`
- Add explicit `init`/`reset` methods
  (graph/entity refs should never persist through a save to OSM)
- Thinking of how best cache validation results
2019-04-05 09:28:36 -04:00
Bryan Housel 68ed6da159 Merge branch 'master' into validation_and_change_perf 2019-04-04 09:30:30 -04:00
Bryan Housel 87e3b928d0 Reduce drawing during history changes
(closes #6086)
2019-04-03 23:26:26 -04:00
Quincy Morgan d65298f383 Fix issue where generic vertex icon wouldn't show (close #6138) 2019-04-03 09:29:14 -07:00
Quincy Morgan cf6e6c7970 Always display the wikidata label and description in the user's language, if available 2019-04-01 13:04:33 -04:00
Quincy Morgan 2e7a47d0f2 Update the wikipedia tag when setting the wikidata tag via the field (close #5543) 2019-03-31 15:49:35 -04:00
Bryan Housel cda8f657ac Swap fast-deep-equal for lodash isEqual
(re: #6087)
2019-03-29 22:17:29 -04: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
Bryan Housel d5abe468b9 Remove rest of the lodash iterators: map, reduce, forEach
(re: #6087)
2019-03-29 15:14:21 -04:00
Quincy Morgan 5a0f8b3453 Autocomplete labels in the Wikidata field (close #5544) 2019-03-28 19:34:47 -04:00
Quincy Morgan 3d4c5c6087 Display logos for name-suggestion-index brands in the sidebar (close #5167) 2019-03-28 14:20:46 -04:00
Quincy Morgan b12e7277df Add countryCodes property to preset schema
Copy countryCodes from name suggestion index
Use countryCodes to filter the preset search results (close #6124)
2019-03-28 11:44:05 -04:00
Quincy Morgan f4367f96c0 Add ignored warning counts to the changeset tags (close #6123) 2019-03-28 09:46:59 -04:00
Bryan Housel 3896b2282f Remove lodash isNaN, isNumber, isString, bind, uniqBy
(re: 6087)
2019-03-27 23:11:45 -04:00
Quincy Morgan 53625a9364 Fix issues with the walkthrough 2019-03-27 17:41:15 -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 3d80e6505f Remove lodash chunk, groupBy
(re: #6087)
2019-03-27 16:18:41 -04:00
Quincy Morgan 56cf7542be Fix error when trying to add a feature to a relation (close #6095) 2019-03-27 15:03:33 -04:00
Bryan Housel 0edd10001e Removing more lodash: isEmpty, isNumber, some map/reduce/forEach
(re: #6087)
2019-03-27 13:32:35 -04:00
Quincy Morgan 4afd29a50a Hide ribbon and favoriting UI for now 2019-03-27 13:12:28 -04:00
Bryan Housel 710966801f Make sure community index filters on value array, not object
(closes #6092)

This is breakage related to #6087 in replacing lodash `_.filter`
(which can iterate (v,k) over an object) with `Array.filter`
2019-03-27 09:34:38 -04:00
Bryan Housel 31ae7fc800 Make sure hashtag checkers work with arrays and not nulls
(closes #6116)

This is breakage related to #6087 in replacing _.uniqBy with a Set
The lodash functions are much more tolerant of nulls and dodgy inputs.
2019-03-27 09:20:19 -04:00
Bryan Housel 5b4aa529de Replace lodash uniq
(re: 6087)
2019-03-27 02:43:25 -04:00
Bryan Housel 5e1ff74199 Replace lodash difference, intersects, union
(re: 6087)
2019-03-27 01:22:11 -04:00
Quincy Morgan bab9e6b2b4 Add uninstall functions to several toolbar items
Tweak toolbar item spacing
2019-03-26 16:36:30 -04:00
Quincy Morgan 67fc051632 Tweak newFeature in select mode 2019-03-26 16:34:23 -04:00
Quincy Morgan e916d18473 Merge branch 'master' of https://github.com/openstreetmap/iD 2019-03-26 12:25:10 -04:00
Quincy Morgan db061d0dff Make the RTL shortcuts for recent and favorite presets the same as LTR (close #6107) 2019-03-26 12:24:39 -04:00
Bryan Housel 33a40f59eb Remove lodash includes and reduce from address.js
(re #6087)
2019-03-26 12:20:58 -04:00
Bryan Housel eb0d0a35d1 Remove lodash pull
(re: #6087)
2019-03-25 22:03:39 -04:00
Bryan Housel 1ce4f0ad6a Remove lodash without
(re: #6087)
2019-03-25 21:56:54 -04:00
Quincy Morgan 2895ff9405 Break modes toolbar item into add favorites and add recent items 2019-03-25 17:00:33 -04:00
Quincy Morgan f8b8739855 Add optional uninstall function to tools 2019-03-25 13:48:59 -04:00
Quincy Morgan 776bf103d8 Reorganize toolbar code 2019-03-25 12:25:04 -04:00
Quincy Morgan c5e66816d3 Add labels to toolbar items (close #6098) 2019-03-25 11:45:51 -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 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
Bryan Housel ff4f8f005f Remove lodash find and findIndex
(re: #6087)
2019-03-22 17:31:41 -04:00
Bryan Housel 11bfeaabfc Add browser-polyfills, remove lodash assign, compact, values
(re: #6087)
2019-03-22 17:14:41 -04:00
Quincy Morgan e59bb75bcc Make top toolbar item spacing more consistent
Prepare top toolbar to be more dynamic
2019-03-22 13:42:47 -04:00
Bryan Housel 00a008a31d Changed "Reset All" button to a link 2019-03-22 11:23:52 -04:00