diff --git a/app/components/Sidebar/Main.js b/app/components/Sidebar/Main.js index 4ec967dcf..b695fed34 100644 --- a/app/components/Sidebar/Main.js +++ b/app/components/Sidebar/Main.js @@ -62,7 +62,10 @@ class MainSidebar extends React.Component { label="Home" /> } label="Search" exact={false} diff --git a/app/scenes/Search/Search.js b/app/scenes/Search/Search.js index 05be17a78..1842a998a 100644 --- a/app/scenes/Search/Search.js +++ b/app/scenes/Search/Search.js @@ -16,6 +16,8 @@ import { searchUrl } from 'utils/routeHelpers'; import Flex from 'shared/components/Flex'; import Empty from 'components/Empty'; +import Fade from 'components/Fade'; +import HelpText from 'components/HelpText'; import CenteredContent from 'components/CenteredContent'; import LoadingIndicator from 'components/LoadingIndicator'; import DocumentPreview from 'components/DocumentPreview'; @@ -25,6 +27,7 @@ import SearchField from './components/SearchField'; type Props = { history: Object, match: Object, + location: Object, documents: DocumentsStore, notFound: ?boolean, }; @@ -165,9 +168,11 @@ class Search extends React.Component { } render() { - const { documents, notFound } = this.props; + const { documents, notFound, location } = this.props; const results = documents.searchResults(this.query); const showEmpty = !this.isFetching && this.query && results.length === 0; + const showShortcutTip = + !this.pinToTop && location.state && location.state.fromMenu; return ( @@ -185,6 +190,14 @@ class Search extends React.Component { onChange={this.updateLocation} defaultValue={this.query} /> + {showShortcutTip && ( + + + Use the CMD+K shortcut to search from anywhere + in Outline + + + )} {showEmpty && No matching documents.}