-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fix/Many controls in search empty state not working #509
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
6a54b5c
Node version fixed
AlanSoto31 1484758
Remove package-lock.json
AlanSoto31 962b70f
Conflicts resolved
JosueMagnus12 063f8fe
Conflicts resolved
JosueMagnus12 b0ec452
package-lock.json removed
JosueMagnus12 df9d573
Google ads conversion tracking second iteration.
JosueMagnus12 abb7a55
Preview param bug fix
JosueMagnus12 715e0de
fix(search): replace generic button with a link to alerts modal
JosueMagnus12 8308b91
Conflicts resolved
JosueMagnus12 a9599ca
Fix(search): clear filters button
JosueMagnus12 3fb70bb
feature(search): add clear keyword button
JosueMagnus12 33af272
style(javascript): add todo comment
JosueMagnus12 a040599
Merge with main.
JosueMagnus12 6bc8164
fix(search): hide browser-native clear button in search input
JosueMagnus12 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 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,11 +1,35 @@ | ||
<div id="search-bar" class="inset-x-0 z-20 px-6 py-4 sticky bg-gradient-to-r from-blue-gradient-2 to-blue-gradient-1 top-20 md:top-22.75"> | ||
<div class="flex flex-row items-center justify-center md:gap-5"> | ||
<div class="relative w-full max-w-xl h-46px"> | ||
<div class="absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"> | ||
<%= inline_svg_tag "solid_search.svg", class: 'h-4 w-4 fill-current text-gray-2' %> | ||
</div> | ||
<%= @form.search_field :keyword, value: "#{ params.dig('search', 'keyword') }", class: 'block pl-8 h-46px w-full py-3.5 px-4 rounded-6px text-base text-gray-3 focus:outline-none', placeholder: 'Try “Mental Health Nonprofits”'%> | ||
</div> | ||
<%= @form.submit 'Search', class: 'invisible w-0 md:w-36 p-0 md:visible md:flex cursor-pointer uppercase flex-row justify-center items-center bg-seafoam md:py-4 md:px-10 rounded-6px text-blue-dark text-base font-bold focus:outline-none mx-2'%> | ||
<div id="search-bar" class="sticky inset-x-0 z-20 flex items-center justify-center px-6 py-4 | ||
bg-gradient-to-r from-blue-gradient-2 to-blue-gradient-1 top-20 md:top-22.75 md:gap-5"> | ||
<%# Keyword input %> | ||
<div class="relative w-full max-w-xl"> | ||
<span class="absolute inset-y-0 left-0 flex items-center px-3 pointer-events-none"> | ||
<%= inline_svg_tag "solid_search.svg", class: 'h-4 w-4 fill-current text-gray-2' %> | ||
</span> | ||
|
||
<%= @form.search_field( | ||
:keyword, | ||
value: "#{ params.dig('search', 'keyword') }", | ||
class: "block px-10 h-46px w-full py-3.5 px-4 rounded-6px text-base text-gray-3 focus:outline-none", | ||
id: "search-keyword-input", | ||
placeholder: "Try \"Mental Health Nonprofits\"", | ||
data: { | ||
action: "input->search#displayClearKeywordButton", | ||
search_target: "keywordInput" | ||
} | ||
) %> | ||
|
||
<button | ||
type="button" | ||
class="absolute inset-y-0 right-0 px-3 <%= "hidden" unless params.dig('search', 'keyword').present? %>" | ||
data-search-target="clearKeywordButton" | ||
data-action="click->search#clearKeywordInput"> | ||
<%= inline_svg_tag "x-icon.svg", class: "w-3.5 h-3.5 icon", aria_hidden: true %> | ||
</button> | ||
</div> | ||
|
||
<%# Search Button %> | ||
<%= @form.submit( | ||
'Search', | ||
class: "invisible w-0 p-0 rounded-md text-blue-dark font-bold uppercase bg-seafoam md:py-4 md:px-10 md:w-36 md:visible focus:outline-none" | ||
)%> | ||
</div> |
This file contains 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
This file contains 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
This file contains 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
This file contains 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not the most elegant approach, but this is the quickest solution. Let's add the refactor of all of this as tech debt.