Skip to content
Snippets Groups Projects
Commit 52cc76c2 authored by utkarsh_33's avatar utkarsh_33 Committed by Chris Wells
Browse files

Issue #3318791 by utkarsh_33, fjgarlin, divya.sejekan, rkoller,...

Issue #3318791 by utkarsh_33, fjgarlin, divya.sejekan, rkoller, kurttrowbridge, chrisfromredfin, narendrar, phenaproxima: Remove search placeholder, change field label to "Search" 
parent 55907ac3
No related branches found
No related tags found
1 merge request!320Issue #3318791: Improve and clarify the microcopy for the search field placeholder
Pipeline #318263 failed
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
......@@ -41,9 +41,6 @@
searchString.subscribe((value) => {
searchText = value;
});
export let labels = {
placeholder: Drupal.t('Module Name, Keyword(s), etc.'),
};
let sortMatch = $sortCriteria.find((option) => option.id === $sort);
if (typeof sortMatch === 'undefined') {
......@@ -161,15 +158,11 @@
class="search__bar-container search__form-item js-form-item form-item js-form-type-textfield form-type--textfield"
role="search"
>
<label for="pb-text" class="form-item__label"
>{Drupal.t('Keyword search')}</label
>
<label for="pb-text" class="form-item__label">{Drupal.t('Search')}</label>
<div class="search__search-bar">
<input
class="search__search_term form-text form-element form-element--type-text"
type="search"
title={labels.placeholder}
placeholder={labels.placeholder}
id="pb-text"
name="text"
bind:value={$searchString}
......
......@@ -541,7 +541,6 @@ class ProjectBrowserUiTest extends WebDriverTestBase {
// Tests for the presence of search bar placeholder text.
$search_field = $this->getSession()->getPage()->find('css', '#pb-text');
$this->assertSame('Module Name, Keyword(s), etc.', $search_field->getAttribute('placeholder'));
// Fill in the search field.
$this->inputSearchField('', TRUE);
......
......@@ -71,7 +71,7 @@ class TranslatedSvelteAppTest extends WebDriverTestBase {
$translate_to = 'Soorch Foor Moodools';
$this->drupalGet('admin/modules/browse');
$this->svelteInitHelper('text', 'Keyword search');
$this->svelteInitHelper('text', 'Search');
$this->assertFalse($this->assertSession()->waitForText($translate_to));
// This forces locale JS string sources to be imported.
......@@ -80,12 +80,12 @@ class TranslatedSvelteAppTest extends WebDriverTestBase {
// Translate a string in locale.admin.js to our new language.
$strings = \Drupal::service('locale.storage')
->getStrings([
'source' => 'Keyword search',
'source' => 'Search',
]);
$string = $strings[0];
$this->submitForm(['string' => 'Keyword search'], 'Filter');
$this->submitForm(['string' => 'Search'], 'Filter');
$edit = ['strings[' . $string->lid . '][translations][0]' => $translate_to];
$this->submitForm($edit, 'Save translations');
$this->drupalGet("/$prefix/admin/modules/browse");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment