-
Notifications
You must be signed in to change notification settings - Fork 192
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
fix: remove search criteria selector and auto expand results #571
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.
can you remove the (ApiExplorer)
scope from the PR title? That should cause the pre-populated squash merge commit title to also not have it but worth checking there too when you go to do it.
I'm about to post about it in the sdk dev channel.
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 pretty simple
Something else we'll have to add tests for when/before we have codecov 😉 |
f735797
to
8639366
Compare
@jkaster Unacceptable. I added search tests :) |
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.
Not sure. See comments. Can discuss if you want or approve if you think its okay.
const input = screen.getByLabelText('Search') | ||
jest.spyOn(api, 'search') | ||
await act(async () => { | ||
/** Pasting to avoid triggering search multiple times */ |
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.
I don't understand the comment. Perhaps a little more clarity on why. Possibly because entering characters being entered one by results in search being triggered for each character?
Something like
Using ... triggers search multiple times. Use of paste avoids this
@@ -70,6 +68,13 @@ const SideNavMethodsLayout: FC<MethodsProps> = ({ | |||
if (_isOpen) history.push(`/${specKey}/methods/${tag}`) | |||
} | |||
|
|||
useEffect(() => { | |||
const status = match |
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.
setIsOpen defaults to defaultOpen but you are modifying the value if the value of defaultOpen changes. Is defaultOpen a good name?
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 can find a better name for another PR
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.
LGTM. Minor internal tweaks can be done later.
No description provided.