-
Notifications
You must be signed in to change notification settings - Fork 289
feat(ENG-392): Add Gear UI components #5367
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
base: main
Are you sure you want to change the base?
Conversation
Uses existing useEventListener hook to handle keyboard events. Only triggers when lightbox is open (selectedPhoto is set).
- Add GraphQL types and functions for gear (gear.ts) - DatasetGear, Gear, AddGearInput, ReorderGearInput types - getGear, searchGear queries - addGear, deleteGear, reorderGear mutations - GearFragment for shared fields - Add useGear hook with react-query integration - Fetches user gear items - Provides add, remove, reorder mutations - Returns isOwner flag for authorization - Add useGearSearch hook for autocomplete functionality - Add Gear UI components - GearItem: Display single gear with delete on hover - SortableGearItem: Wrapper for drag-and-drop support - GearModal: Add new gear with autocomplete - ProfileUserGear: Main component with empty state and DnD reordering - Add RequestKey.Gear and RequestKey.GearSearch to query.ts
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Chris seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
| export { GearItem, SortableGearItem } from './GearItem'; | ||
| export { GearModal } from './GearModal'; | ||
| export { ProfileUserGear } from './ProfileUserGear'; |
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.
barrel?
| import { searchGear } from '../../../graphql/user/gear'; | ||
| import { generateQueryKey, RequestKey, StaleTime } from '../../../lib/query'; | ||
|
|
||
| export function useGearSearch(query: string) { |
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.
it's mixing functions and arrow functions 🙈
Summary
Implements ENG-392 - UI components for the Gear feature in Profile Customization.
Changes
New Files
packages/shared/src/graphql/user/gear.ts- GraphQL types, queries, mutationspackages/shared/src/features/profile/hooks/useGear.ts- React-query hookpackages/shared/src/features/profile/hooks/useGearSearch.ts- Autocomplete hookpackages/shared/src/features/profile/components/gear/GearItem.tsx- Item display with sortable wrapperpackages/shared/src/features/profile/components/gear/GearModal.tsx- Add modal with autocompletepackages/shared/src/features/profile/components/gear/ProfileUserGear.tsx- Main profile sectionpackages/shared/src/features/profile/components/gear/index.ts- Barrel exportsModified Files
packages/shared/src/lib/query.ts- Added RequestKey.Gear and RequestKey.GearSearchFeatures
Testing
<ProfileUserGear user={user} />componentDepends on: dailydotdev/daily-api#3492
Closes ENG-392
Preview domain
https://eng-392-gear-ui.preview.app.daily.dev