Skip to content

Enable fuzzy search in the repository, branch, PR, and clone FilterLists - #3873

Merged
iAmWillShepherd merged 13 commits into
desktop:masterfrom
j-f1:i-can't-see-clearly-now
Feb 12, 2018
Merged

iAmWillShepherd merged 13 commits into
desktop:masterfrom
j-f1:i-can't-see-clearly-now

Conversation

@j-f1

@j-f1 j-f1 commented Jan 28, 2018

Copy link
Copy Markdown
Contributor

Fixes #911.

fuzzaldrin demo

@j-f1

j-f1 commented Jan 28, 2018

Copy link
Copy Markdown
Contributor Author

💤

@shiftkey shiftkey added the ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Jan 28, 2018
@iAmWillShepherd iAmWillShepherd self-assigned this Jan 31, 2018
Comment thread app/src/lib/fuzzy-find.ts Outdated
export function score(
str: string,
query: string,
maxScore: number = fuzzAldrin.score(query, query, undefined, options)

This comment was marked as spam.

Comment thread app/src/lib/fuzzy-find.ts
matches: ReadonlyArray<number>
}

export function match<T, _K extends keyof T>(

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

Comment thread app/src/lib/fuzzy-find.ts Outdated
return items
.map((item): IMatch<T> => {
let key: string
if (typeof getKey === 'function') {

This comment was marked as spam.

Comment thread app/src/lib/fuzzy-find.ts Outdated
): ReadonlyArray<IMatch<T>> {
// matching `query` against itself is a perfect match.
const maxScore = score(query, query, 1)
return items

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@iAmWillShepherd

Copy link
Copy Markdown
Contributor

Almost there, just got some prettier issues to deal with! 😈

Comment thread app/src/lib/fuzzy-find.ts Outdated

import { compareDescending } from './compare'

export const options: fuzzAldrin.IFilterOptions = {

This comment was marked as spam.

Comment thread app/src/lib/fuzzy-find.ts Outdated
pathSeparator: '-',
}

export function score(str: string, query: string, maxScore: number) {

This comment was marked as spam.

@j-f1

j-f1 commented Feb 6, 2018

Copy link
Copy Markdown
Contributor Author

🐐

iAmWillShepherd
iAmWillShepherd previously approved these changes Feb 6, 2018
@j-f1

j-f1 commented Feb 7, 2018

Copy link
Copy Markdown
Contributor Author

✅/❌ @shiftkey?

@shiftkey shiftkey self-assigned this Feb 7, 2018

@shiftkey shiftkey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one thing

Comment thread app/src/ui/lib/highlight-text.tsx Outdated
@@ -0,0 +1,43 @@
import * as React from 'react'

// broken for SFCs

This comment was marked as spam.

This comment was marked as spam.

@j-f1

j-f1 commented Feb 8, 2018

Copy link
Copy Markdown
Contributor Author

🚂

@iAmWillShepherd
iAmWillShepherd merged commit 23ddc3a into desktop:master Feb 12, 2018
@j-f1
j-f1 deleted the i-can't-see-clearly-now branch February 12, 2018 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-review Pull Requests that are ready to be reviewed by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants