Remove placeholder in advanced search

When users see a label saying "With the text" and an input field, they
don't usually need a placeholder saying "Write the text". On the
contrary, this text adds noise and is hard to read due to the low
contrast between the color of the placeholder and the color of the
field, making the text an unnecessary distraction.
This commit is contained in:
Javi Martín
2021-08-25 01:17:21 +02:00
parent 9f1f912d84
commit 3347157b43
4 changed files with 6 additions and 9 deletions

View File

@@ -8,8 +8,7 @@
<label for="search">
<%= t("shared.advanced_search.general") %>
</label>
<%= text_field_tag "search", params[:search],
placeholder: t("shared.advanced_search.general_placeholder") %>
<%= text_field_tag "search", params[:search] %>
</div>
<div class="date-filters">

View File

@@ -683,7 +683,6 @@ en:
date_5: "Customized"
from: "From"
general: "With the text"
general_placeholder: "Write the text"
goal: "By SDG"
goal_blank: "Select a goal"
search: "Filter"

View File

@@ -683,7 +683,6 @@ es:
date_5: "Personalizada"
from: "Desde"
general: "Con el texto"
general_placeholder: "Escribe el texto"
goal: "Por ODS"
goal_blank: "Elige un objetivo"
search: "Filtrar"

View File

@@ -12,7 +12,7 @@ describe "Advanced search" do
visit debates_path
click_button "Advanced search"
fill_in "Write the text", with: "Schwifty"
fill_in "With the text", with: "Schwifty"
click_button "Filter"
expect(page).to have_content("There are 2 debates")
@@ -32,7 +32,7 @@ describe "Advanced search" do
visit proposals_path
click_button "Advanced search"
fill_in "Write the text", with: "Schwifty"
fill_in "With the text", with: "Schwifty"
click_button "Filter"
expect(page).to have_content("There are 2 citizen proposals")
@@ -52,7 +52,7 @@ describe "Advanced search" do
visit budget_investments_path(budget)
click_button "Advanced search"
fill_in "Write the text", with: "Schwifty"
fill_in "With the text", with: "Schwifty"
click_button "Filter"
expect(page).to have_content("There are 2 investments")
@@ -204,7 +204,7 @@ describe "Advanced search" do
visit budget_investments_path(budget)
click_button "Advanced search"
fill_in "Write the text", with: "Schwifty"
fill_in "With the text", with: "Schwifty"
select "7. Affordable and Clean Energy", from: "By SDG"
select "Last 24 hours", from: "js-advanced-search-date-min"
@@ -224,7 +224,7 @@ describe "Advanced search" do
visit debates_path
click_button "Advanced search"
fill_in "Write the text", with: "Schwifty"
fill_in "With the text", with: "Schwifty"
select "7. Affordable and Clean Energy", from: "By SDG"
select "Last 24 hours", from: "js-advanced-search-date-min"