Skip to content

Commit

Permalink
Merge pull request #17245 from eduardoj/feature/make_submit_search_bo…
Browse files Browse the repository at this point in the history
…x_more_intuitive_ii

Make submit search box on mobile more intuitive (II)
  • Loading branch information
eduardoj authored Dec 30, 2024
2 parents 5005936 + e54980a commit 6c7e618
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
= form_tag(search_path(project: 1, package: 1, name: 1), method: :get, class: 'my-auto') do
%input.form-control.w-100{ 'aria-label': 'Search', name: 'search_text', placeholder: 'Search', type: 'text' }/
%input.form-control.w-100{ 'aria-label': 'Search', name: 'search_text', placeholder: 'Search', type: 'search' }/
4 changes: 2 additions & 2 deletions src/api/app/views/webui/search/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
.d-flex.justify-content-center
= form_tag(search_path, method: :get, class: 'my-3 w-75') do
.mb-3.input-group
= text_field_tag('search_text', params[:search_text], placeholder: 'Search', autofocus: true,
required: true, minlength: 2, class: 'form-control rounded', id: 'search_input')
= search_field_tag('search_text', params[:search_text], placeholder: 'Search', autofocus: true,
required: true, minlength: 2, class: 'form-control rounded', id: 'search_input')
%button.btn.btn-primary.ms-1{ type: 'submit', title: 'Search' }
%i.fa.fa-search

Expand Down
2 changes: 1 addition & 1 deletion src/api/app/views/webui/search/issue.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
.d-flex.justify-content-center
= form_tag(search_issue_path, method: :get, class: 'my-3 w-75') do
.mb-3.input-group
= text_field_tag('issue', params[:issue], placeholder: 'Issue ID', autofocus: true, required: true, class: 'form-control')
= search_field_tag('issue', params[:issue], placeholder: 'Issue ID', autofocus: true, required: true, class: 'form-control')

= select_tag(:issue_tracker, options_for_select(@issue_tracker_list, params[:issue_tracker] || @default_tracker),
class: 'form-select rounded-end')
Expand Down
4 changes: 2 additions & 2 deletions src/api/app/views/webui/search/owner.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
= form_tag(search_owner_path, method: :get, class: 'my-3 w-75') do
%input{ name: 'owner', type: 'hidden', value: '1' }
.mb-3.d-flex
= text_field_tag('search_text', params[:search_text], placeholder: 'Search', autofocus: true, required: true, class: 'form-control',
id: 'search_input')
= search_field_tag('search_text', params[:search_text], placeholder: 'Search', autofocus: true, required: true, class: 'form-control',
id: 'search_input')
%button.btn.btn-primary.ms-1{ type: 'submit', title: 'Search' }
%i.fa.fa-search
.row
Expand Down
4 changes: 2 additions & 2 deletions src/api/app/views/webui/shared/_autocomplete.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
.input-group
%span.input-group-text
%i.fas.fa-search
= text_field_tag(html_id, value, required: required, disabled: disabled, placeholder: 'Type to autocomplete...',
class: 'obs-autocomplete form-control', data: data, name: html_name)
= search_field_tag(html_id, value, required: required, disabled: disabled, placeholder: 'Type to autocomplete...',
class: 'obs-autocomplete form-control', data: data, name: html_name)
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
.selected-content.small.ms-1
.px-4.pb-2.accordion-collapse.collapse.show#request-filter-stag-proj
.mb-3.ui-front
%input.form-control#stag-proj-search{ placeholder: 'Filter staging project' }
%input.form-control#stag-proj-search{ placeholder: 'Filter staging project', type: 'search' }
.scroll-list-wrapper
- Project.where.not(staging_workflow_id: nil).each do |sp|
.dropdown-item-text.request-filter-stag-proj-item
Expand Down
2 changes: 1 addition & 1 deletion src/api/app/views/webui/user/_involvement.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
.card-body
= form_with(model: displayed_user, method: :get, local: true, class: 'row row-cols-auto justify-content-end') do
.mb-3
%input.form-control{ 'aria-label': 'Search', name: 'search_text', placeholder: 'Search', type: 'text', value: filters[:search_text] }
%input.form-control{ 'aria-label': 'Search', name: 'search_text', placeholder: 'Search', type: 'search', value: filters[:search_text] }
%span.dropdown.mb-3#involved-project-package
%button.btn.btn-outline-secondary.dropdown-toggle.form-control{ data: { 'bs-toggle': :dropdown }, type: :button }
%span.caret
Expand Down

0 comments on commit 6c7e618

Please sign in to comment.