fix mobile search tags
This commit is contained in:
parent
a5d7340129
commit
152c08963a
5 changed files with 22 additions and 2 deletions
|
|
@ -34,6 +34,7 @@
|
||||||
* Descending text is no longer cut off in orange welcome banner [#4377](https://github.com/diaspora/diaspora/issues/4377)
|
* 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)
|
* 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)
|
* 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
|
## Features
|
||||||
* Admin: add option to find users under 13 (COPPA) [#4252](https://github.com/diaspora/diaspora/pull/4252)
|
* Admin: add option to find users under 13 (COPPA) [#4252](https://github.com/diaspora/diaspora/pull/4252)
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ class SearchController < ApplicationController
|
||||||
if search_query.length > 1
|
if search_query.length > 1
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.json {redirect_to tags_path(:q => search_query.delete("#."))}
|
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
|
end
|
||||||
else
|
else
|
||||||
flash[:error] = I18n.t('tags.show.none', :name => search_query)
|
flash[:error] = I18n.t('tags.show.none', :name => search_query)
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
= t('search')
|
= t('search')
|
||||||
|
|
||||||
.search-mobile
|
.search-mobile
|
||||||
= form_tag(people_path, :method => 'get') do
|
= form_tag(search_path, :method => 'get') do
|
||||||
%div{:data => {:role => 'fieldcontain', :inline => 'true'}}
|
%div{:data => {:role => 'fieldcontain', :inline => 'true'}}
|
||||||
= search_field_tag :q, nil, :placeholder => t('find_people'), :class => 'search'
|
= search_field_tag :q, nil, :placeholder => t('find_people'), :class => 'search'
|
||||||
= submit_tag t('search'), 'data-inline' => 'true', :class => 'btn'
|
= submit_tag t('search'), 'data-inline' => 'true', :class => 'btn'
|
||||||
|
|
|
||||||
|
|
@ -21,3 +21,7 @@ end
|
||||||
When /^I visit the mobile getting started page$/ do
|
When /^I visit the mobile getting started page$/ do
|
||||||
visit('/getting_started.mobile')
|
visit('/getting_started.mobile')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
When /^I visit the mobile search page$/ do
|
||||||
|
visit('/people.mobile')
|
||||||
|
end
|
||||||
|
|
|
||||||
15
features/tags_mobile.feature
Normal file
15
features/tags_mobile.feature
Normal file
|
|
@ -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"
|
||||||
Loading…
Reference in a new issue