-
Notifications
You must be signed in to change notification settings - Fork 44
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
Circulars: Add In-Page Lucene Documentation #2713
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { Link } from '@remix-run/react' | ||
import { Button } from '@trussworks/react-uswds' | ||
import CopyToClipboard from 'react-copy-to-clipboard' | ||
|
||
export function LuceneAccordion() { | ||
function copyableButton(text: string) { | ||
return ( | ||
<CopyToClipboard text={text}> | ||
<Button type="button" outline> | ||
{text} | ||
</Button> | ||
</CopyToClipboard> | ||
) | ||
} | ||
return ( | ||
<details> | ||
<summary>Advanced Search</summary> | ||
|
||
<div> | ||
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. Unnecessary div. |
||
To narrow the search results, use Lucene search syntax. This allows for | ||
specifying which circular field to search (submitter, subject, and/or | ||
body). Further documentation can be found on the{' '} | ||
<Link className="usa-link" to="/docs/circulars/lucene"> | ||
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. This link is broken. |
||
Lucene Search Syntax Page | ||
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. Poor link text: every link goes to a "page", so "page" is redundant. |
||
</Link> | ||
{'. '} | ||
<h4>Lucene Examples (click to copy):</h4> | ||
<div> | ||
{copyableButton('subject:"Swift"')} | ||
{copyableButton('body:"GRB"')} | ||
{copyableButton('submitter:"Tomas Ahumada Mena"')} | ||
</div> | ||
</div> | ||
</details> | ||
) | ||
} |
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.
Add copyright banner.