Add tag types, validation & TagMultiSelect#191
Merged
Conversation
Introduce tag support and a UI picker. - Add a client-side TagMultiSelect React component (options, selected, onChange, max, label) with toggle behavior and disabled state when max is reached. - Add CUISINE_TAGS and DIETARY_TAGS constants and simple tag types in packages/shared. - Add Zod validation schemas (cuisineTagSchema, dietaryTagSchema) that enforce allowed tags. - Export the new types and validation from packages/shared/src/index.ts. - Update .gitignore
zakkiyyat
reviewed
Jun 22, 2026
zakkiyyat
left a comment
Contributor
There was a problem hiding this comment.
please fix this so I can merge
Comment on lines
+28
to
+29
| export type CuisineTag = string; | ||
|
|
Contributor
There was a problem hiding this comment.
CUISINE_TAGS and DIETARY_TAGS are missing as const — TypeScript widens them to string[], so CuisineTag and DietaryTag are declared as plain string instead of the literal union you'd expect.
Comment on lines
+4
to
+9
| export const cuisineTagSchema = z.string().refine( | ||
| (val) => CUISINE_TAGS.includes(val), | ||
| { message: 'Invalid cuisine tag' }, | ||
| ); | ||
|
|
||
| export const dietaryTagSchema = z.string().refine( |
Contributor
There was a problem hiding this comment.
Zod schemas use .refine() instead of z.enum() — means TypeScript infers string not the literal type, and error messages won't list valid options automatically.
Comment on lines
+30
to
+38
| <button | ||
| key={tag} | ||
| type="button" | ||
| onClick={() => toggle(tag)} | ||
| disabled={isDisabled} | ||
| style={{ opacity: isDisabled ? 0.4 : 1, cursor: isDisabled ? 'not-allowed' : 'pointer' }} | ||
| > | ||
| {tag} | ||
| </button> |
Contributor
There was a problem hiding this comment.
TagMultiSelect buttons are missing aria-pressed={isSelected} — screen readers can't tell users which tags are currently active.
Add aria-pressed to TagMultiSelect buttons for better accessibility and other fixes.
zakkiyyat
approved these changes
Jun 22, 2026
zakkiyyat
left a comment
Contributor
There was a problem hiding this comment.
Looks good, thanks for contributing
Closed
12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce tag support and a UI picker.
closes #187