-
Notifications
You must be signed in to change notification settings - Fork 0
feat(ux): improve keyboard shortcuts and onboarding flow #124
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -164,11 +164,8 @@ export function AppRoot(): VNode { | |
| applyTheme('light'); | ||
| }); | ||
|
|
||
| sf.getOnboarding().then(progress => { | ||
| if (!progress.dismissedAt && progress.completedSteps.length === 0) { | ||
| setShowOnboarding(true); | ||
| } | ||
| }).catch(() => {}); | ||
| // Onboarding modal is no longer auto-shown on first launch. Users can | ||
| // open it from the Home "Getting started" surface when they choose. | ||
| }, []); | ||
|
|
||
| useEffect(() => { | ||
|
|
@@ -217,7 +214,7 @@ export function AppRoot(): VNode { | |
| () => setRoute('import'), | ||
| ), | ||
| shortcutRegistry.register( | ||
| { id: 'toggle-undo', defaultKeys: 'ctrl+z', description: 'Toggle undo panel', scope: 'global' }, | ||
| { id: 'toggle-undo', defaultKeys: 'ctrl+shift+z', description: 'Toggle undo panel', scope: 'global' }, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When an input or other editable control is focused on macOS, Command+Shift+Z is the native redo command; Useful? React with 👍 / 👎. |
||
| () => setUndoPanelOpen(v => !v), | ||
| ), | ||
| ]; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,9 +31,9 @@ const HELP_CATEGORIES: Array<{ | |
| filter: (s) => s.category === 'getting-started', | ||
| }, | ||
| { | ||
| name: 'Data Push', | ||
| name: 'Import', | ||
| description: 'Upload files, map fields, push records, and review push history.', | ||
| filter: (s) => s.category === 'data-push', | ||
| filter: (s) => s.category === 'import', | ||
|
Comment on lines
+34
to
+36
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
After renaming this display category to Useful? React with 👍 / 👎. |
||
| }, | ||
| { | ||
| name: 'Query & Objects', | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -98,6 +98,22 @@ class ShortcutRegistryImpl { | |
| } | ||
|
|
||
| handleKeydown(e: KeyboardEvent): boolean { | ||
| // Never hijack native undo/redo/editing inside text inputs unless the | ||
| // binding uses a modifier combo that users don't expect to conflict | ||
| // (ctrl+shift, ctrl+alt, etc.). Plain ctrl+z / ctrl+y must pass through. | ||
| const target = e.target as HTMLElement | null; | ||
| if (target) { | ||
| const tag = target.tagName.toLowerCase(); | ||
| const isEditable = | ||
| tag === 'input' || | ||
| tag === 'textarea' || | ||
| tag === 'select' || | ||
| target.isContentEditable; | ||
| if (isEditable && !e.shiftKey && !e.altKey) { | ||
| return false; | ||
| } | ||
|
Comment on lines
+112
to
+114
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Whenever focus is in an input, textarea, select, or contenteditable element, this condition suppresses every shortcut lacking Shift or Alt rather than only native editing chords. For example, the globally scoped Command/Ctrl+K command-palette shortcut now stops working while users are editing a SOQL field or search box; the exemption should be based on known editing bindings such as undo/redo instead. Useful? React with 👍 / 👎. |
||
| } | ||
|
|
||
| const normalized = normalizeKeys(e); | ||
| const id = this.keyIndex.get(normalized); | ||
| if (!id) return false; | ||
|
|
||
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.
On a fresh install,
showOnboardingremains initialized tofalseafter this effect stops loading onboarding progress, and there is nosetShowOnboarding(true)anywhere else inAppRoot;HomeScreenalso has no tutorial control. Consequently the stated opt-in “Getting started” surface does not exist and new users can reach the wizard only by discovering Help's “Restart Tutorial” action.Useful? React with 👍 / 👎.