From fb50eea20c499f7c4bd56388602f6bfbb744acad Mon Sep 17 00:00:00 2001 From: tylerbarna Date: Tue, 12 Nov 2024 13:21:12 -0600 Subject: [PATCH] add in-page lucene docs --- .../circulars._archive._index/LuceneMenu.tsx | 19 +++++++++++++++++++ .../circulars._archive._index/route.tsx | 4 +++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 app/routes/circulars._archive._index/LuceneMenu.tsx diff --git a/app/routes/circulars._archive._index/LuceneMenu.tsx b/app/routes/circulars._archive._index/LuceneMenu.tsx new file mode 100644 index 000000000..e499844aa --- /dev/null +++ b/app/routes/circulars._archive._index/LuceneMenu.tsx @@ -0,0 +1,19 @@ +import { Link } from '@remix-run/react' + +export function LuceneAccordion() { + return ( +
+ 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 on the{' '} + + Lucene Search Syntax Page + + {'. '} +
+
+ ) +} diff --git a/app/routes/circulars._archive._index/route.tsx b/app/routes/circulars._archive._index/route.tsx index 005443b3a..717c55735 100644 --- a/app/routes/circulars._archive._index/route.tsx +++ b/app/routes/circulars._archive._index/route.tsx @@ -37,6 +37,7 @@ import { import CircularsHeader from './CircularsHeader' import CircularsIndex from './CircularsIndex' import { DateSelector } from './DateSelectorMenu' +import { LuceneAccordion } from './LuceneMenu' import { SortSelector } from './SortSelectorButton' import Hint from '~/components/Hint' import { ToolbarButtonGroup } from '~/components/ToolbarButtonGroup' @@ -44,7 +45,7 @@ import PaginationSelectionFooter from '~/components/pagination/PaginationSelecti 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' import searchImg from 'nasawds/src/img/usa-icons-bg/search--white.svg' @@ -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'). + {useFeature('CIRCULARS_LUCENE') && } {clean && ( <>