-
Notifications
You must be signed in to change notification settings - Fork 503
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
add uiFind icons, scroll to first match #367
Changes from 1 commit
a0e296a
ebf9473
37f9a20
bb66f09
79f04af
79eb6df
8a268c2
5a146ef
43a8ca5
5801d3e
73e8691
7651dbc
9b9f5c0
cdbdd9d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
Signed-off-by: Everett Ross <reverett@uber.com>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
import * as React from 'react'; | ||
import { Button, Input } from 'antd'; | ||
import cx from 'classnames'; | ||
import IoAndroidLocate from 'react-icons/lib/io/android-locate'; | ||
|
||
import * as markers from './TracePageSearchBar.markers'; | ||
import { trackFilter } from '../index.track'; | ||
|
@@ -47,7 +48,6 @@ export function TracePageSearchBarFn(props: TracePageSearchBarProps & { forwarde | |
|
||
const count = textFilter ? <span className="TracePageSearchBar--count">{resultCount}</span> : null; | ||
|
||
const navigationBtnClass = cx('TracePageSearchBar--btn', { 'is-disabled': !textFilter }); | ||
const btnClass = cx('TracePageSearchBar--btn', { 'is-disabled': !textFilter }); | ||
const uiFindInputInputProps = { | ||
'data-test': markers.IN_TRACE_SEARCH, | ||
|
@@ -57,9 +57,9 @@ export function TracePageSearchBarFn(props: TracePageSearchBarProps & { forwarde | |
}; | ||
|
||
return ( | ||
<div className="ub-flex-auto ub-mx2 TracePageSearchBar"> | ||
<div className="TracePageSearchBar"> | ||
{/* style inline because compact overwrites the display */} | ||
<Input.Group compact style={{ display: 'flex' }}> | ||
<Input.Group className="TracePageSearchBar--InputGroup" compact style={{ display: 'flex' }}> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please avoid using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that's pre-existing. I can take a stab at fixing it though. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The comment above the inline |
||
<UiFindInput | ||
inputProps={uiFindInputInputProps} | ||
forwardedRef={forwardedRef} | ||
|
@@ -68,26 +68,27 @@ export function TracePageSearchBarFn(props: TracePageSearchBarProps & { forwarde | |
{navigable && ( | ||
<> | ||
<Button | ||
className={navigationBtnClass} | ||
className={cx(btnClass, 'ant-btn-icon-only')} | ||
disabled={!textFilter} | ||
htmlType="button" | ||
onClick={focusUiFindMatches} | ||
> | ||
<IoAndroidLocate /> | ||
tiffon marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</Button> | ||
<Button | ||
className={btnClass} | ||
disabled={!textFilter} | ||
htmlType="button" | ||
icon="up" | ||
onClick={prevResult} | ||
/> | ||
<Button | ||
className={navigationBtnClass} | ||
className={btnClass} | ||
disabled={!textFilter} | ||
htmlType="button" | ||
icon="down" | ||
onClick={nextResult} | ||
/> | ||
<Button | ||
className={navigationBtnClass} | ||
disabled={!textFilter} | ||
htmlType="button" | ||
icon="search" | ||
onClick={focusUiFindMatches} | ||
/> | ||
</> | ||
)} | ||
<Button | ||
|
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.
This should have an initial lowercase:
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.
Also, you can use the util class
.ub-justify-end
.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.
Nice, updated
Where is the list of
.ub-
classes?