[WIP] toggle project text search#3266
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3266 +/- ##
==========================================
- Coverage 49.4% 49.17% -0.24%
==========================================
Files 99 99
Lines 4151 4140 -11
Branches 855 854 -1
==========================================
- Hits 2051 2036 -15
- Misses 2100 2104 +4
Continue to review full report at Codecov.
|
be64944 to
34cb6ba
Compare
jasonLaster
left a comment
There was a problem hiding this comment.
some thoughts
| highlightLineRange: ({ start: number, end: number }) => void, | ||
| clearHighlightLineRange: () => void, | ||
| searchOn?: boolean, | ||
| toggleActiveSearch: (?ActiveSearchType) => any, |
There was a problem hiding this comment.
switching from the verb toggle to set because we have more than two now: Project, source, file, symbol
| import { connect } from "react-redux"; | ||
| import { bindActionCreators } from "redux"; | ||
| import actions from "../../actions"; | ||
| import { getSources, getActiveSearchState } from "../../selectors"; |
There was a problem hiding this comment.
moving source search into its own component will untangle a lot of this code
| id: `${result.text}/${result.line}/${result.column}` | ||
| })) | ||
| ); | ||
| } |
There was a problem hiding this comment.
so... this wasn't used :)
34cb6ba to
2f6be88
Compare
| import { endTruncateStr } from "../../utils/utils"; | ||
| import { parse as parseURL } from "url"; | ||
| import { isPretty } from "../../utils/source"; | ||
| import { isEnabled } from "devtools-config"; |
There was a problem hiding this comment.
ProjectSearch now is a coordinator, it just decides which search UI to show and will eventually have buttons to switch between them
codehag
left a comment
There was a problem hiding this comment.
Looks really good so far, let me know if you want me to look at it again
2f6be88 to
3a9321c
Compare
Associated Issue: #3091
Summary of Changes
Right now we map cmd+p to project text search if it is enabled. We should be able to have cmd+p map to source search and cmd+shift+f map to project text search.
This does that. It doesn't add the bottom bar for toggling, but it helps.