This repository has been archived by the owner on Jan 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 758
[preview] jump to definition should respect the current context #6811
Merged
Conversation
This file contains 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
jasonLaster
force-pushed
the
function-link2
branch
3 times, most recently
from
August 13, 2018 16:40
9ea910a
to
fc38bf3
Compare
jasonLaster
force-pushed
the
function-link2
branch
2 times, most recently
from
August 13, 2018 20:51
47b9ede
to
5465a9a
Compare
jasonLaster
commented
Aug 13, 2018
src/actions/sources/select.js
Outdated
const bOriginal = isOriginalId(bId); | ||
|
||
return (aOriginal && !bOriginal) || (!aOriginal && bOriginal); | ||
} |
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.
so this is pretty embarrassing... I think I can re-write this as
isOriginalId(selectedSource.id) != isOriginalId(location.sourceId)
jasonLaster
commented
Aug 13, 2018
@@ -367,7 +367,7 @@ describe("QuickOpenModal", () => { | |||
}; | |||
wrapper.find("SearchInput").simulate("keydown", event); | |||
expect(props.setQuickOpenQuery).not.toHaveBeenCalled(); | |||
expect(props.selectLocation).not.toHaveBeenCalled(); | |||
expect(props.selectSpecificLocation).not.toHaveBeenCalled(); |
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.
all this selectSpecificLocation
is here so that in some places we can say, YES, we really do want to go somewhere
jasonLaster
commented
Aug 13, 2018
clearASTs(); | ||
clearSymbols(); | ||
await clearSymbols(); |
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.
not sure if i need this...
jasonLaster
force-pushed
the
function-link2
branch
4 times, most recently
from
August 14, 2018 15:20
1426e97
to
dfbcf02
Compare
jasonLaster
force-pushed
the
function-link2
branch
from
August 14, 2018 15:20
dfbcf02
to
e69ef6d
Compare
darkwing
approved these changes
Aug 14, 2018
jasonLaster
added a commit
that referenced
this pull request
Aug 15, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes Issue: #6028
Summary of Changes
Improves selectSourceURL so that it knows to respect the current context (original/generated) when selecting a new location.
Test Plan
add Jest tests
GIF