Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 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 @@
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
Loading