-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New keyboard shortcuts + tooltips refactoring #519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 21 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
8e60d1b
Tooltip style tweak
4d1d172
Refactoring with new i18n plugin
b6e2f17
Add [F] to focus filter input
224ee41
Fix index going out of bounds
224584d
Tooltip key background has more contrast in Dark mode
e7d16bb
More history keyboard shortcuts
e77abfe
App keyboard shortcuts + improvements
15ba636
Disable keyboard shortcuts if target is textarea
b31a0bb
Improved entry list keyboard navigation + bug fixes
53ce622
Update locale interpolation
e485f0b
Merge branch 'master' into keyboard-shortcuts
a8d1a64
Merge branch 'master' into keyboard-shortcuts
2b9ac21
Change Force refresh to Ctrl+Alt+R to avoid conflict with page refresh
b9176e9
Better keyboard shortcuts
341e7c2
Shortcuts: now uses `key` and modifiers are now exclusive
f5a9fe1
Change Tabs shorctus
95fddbc
Fix Ctrl+Alt+R shortcut on Mac
95d2f5f
Added Backspace to Ctrl+Del for convenience on MacBook
657bbd4
Fix key tooltip on MacOS
c749098
Removed right-margin on keys in tooltips
8bb0d28
Fix icon alignment on MacOS
1c35f69
New GlobalRefs plugin for better code maintainability
a8034c1
More explicit keyboard mixin
db8e451
Fix tests
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import Vue from 'vue' | ||
|
||
export const isChrome = typeof chrome !== 'undefined' && !!chrome.devtools | ||
export const isMac = navigator.platform === 'MacIntel' | ||
export const keys = { | ||
ctrl: isMac ? '⌘' : 'Ctrl', | ||
shift: 'Shift', | ||
alt: isMac ? '⌥' : 'Alt', | ||
del: 'Del', | ||
enter: 'Enter', | ||
esc: 'Esc' | ||
} | ||
|
||
Object.defineProperties(Vue.prototype, { | ||
'$isChrome': { get: () => isChrome }, | ||
'$isMac': { get: () => isMac }, | ||
'$keys': { get: () => keys } | ||
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
export default { | ||
App: { | ||
components: { | ||
tooltip: '[[{{keys.ctrl}}]] + [[1]] Switch to Components' | ||
}, | ||
events: { | ||
tooltip: '[[{{keys.ctrl}}]] + [[3]] Switch to Events' | ||
}, | ||
refresh: { | ||
tooltip: '[[{{keys.ctrl}}]] + [[{{keys.alt}}]] + [[R]] Force Refresh' | ||
}, | ||
vuex: { | ||
tooltip: '[[{{keys.ctrl}}]] + [[2]] Switch to Vuex' | ||
} | ||
}, | ||
StateInspector: { | ||
dataType: { | ||
tooltip: '[[{{keys.ctrl}}]] + <<mouse>>: Collapse All<br>[[{{keys.shift}}]] + <<mouse>>: Expand All' | ||
} | ||
}, | ||
DataField: { | ||
edit: { | ||
cancel: { | ||
tooltip: '[[{{keys.esc}}]] Cancel' | ||
}, | ||
submit: { | ||
tooltip: '[[{{keys.enter}}]] Submit change' | ||
} | ||
}, | ||
quickEdit: { | ||
number: { | ||
tooltip: `Quick Edit<br><br> | ||
[[{{keys.ctrl}}]] + <<mouse>>: {{operator}}5<br> | ||
[[{{keys.shift}}]] + <<mouse>>: {{operator}}10<br> | ||
[[{{keys.alt}}]] + <<mouse>>: {{operator}}100` | ||
} | ||
} | ||
}, | ||
ComponentTree: { | ||
select: { | ||
tooltip: '[[S]] Select component in the page' | ||
}, | ||
filter: { | ||
tooltip: '[[{{keys.ctrl}}]] + [[F]] Filter components by name' | ||
} | ||
}, | ||
EventsHistory: { | ||
filter: { | ||
tooltip: '[[{{keys.ctrl}}]] + [[F]] To filter on components, type <input><<search>> <MyComponent></input> or just <input><<search>> <mycomp</input>.' | ||
}, | ||
clear: { | ||
tooltip: '[[{{keys.ctrl}}]] + [[{{keys.del}}]] Clear Log' | ||
}, | ||
startRecording: { | ||
tooltip: '[[R]] Start recording' | ||
}, | ||
stopRecording: { | ||
tooltip: '[[R]] Stop recording' | ||
} | ||
}, | ||
VuexHistory: { | ||
filter: { | ||
tooltip: '[[{{keys.ctrl}}]] + [[F]] Filter mutations' | ||
}, | ||
commitAll: { | ||
tooltip: '[[{{keys.ctrl}}]] + [[{{keys.enter}}]] Commit all' | ||
}, | ||
revertAll: { | ||
tooltip: '[[{{keys.ctrl}}]] + [[{{keys.del}}]] Revert all' | ||
}, | ||
startRecording: { | ||
tooltip: '[[R]] Start recording' | ||
}, | ||
stopRecording: { | ||
tooltip: '[[R]] Stop recording' | ||
} | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { scrollIntoView } from 'src/util' | ||
|
||
export default { | ||
watch: { | ||
inspectedIndex (value) { | ||
this.$nextTick(() => { | ||
const el = value === -1 ? this.$refs.baseEntry : this.$refs.entries[value] | ||
el && scrollIntoView(document.querySelector('.left .scroll'), el, false) | ||
}) | ||
} | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recommend we use
.js-
prefixed classes for everything that is being handled by JS. It would allow us to more safely deal with the code and potential refactors.