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

Match component browser entries by alias #5678

Merged
merged 33 commits into from
Feb 23, 2023

Conversation

galin-enso
Copy link
Contributor

@galin-enso galin-enso commented Feb 16, 2023

Pull Request Description

Closes #5340

This PR adds matching searched component browser entries by alias. Now the searcher input is also matched to the ALIAS tags of a component, and the best match is used for filtering and sorting the components in the component browser. The alias match scores are reduced by a factor to give them a lower priority when sorting filtered entries in the component browser.

Multiple aliases for a single entry can be obtained from either multiple ALIAS tags in the documentation, or comma-separated aliases inside one ALIAS tag.

When the searcher input matches one of the entry's aliases the entry in the component browser is displayed as alias (label).

unknown_2023.02.22-09.57_1.mp4

Important Notes

Checklist

Please include the following checklist in your PR:

  • The documentation has been updated if necessary.
  • All code conforms to the
    Scala,
    Java,
    and
    Rust
    style guides.
  • All code has been tested:
    • Unit tests have been written where possible.
    • If GUI codebase was changed: Enso GUI was tested when built using BOTH
      ./run ide build and ./run ide watch.

@galin-enso galin-enso marked this pull request as ready for review February 21, 2023 17:00
Copy link
Member

@wdanilo wdanilo left a comment

Choose a reason for hiding this comment

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

Are aliases scored lower than exact matches? If we have alias foo and exact match foo, the exact match should score higher

@galin-enso
Copy link
Contributor Author

Are aliases scored lower than exact matches? If we have alias foo and exact match foo, the exact match should score higher

Good point, at the moment the match scoring is the same. Only if they score exactly the same the exact match will take precedence over the alias.

I'll add a factor to reduce the alias match score by.

app/gui/src/controller/searcher/action.rs Outdated Show resolved Hide resolved
app/gui/src/controller/searcher/component.rs Outdated Show resolved Hide resolved
app/gui/src/controller/searcher/component.rs Outdated Show resolved Hide resolved
@MichaelMauderer
Copy link
Contributor

QA Passed.

@galin-enso galin-enso added the CI: Ready to merge This PR is eligible for automatic merge label Feb 23, 2023
@mergify mergify bot merged commit b8158d0 into develop Feb 23, 2023
@mergify mergify bot deleted the wip/galin-enso/cb-searching-by-alias-5340 branch February 23, 2023 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Component Browser: Searching by Alias
4 participants