-
Notifications
You must be signed in to change notification settings - Fork 13
POC fullscreen search #976
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
Open
jordythevulder
wants to merge
27
commits into
master
Choose a base branch
from
feature/fullscreen-search
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
2dbab6f
POC fullscreen search
jordythevulder 8a75052
Improved fullscreensearch
jordythevulder 7bb54e2
Apply fixes from Duster
jordythevulder 1e5d036
merge
jordythevulder fb0093d
Increased hit size and styled hits as columns
jordythevulder 3f51990
Merge branch 'feature/fullscreen-search' of github.com:rapidez/core i…
jordythevulder e6d31f7
Apply fixes from Duster
jordythevulder a69cec6
[CI] Update Snapshots
jordythevulder ea972d6
Fix cursor focus, added default category list, added infinite scroll
indykoning c5b9727
Apply fixes from Duster
indykoning ab697b6
Merge branch 'master' of github.com:rapidez/core into feature/fullscr…
jordythevulder afa97a2
Finetuned responsive
jordythevulder 29207fa
[CI] Update Snapshots
jordythevulder fbb3514
Revert fullscreen search files from 4.x
jordythevulder 4642cb8
Merge branch 'feature/fullscreen-search' of github.com:rapidez/core i…
jordythevulder 8d1b791
Removed files
jordythevulder c2b278f
Merge branch '4.x' into feature/fullscreen-search
jordythevulder fa29542
[CI] Update Snapshots
jordythevulder a138409
Revert files
jordythevulder 08f9198
Merge branch 'feature/fullscreen-search' of github.com:rapidez/core i…
jordythevulder 6436750
[CI] Update Snapshots
jordythevulder 6fb95dc
Changed a-z translations
jordythevulder d170753
Merge branch 'feature/fullscreen-search' of github.com:rapidez/core i…
jordythevulder 65a7dcb
[CI] Update Snapshots
jordythevulder 03736d0
Merge branch 'master' of github.com:rapidez/core into feature/fullscr…
jordythevulder d9bad48
Merge branch 'feature/fullscreen-search' of github.com:rapidez/core i…
jordythevulder 7edabcf
[CI] Update Snapshots
jordythevulder File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 49 additions & 36 deletions
85
resources/views/layouts/partials/header/autocomplete.blade.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,42 +1,55 @@ | ||
| <autocomplete v-slot="autocompleteSlotProps" :hits-per-page="{{ config('rapidez.frontend.autocomplete.size', 3) }}"> | ||
| <div class="relative w-full"> | ||
| <ais-instant-search | ||
| v-if="autocompleteSlotProps.searchClient" | ||
| :search-client="autocompleteSlotProps.searchClient" | ||
| :middlewares="autocompleteSlotProps.middlewares" | ||
| :index-name="config.index.product" | ||
| class="contents" | ||
| v-cloak | ||
| > | ||
| <div class="contents"> | ||
| <div class="searchbox group/autocomplete"> | ||
| <ais-autocomplete> | ||
| <template v-slot="{ currentRefinement, refine }"> | ||
| <x-rapidez::autocomplete.input | ||
| v-bind:value="currentRefinement" | ||
| v-on:focus="() => { | ||
| refine($root.autocompleteFacadeQuery || currentRefinement); | ||
| $root.autocompleteFacadeQuery = null; | ||
| }" | ||
| v-on:input="refine($event.currentTarget.value)" | ||
| list="search-history" | ||
| /> | ||
| <div v-bind:class="{hidden: !currentRefinement}" class="absolute inset-x-0 top-full mt-1 bg-white rounded-md z-header-autocomplete group-has-[:focus]/autocomplete:block hover:block"> | ||
| @include('rapidez::layouts.partials.header.autocomplete.results') | ||
| <toggler> | ||
| <div class="relative w-full" slot-scope="{ isOpen, toggle }"> | ||
| <ais-instant-search | ||
| v-if="autocompleteSlotProps.searchClient && isOpen" | ||
| :search-client="autocompleteSlotProps.searchClient" | ||
| :middlewares="autocompleteSlotProps.middlewares" | ||
| :index-name="config.index.product" | ||
| class="contents" | ||
| v-cloak | ||
| > | ||
| <div class="fixed inset-0 h-full bg-white/90 backdrop-blur-sm searchbox group/autocomplete z-header-autocomplete-popup flex flex-col pt-14 px-10 overflow-y-auto"> | ||
| <div class="relative"> | ||
| <div class="flex items-start relative"> | ||
| <x-rapidez::button.outline v-on:click="toggle(); refine('')" class="absolute left-0 top-0"> | ||
| <x-heroicon-o-chevron-left class="size-5" /> | ||
| </x-rapidez::button.outline> | ||
| <img src="https://raw.githubusercontent.com/rapidez/art/master/r.svg" alt="Rapidez logo" height="50" width="50" class="mx-auto mb-11"> | ||
| </div> | ||
| <div class="flex-1 overflow-hidden"> | ||
| <div class="max-w-xl bg-white rounded-3xl shadow-xl mx-auto border border-muted w-full px-9 py-8 mb-10"> | ||
| <ais-autocomplete v-slot="{ currentRefinement, refine }"> | ||
| <x-rapidez::autocomplete.input | ||
| class="rounded-full focus:ring-primary focus:border-primary transition h-14 focus:ring-2" | ||
| v-bind:value="currentRefinement" | ||
| v-on:focus="() => { | ||
| refine($root.autocompleteFacadeQuery || currentRefinement); | ||
| $root.autocompleteFacadeQuery = null; | ||
| }" | ||
| v-on:input="refine($event.currentTarget.value)" | ||
| list="search-history" | ||
| /> | ||
| <div v-bind:class="{hidden: !currentRefinement}" class="group-has-[:focus]/autocomplete:block"> | ||
| @include('rapidez::layouts.partials.header.autocomplete.results') | ||
| </div> | ||
| {{-- <div v-bind:class="{hidden: !currentRefinement}" v-on:click="refine('')" class="fixed inset-0 bg-backdrop z-header-autocomplete-overlay group-has-[:focus]/autocomplete:block"></div> --}} | ||
| </ais-autocomplete> | ||
| </div> | ||
| <div v-bind:class="{hidden: !currentRefinement}" v-on:click="refine('')" class="fixed inset-0 bg-backdrop z-header-autocomplete-overlay group-has-[:focus]/autocomplete:block"></div> | ||
| </template> | ||
| </ais-autocomplete> | ||
| <ais-stats-analytics></ais-stats-analytics> | ||
| </div> | ||
| @includeWhen(config('rapidez.frontend.autocomplete.additionals.products') === null,'rapidez::layouts.partials.header.autocomplete.products') | ||
| <ais-stats-analytics></ais-stats-analytics> | ||
| </div> | ||
| </div> | ||
| </ais-instant-search> | ||
|
|
||
| <div class="relative w-full"> | ||
| <x-rapidez::autocomplete.input | ||
| v-model="$root.autocompleteFacadeQuery" | ||
| v-on:focus="window.document.dispatchEvent(new window.Event('loadAutoComplete')), toggle()" | ||
| v-on:mouseover="window.document.dispatchEvent(new window.Event('loadAutoComplete'))" | ||
| /> | ||
| </div> | ||
| </ais-instant-search> | ||
| <div v-else class="relative w-full"> | ||
| <x-rapidez::autocomplete.input | ||
| v-model="$root.autocompleteFacadeQuery" | ||
| v-on:focus="window.document.dispatchEvent(new window.Event('loadAutoComplete'))" | ||
| v-on:mouseover="window.document.dispatchEvent(new window.Event('loadAutoComplete'))" | ||
| /> | ||
| </div> | ||
| </div> | ||
| </toggler> | ||
| </autocomplete> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
resources/views/layouts/partials/header/autocomplete/results.blade.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,5 @@ | ||
| @foreach (config('rapidez.frontend.autocomplete.additionals') as $key => $fields) | ||
| @includeIf('rapidez::layouts.partials.header.autocomplete.' . $key) | ||
| @endforeach | ||
| @includeWhen(config('rapidez.frontend.autocomplete.additionals.products') === null,'rapidez::layouts.partials.header.autocomplete.products') | ||
| @include('rapidez::layouts.partials.header.autocomplete.all-results') | ||
| @include('rapidez::layouts.partials.header.autocomplete.no-results') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.