-
Notifications
You must be signed in to change notification settings - Fork 111
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
Added Search Suggestions for repo-search #448
Added Search Suggestions for repo-search #448
Conversation
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.
Thank you so much for your contribution! 🚀
There's a couple of things that need your attention. Not every comment needs a change to be made, some might just need some clarification. :)
web-server/src/components/AnimatedInputWrapper/AnimatedInputWrapper.tsx
Outdated
Show resolved
Hide resolved
web-server/src/components/AnimatedInputWrapper/AnimatedInputWrapper.tsx
Outdated
Show resolved
Hide resolved
web-server/src/components/AnimatedInputWrapper/AnimatedInputWrapper.tsx
Outdated
Show resolved
Hide resolved
web-server/src/components/AnimatedInputWrapper/AnimatedInputWrapper.tsx
Outdated
Show resolved
Hide resolved
web-server/src/components/AnimatedInputWrapper/AnimatedInputWrapper.tsx
Outdated
Show resolved
Hide resolved
web-server/src/components/AnimatedInputWrapper/AnimatedInputWrapper.tsx
Outdated
Show resolved
Hide resolved
web-server/src/components/AnimatedInputWrapper/AnimatedInputWrapper.tsx
Outdated
Show resolved
Hide resolved
Hey! Thank you very much for your review! I took the |
@jayantbh Can you please review the updated code once ? |
Hey again @KartikChawla09, sorry about the delay on this. |
@KartikChawla09 this would be the command to run: |
I ran the command and it executed without any errors in both the directories. |
Right, I guess it doesn't cover the CSS file at the moment. |
@@ -161,6 +163,7 @@ const TeamRepos: FC<{ hideCardComponents?: boolean }> = ({ | |||
} = useTeamCRUD(); | |||
|
|||
const searchQuery = useEasyState(''); | |||
const [searchFocus, setSearchFocus] = useState(false); |
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.
const searchFocus = useBoolState(false)
this is our own custom hook that we use in the codebase
now, you can utilize the values as follows:
searchFocus.value // to get the true/false value
searchFocus.true() // to set the value as true
searchFocus.false() // to set the value as false
@@ -190,15 +193,21 @@ const TeamRepos: FC<{ hideCardComponents?: boolean }> = ({ | |||
getOptionLabel={(option) => `${option.parent}/${option.name}`} | |||
renderInput={(params) => ( | |||
<TextField | |||
onFocus={() => setSearchFocus(true)} |
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.
after making the above changes, this simply becomes onFocus={searchFocus.true}
: `Search repositories` | ||
selectedRepos.length ? ( | ||
`${selectedRepos.length} selected` | ||
) : !searchFocus ? ( |
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.
and this becomes !searchFocus.value ? (
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.
Screen.Recording.2024-07-01.at.2.53.16.PM.mov
Repo names are getting cropped-up
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.
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.
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.
Changed this in the latest commit.
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.
looks like you tried to rebase, but incorrectly resolved the conflicts?
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.
Yes, I am trying to resolve them. If it doesn't go as expected I will open a new PR, is that okay?
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.
yeah, works!
aad0c86
to
d7f866b
Compare
Linked Issue(s)
Closes #445 by adding animated search suggestions.
Acceptance Criteria fulfillment
Proposed changes (including videos or screenshots)
Slide.mp4