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

refactor: use glimmer component for search-input #205

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
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
Next Next commit
refactor: format search-input template
  • Loading branch information
kennstenicht committed Jul 31, 2024
commit 0da9f4389ffcc7367b5caca29799edd6337394ae
30 changes: 23 additions & 7 deletions guidemaker-ember-template/src/components/search-input.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{!-- template-lint-disable link-rel-noopener no-action no-curly-component-invocation --}}
{{! template-lint-disable no-action }}
{{#if this.searchService.index}}
<input
id="search-input"
@@ -10,10 +10,16 @@
onfocus={{action "onfocus"}}
onblur={{action "onblur"}}
data-test-search-input
>
/>

{{!-- Search results dropdown --}}
<EmberTether @target="#search-input" @targetAttachment="bottom right" @attachment="top right" @constraints={{this._resultTetherConstraints}} @class="ds-dropdown-results">
{{! Search results dropdown }}
<EmberTether
@target="#search-input"
@targetAttachment="bottom right"
@attachment="top right"
@constraints={{this._resultTetherConstraints}}
@class="ds-dropdown-results"
>
{{#if this.showDropdown}}
<div class="ds-suggestions ds-dropdown-menu">
<DropdownHeader>
@@ -28,15 +34,25 @@
<p>
No results found.
{{#if this.deprecationsGuideURL}}
Try searching the <a href={{this.deprecationsGuideURL}} target="_deprecations">deprecations guide</a>.
Try searching the
<a href={{this.deprecationsGuideURL}} target="_deprecations">
deprecations guide
</a>.
{{/if}}
</p>
</div>
</div>
{{/each}}
<div class="powered-by-algolia">
<a href="https://www.algolia.com/" target="_blank" rel="noopener">
<img src="/images/logos/search-by-algolia.svg" alt="Search Powered by Algolia">
<a
href="https://www.algolia.com/"
target="_blank"
rel="noopener noreferrer"
>
<img
src="/images/logos/search-by-algolia.svg"
alt="Search Powered by Algolia"
/>
</a>
</div>
</div>