[Flow] Upgrade to 70 - #6500
Conversation
| ): string | React$Element<"div"> { | ||
| if (typeof candidateString != "string") { | ||
| return ""; | ||
| } |
There was a problem hiding this comment.
maybe we should only call this if the candidate is a string
| ...result, | ||
| title: this.renderHighlight(result.title, basename(newQuery), "title") | ||
| }; | ||
| } |
There was a problem hiding this comment.
i moved this to its own function to simplify the typing but i think we can move it back...
| selectedFrame: Frame | ||
| ) { | ||
| if (e.nativeEvent.which == 3) { | ||
| if (e.which == 3) { |
There was a problem hiding this comment.
i couldnt find nativeEvent in the types... lets see if this still works
| id: string, | ||
| value: string, | ||
| title: string, | ||
| title: string | React$Element<"div">, |
There was a problem hiding this comment.
when we use fuzzaldrin to fuzzy highlight we return a React Element
| symbols.classes.push({ | ||
| name: path.node.id.name, | ||
| parent: path.node.superClass, | ||
| parent: { name: path.node.superClass }, |
There was a problem hiding this comment.
we had a bug in inComponent that needed this
There was a problem hiding this comment.
Hmm, this seems to break preview however as the snapshots are not generating properly.
| hasJsx: false, | ||
| hasTypes: false | ||
| hasTypes: false, | ||
| loading: false |
There was a problem hiding this comment.
we can no longer check if a property exists w/ flow... with that said, we might want to try another option here
There was a problem hiding this comment.
👍 interesting note, just saw that in 0.68 release notes.
We now check if we're dealing with a string before highlighting so we aren't producing empty innerHTML.
This broke some tests but was cited as being for a bug fix. It'd be preferable if that's done in a PR of its own with the appropriate changes so it doesn't sneak breakage elsewhere.
wldcordeiro
left a comment
There was a problem hiding this comment.
Left some notes and got the test suite passing. This looks ready to go @jasonLaster

Fixes Issue: #5687
Summary of Changes