Skip to content

Commit

Permalink
add in-page lucene docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerbarna committed Nov 12, 2024
1 parent 7c94cb4 commit fb50eea
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
19 changes: 19 additions & 0 deletions app/routes/circulars._archive._index/LuceneMenu.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { Link } from '@remix-run/react'

Check warning on line 1 in app/routes/circulars._archive._index/LuceneMenu.tsx

View check run for this annotation

Codecov / codecov/patch

app/routes/circulars._archive._index/LuceneMenu.tsx#L1

Added line #L1 was not covered by tests

export function LuceneAccordion() {
return (

Check warning on line 4 in app/routes/circulars._archive._index/LuceneMenu.tsx

View check run for this annotation

Codecov / codecov/patch

app/routes/circulars._archive._index/LuceneMenu.tsx#L3-L4

Added lines #L3 - L4 were not covered by tests
<details>
<summary>Advanced Search</summary>

<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">
Lucene Search Syntax Page
</Link>
{'. '}
</div>
</details>
)
}
4 changes: 3 additions & 1 deletion app/routes/circulars._archive._index/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,15 @@ import {
import CircularsHeader from './CircularsHeader'
import CircularsIndex from './CircularsIndex'
import { DateSelector } from './DateSelectorMenu'
import { LuceneAccordion } from './LuceneMenu'

Check warning on line 40 in app/routes/circulars._archive._index/route.tsx

View check run for this annotation

Codecov / codecov/patch

app/routes/circulars._archive._index/route.tsx#L40

Added line #L40 was not covered by tests
import { SortSelector } from './SortSelectorButton'
import Hint from '~/components/Hint'
import { ToolbarButtonGroup } from '~/components/ToolbarButtonGroup'
import PaginationSelectionFooter from '~/components/pagination/PaginationSelectionFooter'
import { origin } from '~/lib/env.server'
import { getFormDataString } from '~/lib/utils'
import { postZendeskRequest } from '~/lib/zendesk.server'
import { useModStatus } from '~/root'
import { useFeature, useModStatus } from '~/root'

Check warning on line 48 in app/routes/circulars._archive._index/route.tsx

View check run for this annotation

Codecov / codecov/patch

app/routes/circulars._archive._index/route.tsx#L48

Added line #L48 was not covered by tests

import searchImg from 'nasawds/src/img/usa-icons-bg/search--white.svg'

Expand Down Expand Up @@ -271,6 +272,7 @@ export default function () {
To navigate to a specific circular, enter the associated Circular ID
(e.g. 'gcn123', 'Circular 123', or '123').
</Hint>
{useFeature('CIRCULARS_LUCENE') && <LuceneAccordion />}
{clean && (
<>
<CircularsIndex
Expand Down

0 comments on commit fb50eea

Please sign in to comment.