diff --git a/app/components/Highlight.tsx b/app/components/Highlight.tsx index b3de311a9..21d396b66 100644 --- a/app/components/Highlight.tsx +++ b/app/components/Highlight.tsx @@ -6,6 +6,7 @@ * SPDX-License-Identifier: Apache-2.0 */ import { Icon, Tooltip } from '@trussworks/react-uswds' +import classNames from 'classnames' import hljs from 'highlight.js/lib/common' import properties from 'highlight.js/lib/languages/properties' import { useState } from 'react' @@ -17,10 +18,12 @@ export function Highlight({ code, language, filename, + className, }: { code: string language: string filename?: string + className?: string }) { const [copyTooltip, setCopyTooltip] = useState('Copy') @@ -32,7 +35,7 @@ export function Highlight({ } return ( -
+
{filename && ( + Advanced Search +

+ 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{' '} + + here + + {'. '} +

+

Lucene Examples (click to copy):

+
+ + + +
+ + ) +} diff --git a/app/routes/circulars._archive._index/route.tsx b/app/routes/circulars._archive._index/route.tsx index 73bc29d28..c4a3da84b 100644 --- a/app/routes/circulars._archive._index/route.tsx +++ b/app/routes/circulars._archive._index/route.tsx @@ -18,9 +18,21 @@ import { Alert, Button, Icon, Label, TextInput } from '@trussworks/react-uswds' import clamp from 'lodash/clamp' import { useId, useState } from 'react' +import { + circularRedirect, + createChangeRequest, + get, + getChangeRequest, + getChangeRequests, + moderatorGroup, + put, + putVersion, + search, +} from '../circulars/circulars.server' import CircularsHeader from './CircularsHeader' import CircularsIndex from './CircularsIndex' import { DateSelector } from './DateSelectorMenu' +import { LuceneAccordion } from './LuceneMenu' import { SortSelector } from './SortSelectorButton' import SynonymGroupIndex from './SynonymGroupIndex' import Hint from '~/components/Hint' @@ -36,17 +48,6 @@ import { type CircularMetadata, circularFormats, } from '~/routes/circulars/circulars.lib' -import { - circularRedirect, - createChangeRequest, - get, - getChangeRequest, - getChangeRequests, - moderatorGroup, - put, - putVersion, - search, -} from '~/routes/circulars/circulars.server' import type { SynonymGroupWithMembers } from '~/routes/synonyms/synonyms.lib' import { groupMembersByEventId } from '~/routes/synonyms/synonyms.server' @@ -319,6 +320,7 @@ export default function () { To navigate to a specific circular, enter the associated Circular ID (e.g. 'gcn123', 'Circular 123', or '123'). + {useFeature('CIRCULARS_LUCENE') && } {clean && ( <> {isGroupView ? (