Skip to content

Commit

Permalink
Merge pull request #6485 from fecgov/feature/6466-remove-more-keyword…
Browse files Browse the repository at this point in the history
…-symbols

Remove symbols from more keywords and update keyword tooltip
  • Loading branch information
johnnyporkchops authored Oct 7, 2024
2 parents a43bd85 + 9ed3aa5 commit 06a7221
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 72 deletions.
2 changes: 1 addition & 1 deletion fec/fec/static/js/legal/Filters.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function Filters(props) {
TooltipHelp={{
addTooltip: true,
message:
'Refine a keyword search by using +, |, “ ”, -, to expand or limit results.',
'Refine a keyword search by using +, |, “ ”, -, to expand or limit results. Search returns a maximum 6 keyword matches per document.',
verticalPosition: 'above',
horizontalPosition: 'left'
}}
Expand Down
2 changes: 1 addition & 1 deletion fec/fec/static/scss/components/_search-controls.scss
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@
.keyword-modal{
.modal__tips, .modal__form {
display:table-cell;
width:44%;
width:100%;
}
.modal__tips {
margin-left: u(1rem);
Expand Down
39 changes: 5 additions & 34 deletions fec/home/templates/partials/legal-keyword-modal.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<button type="button" class="modal__close button--close--primary" data-a11y-dialog-hide title="Close this dialog window"></button>
<h2 id="spending-modal-title" class="heading--section">Find documents with...</h2>
<div class="row u-padding--top">
<form class="modal__form search-controls__either" action="/data/legal/search/">
<p>Use these search boxes to refine your search:</p>
<form class="modal__form" action="/data/legal/search/">
<p>Use these search boxes to refine your search. Only words with letters, numbers, spaces, and hyphens (such as in-kind) are accepted:</p>
<div class="filter">
<label class="label" for="keywords-any">Any of these words</label>
<input type="text" id="keywords-any" data-operator="or">
Expand All @@ -27,40 +27,11 @@ <h2 id="spending-modal-title" class="heading--section">Find documents with...</h
<input type="text" id="keywords-none" data-operator="exclude">
<span class="t-note t-sans">Entering <span class="t-underline">text message</span> will exclude <span class="t-underline">text</span> and <span class="t-underline">message</span></span>
<input type="hidden" name="search">
<button class="u-margin--top button button--cta button--search--text" type="submit">Search</button>
<div>
<button class="u-margin--top button button--cta button--search--text" type="submit">Search</button>
</div>
</div>
</form>
<div class="search-controls__or search-controls__or--vertical">or</div>

<div class="modal__tips search-controls__either">
<p>Use these symbols in the main search box:</p>
<table class="simple-table">
<thead class="simple-table__header">
<tr>
<th>Symbol</th>
<th>Meaning</th>
</tr>
</thead>
<tbody>
<tr class="simple-table__row">
<td class="simple-table__cell">|</td>
<td class="simple-table__cell">or</td>
</tr>
<tr class="simple-table__row">
<td class="simple-table__cell">+</td>
<td class="simple-table__cell">and</td>
</tr>
<tr class="simple-table__row">
<td class="simple-table__cell">&ldquo; &rdquo;</td>
<td class="simple-table__cell">exact phrase</td>
</tr>
<tr class="simple-table__row">
<td class="simple-table__cell">-</td>
<td class="simple-table__cell">but not</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion fec/legal/templates/macros/legal.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="tooltip__container">
<button class="tooltip__trigger"><span class="u-visually-hidden">Learn more</span></button>
<div class="tooltip tooltip--left tooltip--under">
<p class="tooltip__content tooltip__content">Refine a keyword search by using +, |, “ ”, -, to expand or limit results.</p>
<p class="tooltip__content tooltip__content">Refine a keyword search by using + (and), | (or), " " (exact phrase), - (but not), to expand or limit results. Search returns a maximum 6 keyword matches per document.</p>
</div>
</div>
<div class="combo combo--search--mini no-mar-b">
Expand Down
40 changes: 5 additions & 35 deletions fec/legal/templates/partials/legal-keyword-modal.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<button type="button" class="modal__close button--close--primary" data-a11y-dialog-hide title="Close this dialog window"></button>
<h2 id="spending-modal-title" class="heading--section">Find documents with...</h2>
<div class="row u-padding--top">
<form class="modal__form search-controls__either" action="">
<p>Use these search boxes to refine your search:</p>
<form class="modal__form" action="">
<p>Use these search boxes to refine your search. Only words with letters, numbers, spaces, and hyphens (such as in-kind) are accepted:</p>
<div class="filter">
<label class="label" for="keywords-any">Any of these words</label>
<input type="text" id="keywords-any" data-operator="or">
Expand All @@ -26,41 +26,11 @@
<label class="label" for="keywords-none">None of these words</label>
<input type="text" id="keywords-none" data-operator="exclude">
<span class="t-note t-sans">Entering <span class="t-underline">text message</span> will exclude <span class="t-underline">text</span> and <span class="t-underline">message</span></span>
<button class="u-margin--top button button--cta button--search--text" type="submit">Search</button>
<div>
<button class="u-margin--top button button--cta button--search--text" type="submit">Search</button>
</div>
</div>
</form>

<div class="search-controls__or search-controls__or--vertical">or</div>

<div class="modal__tips search-controls__either">
<p>Use these symbols in the main search box:</p>
<table class="simple-table">
<thead class="simple-table__header">
<tr>
<th>Symbol</th>
<th>Meaning</th>
</tr>
</thead>
<tbody>
<tr class="simple-table__row">
<td class="simple-table__cell">|</td>
<td class="simple-table__cell">or</td>
</tr>
<tr class="simple-table__row">
<td class="simple-table__cell">+</td>
<td class="simple-table__cell">and</td>
</tr>
<tr class="simple-table__row">
<td class="simple-table__cell">&ldquo; &rdquo;</td>
<td class="simple-table__cell">exact phrase</td>
</tr>
<tr class="simple-table__row">
<td class="simple-table__cell">-</td>
<td class="simple-table__cell">but not</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
Expand Down

0 comments on commit 06a7221

Please sign in to comment.