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

[feat] more detailed search options #501

Closed
cathteng opened this issue Sep 15, 2022 · 3 comments
Closed

[feat] more detailed search options #501

cathteng opened this issue Sep 15, 2022 · 3 comments

Comments

@cathteng
Copy link

Currently, the search bar on Flagr is limited to searching tags and descriptions. It would be nice if you could also search for specific constraints, i.e. searching for a specific constraint property name (property:property-name).

I ran into a case where I was modifying a method used to assign a value to a constraint property, and I had to manually check every single flag to see if that property was being used to make sure I wouldn't break anything. Adding this feature would save a lot of time in the future :)

@ofhope
Copy link

ofhope commented Oct 14, 2022

I'd be interested in working on this.

I assume we'd want to add syntactic sugar to the search in the format of property-name:property-value

@ofhope
Copy link

ofhope commented Oct 16, 2022

I have a working implementation.
https://github.com/openflagr/flagr/compare/main...ofhope:flagr:refactor/client-search?expand=1

This allows me to search on a property of the Flag.
Screen Shot 2022-10-16 at 10 06 25 pm

This can only work on the properties loaded on the client.

If support for more properties is need one solution would be something like Riot (Go search library) and implementing search server side. This would allow searching on all properties across larger datasets. But is a more involved solution.

This fixes a few minor issues around string trimming. Previously spaces after commas were included in the match and failed to match.

Working on some unit tests and documentation now. Setting up Jest for the project and this refactor 😬

Some other considerations.

  • Might want to update UI packages as they're major versions behind and a few audit warnings
  • Setting up @vue/test-utils to test some of the interface could be 👌🏽

@github-actions
Copy link

Stale issue message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants