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 2 commits into
base: main
Choose a base branch
from

Conversation

tylerbarna
Copy link
Member

Description

This adds a brief explanation of Lucene queries to the Circulars Archive page, hidden behind a feature flag.

image

Note: This is a simplified version of #2589 that removes the quick action buttons until the proper implementation can be identified.

Related Issue(s)

Tracked by #2288

Testing

  1. Navigate to Circulars Archive
  2. Click on the "Advanced Search" (Tentative Label) Accordion Menu
  3. The menu should expand

Copy link

codecov bot commented Nov 12, 2024

Codecov Report

Attention: Patch coverage is 0% with 9 lines in your changes missing coverage. Please review.

Project coverage is 6.22%. Comparing base (7c94cb4) to head (7edb810).
Report is 42 commits behind head on main.

Files with missing lines Patch % Lines
...pp/routes/circulars._archive._index/LuceneMenu.tsx 0.00% 7 Missing ⚠️
app/routes/circulars._archive._index/route.tsx 0.00% 2 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main   #2713   +/-   ##
=====================================
  Coverage   6.21%   6.22%           
=====================================
  Files        167     168    +1     
  Lines       4231    4274   +43     
  Branches     467     472    +5     
=====================================
+ Hits         263     266    +3     
- Misses      3966    4006   +40     
  Partials       2       2           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@lpsinger lpsinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is now short enough that I don't know if it needs a disclosure arrow. Can you incorporate it into the existing help text there?

@tylerbarna
Copy link
Member Author

This is now short enough that I don't know if it needs a disclosure arrow. Can you incorporate it into the existing help text there?

I was under the impression we would integrate the quick actions as a separate PR once we figured the proper method out; would we not want to retain the disclosure menu for when those are added?

@lpsinger
Copy link
Member

This is now short enough that I don't know if it needs a disclosure arrow. Can you incorporate it into the existing help text there?

I was under the impression we would integrate the quick actions as a separate PR once we figured the proper method out; would we not want to retain the disclosure menu for when those are added?

I suggested that you make the examples non-clickable, not that you remove them entirely. If we remove the entirely, then there's no need for the additional disclosure section.

I would rather that you add them back, but make them non-interactive.

@lpsinger lpsinger added this to the Advanced Search milestone Nov 26, 2024
@tylerbarna
Copy link
Member Author

This is now short enough that I don't know if it needs a disclosure arrow. Can you incorporate it into the existing help text there?

I was under the impression we would integrate the quick actions as a separate PR once we figured the proper method out; would we not want to retain the disclosure menu for when those are added?

I suggested that you make the examples non-clickable, not that you remove them entirely. If we remove the entirely, then there's no need for the additional disclosure section.

I would rather that you add them back, but make them non-interactive.

Ah, apologies for the misunderstanding. I'll add them back without making them interactive

this restores the lucene example buttons, but rather than populating the search bar, this copies them to the clipboard. There is not a visual feedback for this at the moment, but something like (https://remix.run/resources/remix-toast)[this] could be useful
@tylerbarna
Copy link
Member Author

@lpsinger I added the examples back; they're still clickable, but I've made it so clicking them copies the example to the clipboard. Would that be useful, or would it be better to make them unclickable?

Copy link
Member

@lpsinger lpsinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nice touch, but if you want to support copying the text to the clipboard, please reuse the existing components and look-and-feel that we have for that:

Screenshot 2024-12-08 at 16 08 16

This is a block-level component. If you need an inline component, there is https://github.com/nasa-gcn/gcn.nasa.gov/blob/main/app/components/CopyableCode.tsx, although it doesn't have the tooltip status. (@dakota002, if Tyler decides to use that, please refactor CopyableCode and Highlight so that they both consistently use the nice tooltip you added. If not, let's delete CopyableCode, because it is unused.)

Note on appearance: it is jarring that the font size and color does not match the existing help text there.

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">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This link is broken.

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
Copy link
Member

Choose a reason for hiding this comment

The 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.

<details>
<summary>Advanced Search</summary>

<div>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary div.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add copyright banner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants