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

Updates to fix the text on the branded search page #2066

Merged
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
15 changes: 0 additions & 15 deletions lib/osf-components/addon/components/search-help-modal/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,6 @@ interface InputArgs {
export default class SearchHelpModal extends Component<InputArgs> {
@service router!: RouterService;

examples: Array<{ q: string, text: string }> = [
{
q: 'repro*',
text: 'repro*',
},
{
q: 'brian+AND+title%3Amany',
text: 'brian AND title:many',
},
{
q: 'tags%3A%28psychology%29',
text: 'tags:(psychology)',
},
];

get currentPath(): string {
return getOwner(this).lookup('controller:application').currentPath;
}
Expand Down
16 changes: 2 additions & 14 deletions lib/osf-components/addon/components/search-help-modal/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,11 @@
</h3>
</dialog.heading>
<dialog.main data-test-search-help-modal-body>
<h4>
{{t 'app_components.search_help_modal.queries'}}
</h4>
<p>
{{t 'app_components.search_help_modal.searchSyntax' htmlSafe=true}}
{{t 'app_components.search_help_modal.helpDescription'}}
{{t 'app_components.search_help_modal.description' htmlSafe=true}}
</p>
<ul>
{{#each this.examples as |example|}}
<li>
<a href={{concat this.currentPath '?q=' example.q}}>
{{example.text}}
</a>
</li>
{{/each}}
</ul>
</dialog.main>

<dialog.footer data-test-search-help-modal-footer>
<Button
data-test-search-help-modal-close-button
Expand Down
4 changes: 1 addition & 3 deletions translations/en-us.yml
Original file line number Diff line number Diff line change
Expand Up @@ -943,9 +943,7 @@ app_components:
search_help_modal:
close: Close
title: 'Search help'
queries: Queries
searchSyntax: 'Search uses the <a href="http://extensions.xwiki.org/xwiki/bin/view/Extension/Search+Application+Query+Syntax">Lucene search syntax</a>.'
helpDescription: 'This gives you many options, but can be very simple as well. Examples of valid searches include:'
description: 'OSF Search provides a powerful discovery tool to help you find data, papers, analysis plans, and more content across the research lifecycle. OSF Preprints has some specialized filters, which you can learn more about on our <a href="https://help.osf.io/article/181-search-and-discover-preprints" target="_blank">help guides</a>.'
search_paginator:
prev: «
prev_aria: 'Go to previous page'
Expand Down
Loading