diff --git a/Changelog.md b/Changelog.md index fd2663fc37c523dc3d6bc7337ffb22cb69f6c749..2d6e9bfd1dbc35f5ce349df7a07620ff603fecfa 100644 --- a/Changelog.md +++ b/Changelog.md @@ -34,6 +34,7 @@ * Descending text is no longer cut off in orange welcome banner [#4377](https://github.com/diaspora/diaspora/issues/4377) * Adjust Facebook character limit to reality [#4380](https://github.com/diaspora/diaspora/issues/4380) * Restore truncated URLs when posting to Twitter [#4211](https://github.com/diaspora/diaspora/issues/4211) +* Fix mobile search tags [#4392](https://github.com/diaspora/diaspora/issues/4392) ## Features * Admin: add option to find users under 13 (COPPA) [#4252](https://github.com/diaspora/diaspora/pull/4252) diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb index cb68022671fdaf4501ad949170766a91d87dfb70..cc510215f24ae19274cf5471ebbe63881722a6c4 100644 --- a/app/controllers/search_controller.rb +++ b/app/controllers/search_controller.rb @@ -6,7 +6,7 @@ class SearchController < ApplicationController if search_query.length > 1 respond_to do |format| format.json {redirect_to tags_path(:q => search_query.delete("#."))} - format.html {redirect_to tag_path(:name => search_query.delete("#."))} + format.any {redirect_to tag_path(:name => search_query.delete("#."))} end else flash[:error] = I18n.t('tags.show.none', :name => search_query) diff --git a/app/views/people/index.mobile.haml b/app/views/people/index.mobile.haml index d3aefacdd7aae8167941b1ade960ee1f5a8f5927..d0fd00a4df79beca0e03ed35cb9417704535cc11 100644 --- a/app/views/people/index.mobile.haml +++ b/app/views/people/index.mobile.haml @@ -6,7 +6,7 @@ = t('search') .search-mobile - = form_tag(people_path, :method => 'get') do + = form_tag(search_path, :method => 'get') do %div{:data => {:role => 'fieldcontain', :inline => 'true'}} = search_field_tag :q, nil, :placeholder => t('find_people'), :class => 'search' = submit_tag t('search'), 'data-inline' => 'true', :class => 'btn' diff --git a/features/step_definitions/mobile_steps.rb b/features/step_definitions/mobile_steps.rb index edeaa5d9edd5431ebf732c159474a3014e2998d2..6a84785e1bbb172ade63997e3d5302b136dc0611 100644 --- a/features/step_definitions/mobile_steps.rb +++ b/features/step_definitions/mobile_steps.rb @@ -21,3 +21,7 @@ end When /^I visit the mobile getting started page$/ do visit('/getting_started.mobile') end + +When /^I visit the mobile search page$/ do + visit('/people.mobile') +end diff --git a/features/tags_mobile.feature b/features/tags_mobile.feature new file mode 100644 index 0000000000000000000000000000000000000000..3509289972c1ed34e48bd0e4ff9fc36ad4128b30 --- /dev/null +++ b/features/tags_mobile.feature @@ -0,0 +1,15 @@ +@javascript +Feature: Interacting with tags + + Background: + Given a user with username "alice" + And "alice@alice.alice" has a public post with text "Hello! i am #newhere" + When I sign in as "alice@alice.alice" + And I toggle the mobile view + + Scenario: Searching for a tag + When I visit the mobile search page + And I fill in the following: + | q | #newhere | + And I press "Search" + Then I should see "#newhere" within ".ltr"