-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
ref(cmdk) add link detection #112611
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
ref(cmdk) add link detection #112611
Changes from all commits
Commits
Show all changes
55 commits
Select commit
Hold shift + click to select a range
7b1717b
ref(cmdk): implement typed collection factory for JSX-based action re…
JonasBa 39a8156
ref(cmdk): migrate command palette to JSX collection model (steps 2–5)
JonasBa c06aae5
ref(cmdk): pre-review cleanup
JonasBa a009877
remove redundant context
JonasBa b821641
ref(cmdk): remove useGlobalCommandPaletteActions
JonasBa a8b1229
ref(cmdk): delete context.tsx, move CommandPaletteProvider to cmdk.tsx
JonasBa dbca928
ref(cmdk): move GlobalCommandPaletteActions into modal
JonasBa c1b7b0e
ref(cmdk): CommandPalette accepts children for action registration
JonasBa a5330eb
fix(cmdk): pass LocationDescriptor directly instead of stringifying
JonasBa 12c8da6
fix(cmdk): guard nav sidebar toggle against missing SecondaryNavigati…
JonasBa 5585fc2
fix(cmdk): restore GlobalCommandPaletteActions to navigation scope
JonasBa a2107d7
ref(cmdk) add slot context
JonasBa 1583240
ref(cmdk) add issues list actions
JonasBa ddcc461
test(cmdk): Add failing test for slot rendering priority and fix miss…
JonasBa d4e45f2
docs(cmdk): Add implementation plan for slot-priority pre-sort
JonasBa 162d409
feat(cmdk): Sort actions by slot priority using outlet DOM position
JonasBa 406e56e
feat(cmdk): Wire slot priority sorting into collection and palette
JonasBa d97b598
ref(cmdk) wip
JonasBa 562a106
ref(cmdk) cleanup
JonasBa 05468ef
ref(cmdk) implement proper actions
JonasBa eef1471
fix(cmdk): Gate DSN lookup query behind DSN_PATTERN check
JonasBa dce75f9
Merge origin/master into jb/cmdk/jsx-poc
JonasBa 0158ce5
ref(cmdk) revert issues list poc
JonasBa 4406dc2
docs(cmdk): Update story to JSX-powered command palette API
JonasBa 9a0a7c6
ref(cmdk): Merge CMDKGroup and CMDKAction into single CMDKAction comp…
JonasBa 9d70bc8
fix(cmdk): Omit empty groups and reset scroll on query change (#112325)
JonasBa 497dd7e
feat(cmdk): Invoke onAction callback for actions with children
JonasBa e2b0710
fix(cmdk): Use render prop closeModal to properly reset open state
JonasBa dd0b8b9
perf(cmdk): Score each candidate field individually in scoreNode
JonasBa f1a1a06
fix(cmdk): Address bugbot findings — admin actions, DSN icon, String …
JonasBa c56f2d2
fix(cmdk): Remove String() coercion in story component
JonasBa 7508757
fix(slot): Render nothing when no outlet is registered (#112568)
JonasBa 9b83079
Merge branch 'master' into jb/cmdk/jsx-poc
JonasBa f473658
Merge branch 'master' into jb/cmdk/jsx-poc
JonasBa fa3d675
remove unused exports
JonasBa e198a91
ref(cmdk): Remove ActionsToJSX adapter and CommandPaletteAsyncResult …
JonasBa cd2aa33
ref(cmdk) move admin actions
JonasBa 88b2723
fix(cmdk): Keep CMDKAction nodes mounted across modal open/close cycl…
JonasBa 20b13f9
Merge branch 'master' into jb/cmdk/jsx-poc
JonasBa 006c238
fix(slot): Restore null return when no outlet is registered
JonasBa 74181d8
remove duplicate import
JonasBa ba77192
fix(cmdk): Avoid double-calling expandable actions
JonasBa 6c1219d
fix reverse lookup
JonasBa c153ff0
feat(cmdk): Add prompt prop to resource actions for input-driven sub-…
JonasBa d4c46a2
fix(cmdk): Include prompt/resource nodes in browse-mode filter
JonasBa a288588
ref(cmdk) add link detection
JonasBa bfc45aa
feat(cmdk): Support tab-opening modifiers for links
JonasBa 1e9dd17
test(cmdk): Align shift-link coverage with keyboard flow
JonasBa 3ce5542
ref(cmdk) simplify keyboard
JonasBa a9bd667
fix(cmdk): Restore new-tab behavior for admin links
JonasBa 83d6a0c
ref(cmdk): Extract getLocationHref and isExternalLocation to shared l…
JonasBa 41c1b04
fix(cmdk): Call action.onAction() directly for group actions
JonasBa e609d1d
Merge origin/master into jb/cmdk/item-links
JonasBa 12d0610
ref(cmdk) remove shift key reset
JonasBa 9694686
fix(cmdk): Restrict shiftKey modifier to Enter key only
JonasBa 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
Some comments aren't visible on the classic Files Changed page.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| import type {LocationDescriptor} from 'history'; | ||
|
|
||
| import {locationDescriptorToTo} from 'sentry/utils/reactRouter6Compat/location'; | ||
|
|
||
| export function getLocationHref(to: LocationDescriptor): string { | ||
| const resolved = locationDescriptorToTo(to); | ||
|
|
||
| if (typeof resolved === 'string') { | ||
| return resolved; | ||
| } | ||
|
|
||
| return `${resolved.pathname ?? ''}${resolved.search ?? ''}${resolved.hash ?? ''}`; | ||
| } | ||
|
|
||
| export function isExternalLocation(to: LocationDescriptor): boolean { | ||
| const currentUrl = new URL(window.location.href); | ||
| const targetUrl = new URL(getLocationHref(to), currentUrl.href); | ||
| return targetUrl.origin !== currentUrl.origin; | ||
|
JonasBa marked this conversation as resolved.
|
||
| } | ||
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
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.
Uh oh!
There was an error while loading. Please reload this page.