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

Search bar for forc-doc #5269

Merged
merged 18 commits into from
Nov 15, 2023
Merged

Search bar for forc-doc #5269

merged 18 commits into from
Nov 15, 2023

Conversation

sdankel
Copy link
Member

@sdankel sdankel commented Nov 11, 2023

Description

Closes #3480

A simple search bar for forc-doc. It uses a case-insensitive search of item names, across the library and all of its dependencies. Names in the search results are highlighted similar to docs.rs.

Nov-14-2023 22-21-07

Checklist

  • I have linked to any relevant issues.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation where relevant (API docs, the reference, and the Sway book).
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added (or requested a maintainer to add) the necessary Breaking* or New Feature labels where relevant.
  • I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
  • I have requested a review from the relevant team or maintainers.

@sdankel sdankel changed the title Sophie/doc search Search bar for forc-doc Nov 12, 2023
@JoshuaBatty JoshuaBatty added the forc-doc Everything related to the `forc doc` command plugin. label Nov 12, 2023
@JoshuaBatty
Copy link
Member

Nice this is a great start! Great to finally see a search bar in forc-doc!
Pulled down and tested locally. Just wondering if we can mimic docs.rs behaviour in 2 other places.

docs.rs highlights the final type according to it's semantic representation. Is this possible with the current set up of forc-doc or do we need to share some logic from LSP to enable this?
Screenshot 2023-11-13 at 9 21 41 am

Finally, can we have the search results update on each keystroke rather than on-enter?

@sdankel sdankel marked this pull request as ready for review November 14, 2023 23:47
@JoshuaBatty JoshuaBatty requested a review from a team November 15, 2023 03:06
Copy link
Member

@JoshuaBatty JoshuaBatty left a comment

Choose a reason for hiding this comment

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

Very cool :) Thanks!

@JoshuaBatty JoshuaBatty requested a review from a team November 15, 2023 03:06
@sdankel sdankel enabled auto-merge (squash) November 15, 2023 06:48
Copy link
Member

@kayagokalp kayagokalp left a comment

Choose a reason for hiding this comment

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

lgtm

@sdankel sdankel merged commit d07a84b into master Nov 15, 2023
32 checks passed
@sdankel sdankel deleted the sophie/doc-search branch November 15, 2023 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
forc-doc Everything related to the `forc doc` command plugin.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add functionality to forc doc searchbar
4 participants