-
-
Notifications
You must be signed in to change notification settings - Fork 741
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: filter by tags #5163
feat: filter by tags #5163
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nits, otherwise LG.
?.map((t) => t.split(':')) | ||
.filter((t) => t.length === 2); | ||
const features = await this.featureSearchService.search({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?.map((t) => t.split(':')) | |
.filter((t) => t.length === 2); | |
const features = await this.featureSearchService.search({ | |
?.map((tag) => tag.split(':')) | |
.filter((tag) => tag.length === 2); | |
const features = await this.featureSearchService.search({ |
const userId = req.user.id; | ||
const normalizedTag = tag |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this actually tags
since it's an array?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have to decide whether our query params use singular or plural form. Currently I stick to singular because in the url it looks like this: tag[]=simple:tag1&tag[]=simple:tag2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we decide to make plural then I'll adjust all query params in one go. For now I prefer consistency
@@ -542,6 +543,13 @@ class FeatureStrategiesStore implements IFeatureStrategiesStore { | |||
.whereILike('features.name', `%${queryString}%`) | |||
.orWhereIn('features.name', tagQuery); | |||
} | |||
if (tag && tag.length > 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, plural here?
About the changes
Filter by tags
Important files
Discussion points