54 Commits

Author SHA1 Message Date
Martin Raifer
cc6f16d480 Merge branch 'develop' into accessible_ui 2021-12-07 16:22:01 +01:00
Milos Brzakovic (E-Search)
8eba5db4e3 polish h2 .css, center header in shortcuts 2021-12-02 14:10:08 +01:00
Milos Brzakovic (E-Search)
30ef0b80e1 headings - more appropriate h2's and disclosure h3 2021-12-01 18:17:19 +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
040257fd44 replace unnecessary setting of raw "html" with "text" 2021-11-18 18:53:33 +01:00
Quincy Morgan
e017073142 Fix issue where the keyboard shortcuts screen would only display the first tab (close #8137) 2020-10-30 09:48:48 -04:00
teymour-aldridge
444c2c2c15 Apply further suggestions from code review. 2020-10-16 17:26:10 +01:00
teymour-aldridge
f11eee313e Remove some more unused variable assignments 2020-10-14 19:04:54 +01:00
Quincy Morgan
21a49bbec8 Initial support for D3 v6.2.0 2020-10-06 15:08:39 -04:00
Quincy Morgan
0c38363406 Don't instantiate uiShortcuts or its keybinding multiple times 2020-10-05 10:57:18 -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
983c01d407 Make the keyboard shortcuts modal keyboard-navigable (re: #8004)
Prevent default hash behavior when clicking help pane internal links
2020-09-22 10:37:54 -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
27faeae96a Add touch info to keyboard shortcuts screen 2020-07-13 12:21:08 -04:00
Quincy Morgan
3229390178 Clean up the mouse icons' size and clarity 2020-07-11 19:00:17 -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
eed7944a1a Replace various uses of d3_select and d3_selectAll with selection on the container 2020-03-22 12:34:06 -07: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
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
5b4aa529de Replace lodash uniq
(re: 6087)
2019-03-27 02:43:25 -04:00
Quincy Morgan
34f12789bb Update shortcut help for new shortcuts 2019-03-06 13:56:48 -05:00
Bryan Housel
4ed2858cc5 Explicitly include '?' as a fallback key for keyboard shortcuts
(closes #5675)

This allows for a localized version of the key,
but iD will still respond to the '?'
2019-01-07 11:39:12 -05:00
Bryan Housel
826f66a91b Unique values for key codes moved to utilKeybinding, uiShortcuts
This lets us supply lists of keys which might contain duplicates, but will be
made unique.  For example: [t('sidebar.key'), '`', '²']
'sidebar.key' may be one of the other choices, but will be deduplicated.
2019-01-07 11:12:24 -05:00
Bryan Housel
55d2dddb70 Keybind all of _uniq([t(sidebar.key), '`', '²']) to toggle sidebar
(closes #5663)
2019-01-06 00:33:35 -05:00
Bryan Housel
152022aec4 Use context.keybinding for keybindings that don't change
(closes #5487)
2018-11-13 20:57:21 -05:00
Bryan Housel
bb30cbf555 Move lib/d3.keybinding.js -> util/keybinding.js
almost none of the original d3 "plugin" code remains
2018-11-13 13:42:09 -05:00
Bryan Housel
470835b38f Extract all graphics from iD sprite, reassemble with svg-sprite
All iD sprite graphics are now prefixed with `iD-`
Also includes support for sending the preset logos to taginfo
2018-06-08 16:06:46 -04:00
Bryan Housel
3d13620705 Convert lodah-es and d3 to named imports for ui 2017-09-26 11:22:43 -04:00
Bryan Housel
76f9397bb5 Add Tools tab to keyboard shortcuts, add panels key shortcuts 2017-07-05 18:12:51 -04:00
Bryan Housel
22cb4c7f20 Add ability to localize more keyboard shortcuts
(closes #4081)

H: Help
?: Keyboard Shortcuts
⌘I: Infobox
B: Background
⌘B: Switch Background
F: Map Data
W: Wireframe
/: Minimap
2017-06-18 00:17:44 -04:00
Bryan Housel
7030c15d0c Try again to fix fullscreen keyboard shortcut on linux 2017-06-10 17:44:17 -04:00
Bryan Housel
ba8b0782b0 pacify eslint 2017-06-10 08:13:55 -04:00
Bryan Housel
addc3be4da Only offer the ⌃⌘F shortcut for fullscreen if the user is on a mac 2017-06-10 08:09:49 -04:00
Bryan Housel
8c2775276e Fix fullscreen shortcut on Mac, add F11 to the shortcuts screen
(see https://github.com/openstreetmap/iD/issues/4081#issuecomment-307475720)
2017-06-09 22:37:44 -04:00
Bryan Housel
634002b693 Remove shifts from the keybinds that don't need them 2017-06-05 21:11:18 -04:00
Bryan Housel
eb80a333cf Don't rely on modalSelection to indicate modal is visible
The modal can be dismissed other ways (Esc, click 'X', etc)
2017-06-04 22:49:46 -04:00
Bryan Housel
0bf8411edd Fix display of windows redo shortcut 2017-06-04 08:26:52 -04:00
Bryan Housel
9017c202eb Add mouse icons instead of "left-click", add better key separators 2017-06-03 02:10:47 -04:00
Bryan Housel
2cace9931c Split up modifiers from keys, better shortcut handling on Windows 2017-06-02 18:53:45 -04:00
Bryan Housel
8a3970613a Finalize keyboard shortcut style, add a few more commands 2017-05-31 23:20:48 -04:00
Bryan Housel
0149c12509 Couldn't get quite the layout I wanted with flexbox, so using tables
(fwiw, GitHub's shortcut screen is this way too)
2017-05-31 17:09:27 -04:00
Bryan Housel
9628670b98 Use translated keyboard shortcuts for operations, add '?' 2017-05-18 13:36:19 -04:00
Bryan Housel
0013866fe3 Put shortcuts into groups, add more shortcuts for operations 2017-05-17 15:16:23 -04:00
Bryan Housel
0e3b372abd format 2017-05-16 15:33:41 -04:00
Kushan Joshi
d45063dd69 Make rtl compatible
and minor refactor
2017-05-16 15:33:41 -04:00
Kushan Joshi
957c75a7cc remove uiCmd 2017-05-16 15:33:14 -04:00
Kushan Joshi
47164d8f15 ui minor fixes for shortcut.js 2017-05-16 15:33:14 -04:00
Kushan Joshi
b237b6c96c interim 2017-05-16 15:33:14 -04:00