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

Add more fields to search on #82

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Conversation

my8bird
Copy link

@my8bird my8bird commented Aug 5, 2022

Adding tags, status, and deciders and searchable fields. Also, renamed verbatim to body so that in the search bar the user can easy search the body of the ADR.

These searches are now available powered by the luna package.

  • body: Text from the body
  • deciders: Tony
  • tags: database
  • status: draft

@thomvaill
Copy link
Owner

Hi @my8bird, nice work!
Thank you for this PR.
I am currently on vacations with no laptop. I'll have a look when I come back, by the end of August.

@@ -67,25 +67,33 @@ export class Search {
adrs.map((adr) => [
adr.slug,
{
title: adr.title || "Untitled",
verbatim: adr.body.enhancedMdx // TODO: remove tags (https://github.com/thomvaill/log4brains/issues/5)
title: adr.title || "Untitled",
Copy link
Owner

Choose a reason for hiding this comment

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

Typescript type AdrForSearch must be updated too.
You can run yarn typescript to ensure your code is valid.
I found out that the typescript checks were indeed not run by the CI pipeline... This is now fixed. Could you please rebase on master so the checks are executed?

@thomvaill
Copy link
Owner

As I said in comments, there is a typescript error to fix.
Also, I think we should give users a hint on how to use the Lunr syntax.
What about improving the "Type to start searching" message when you click on search bar?

@thomvaill thomvaill added the needs work Some work is required label Sep 23, 2022
@llwt
Copy link
Contributor

llwt commented Jan 18, 2023

Would you be open to someone taking this up and fixing the typings issue? Having tag search would be nice for bigger repos of ADRs.

@my8bird
Copy link
Author

my8bird commented Jan 18, 2023 via email

Note: this skipped the lint-staged step because it airbnb's dependency
has a main field set in the package json and the step wont pass
@my8bird
Copy link
Author

my8bird commented Feb 14, 2023

I updated to master and fixed the typescript errors. however, the lint-staged step would not pass for me due to a miss configured package json in the air bnb eslint dependency so I skipped that locally.

@yuri1969
Copy link

Hi @thomvaill,
running yarn install --frozen-lockfile && yarn build && yarn link-cli && yarn typescript using ac9dfb0 works fine (on my machine).

Is there anything else left to do on this PR?

@my8bird
Copy link
Author

my8bird commented Mar 30, 2023

No every thing was working locally. Might have been a bad version of that airbnb dep which was resolved. If it meets your standards and is a good idea I would love to get it merged in

@ms-ati
Copy link

ms-ati commented Apr 7, 2023

@thomvaill are you able to merge this? Tag search is the motivation for my question! Also thank you so much for an amazing tool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs work Some work is required
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants