Skip to content
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

New fuzzy matching #7381

Merged
merged 18 commits into from
Jul 28, 2023
Merged

New fuzzy matching #7381

merged 18 commits into from
Jul 28, 2023

Conversation

kazcw
Copy link
Contributor

@kazcw kazcw commented Jul 24, 2023

Pull Request Description

Implements #7046.

Important Notes

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • All code has been tested:
    • Unit tests have been written where possible.
    • If GUI codebase was changed, the GUI was tested when built using ./run ide build.

@kazcw kazcw added the CI: No changelog needed Do not require a changelog entry for this PR. label Jul 24, 2023
@kazcw kazcw self-assigned this Jul 24, 2023
@kazcw kazcw marked this pull request as ready for review July 24, 2023 19:50
Copy link
Contributor

@somebody1234 somebody1234 left a comment

Choose a reason for hiding this comment

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

on the js side it's just the package-lock.json change again

Copy link
Contributor

@farmaazon farmaazon left a comment

Choose a reason for hiding this comment

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

The code is good to land except I miss some documentation here and there, and I'm worrying the potentially exponential cost of the matching algorithm. I can propose an alternative one to discuss in a separate issue.

lib/rust/fuzzly/src/bitstring.rs Outdated Show resolved Hide resolved
lib/rust/fuzzly/src/bitstring.rs Show resolved Hide resolved
lib/rust/fuzzly/src/bitstring.rs Outdated Show resolved Hide resolved
lib/rust/fuzzly/src/bitstring.rs Outdated Show resolved Hide resolved
lib/rust/fuzzly/src/bitstring.rs Show resolved Hide resolved
lib/rust/fuzzly/src/lib.rs Outdated Show resolved Hide resolved
Comment on lines 219 to 220
let mut states = cast_lifetime(core::mem::take(&mut self.states_buffer));
let mut next_states = cast_lifetime(core::mem::take(&mut self.states_buffer));
Copy link
Contributor

Choose a reason for hiding this comment

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

If we take the value second time, it will always be just default. It seems that you meant &mut self.next_states_buffer.

I wanted to ask for test checking this, but I realize it's actually impossible :) as you cannot test how many vector allocations are there.

Or can we?

Copy link
Contributor Author

@kazcw kazcw Jul 26, 2023

Choose a reason for hiding this comment

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

I don't see any good way to test such a thing in unit tests, but it would have come up in profiling (eventually).

lib/rust/fuzzly/src/lib.rs Outdated Show resolved Hide resolved
lib/rust/fuzzly/src/lib.rs Outdated Show resolved Hide resolved
lib/rust/fuzzly/src/lib.rs Outdated Show resolved Hide resolved
@farmaazon
Copy link
Contributor

And the last thing

  1. The area for adding elements in list editor is still hardly discoverable. It was reported, and it was planned to fix in the new design. I assume this is planned for another task?

@kazcw
Copy link
Contributor Author

kazcw commented Jul 26, 2023

And the last thing

5. The area for adding elements in list editor is still hardly discoverable. It was reported, and it was planned to fix in the new design. I assume this is planned for another task?

@farmaazon Was this intended to be posted somewhere else?

@kazcw kazcw linked an issue Jul 26, 2023 that may be closed by this pull request
@farmaazon
Copy link
Contributor

@farmaazon Was this intended to be posted somewhere else?

@kazcw Yes, I was intended for #7311, sorry for confusion.

@MichaelMauderer
Copy link
Contributor

QA: 🔴

Sorting looks good, but it appears that the text highlight in the searcher is broken:

Screenshot_20230727_153008

Instead of Table it should highlight order. It seems that only ever the characters at the beginning of the entries are highlighted.

@kazcw
Copy link
Contributor Author

kazcw commented Jul 27, 2023

QA: 🔴

Sorting looks good, but it appears that the text highlight in the searcher is broken:

Screenshot_20230727_153008

Instead of Table it should highlight order. It seems that only ever the characters at the beginning of the entries are highlighted.

Ah, that broke in merge. The new label format will need some additional logic to locate the matched string in the displayed string...

@kazcw
Copy link
Contributor Author

kazcw commented Jul 28, 2023

Highlighting is fixed for the new label format, so given that sorting looks good I think we're ready for merge.

@kazcw kazcw added the CI: Ready to merge This PR is eligible for automatic merge label Jul 28, 2023
@mergify mergify bot merged commit 4fc6587 into develop Jul 28, 2023
@mergify mergify bot deleted the wip/kw/new-fuzz branch July 28, 2023 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: No changelog needed Do not require a changelog entry for this PR. CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Simpler fuzzy matching
4 participants