Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set node.icon based on tagging, rather than node.type, for display in search results #207

Closed
ebarry opened this issue Feb 17, 2015 · 7 comments
Labels
help wanted requires help by anyone willing to contribute outreach issues involve community involvement and helping people who're stuck somewhere Ruby
Milestone

Comments

@ebarry
Copy link
Member

ebarry commented Feb 17, 2015

@steviepubliclab noticed this because not all place pages have "flag" icons in search results. We think the various icons are helpful in search results for users just getting acquainted with the Public Lab community.

so perhaps, have the icons made “all same” or rejigger them to be based on tagging rather than intrinsic/Drupal node type.

@ebarry ebarry added the outreach issues involve community involvement and helping people who're stuck somewhere label Feb 17, 2015
@jywarren
Copy link
Member

To clarify, this is in autocomplete results, right, not on http://publiclab.org/search ?
If so, I think the relevant code section is here: https://github.com/publiclab/plots2/blob/master/app/controllers/search_controller.rb#L26-L41

@ebarry
Copy link
Member Author

ebarry commented Feb 17, 2015

it's on /search too. Shown here searching for "gulf coast", the Gulf Coast place page correctly has a flag icon. @steviepubliclab noticed that not all place pages have that, such as Chicago. This is something that lowers the functionality of our search.
screen shot 2015-02-17 at 5 19 43 pm

screen shot 2015-02-17 at 5 22 19 pm

@jywarren
Copy link
Member

by /search i meant the full page results, like when you press enter for a
search term without selecting an autocomplete result; this is autocomplete
search only.

I believe the other place these show up is in sidebar results. There may be
code in /app/models/drupal_node.rb that specifies icons; we should
centralize that code.

On Tue, Feb 17, 2015 at 5:21 PM, Liz Barry notifications@github.com wrote:

it's on /search too. Shown here searching for "gulf coast", the Gulf Coast
place page correctly has a flag icon. @steviepubliclab
https://github.com/steviepubliclab noticed that not all place pages
have that. This is something that lowers the functionality of our search.
[image: screen shot 2015-02-17 at 5 19 43 pm]
https://cloud.githubusercontent.com/assets/161439/6238484/57c6dd66-b6c9-11e4-92ad-e41b1c9ef29f.png


Reply to this email directly or view it on GitHub
#207 (comment).

@jywarren jywarren modified the milestone: 2.1 release Apr 1, 2015
@jywarren
Copy link
Member

Note: this should use node.has_tag() as in https://github.com/publiclab/plots2/blob/master/app/models/drupal_node.rb#L298

Also a good chance to refactor node.is_place() to use has_tag: https://github.com/publiclab/plots2/blob/master/app/models/drupal_node.rb#L221

@jywarren jywarren added the help wanted requires help by anyone willing to contribute label Mar 10, 2016
@jywarren jywarren changed the title icons in search results set node.icon based on tagging, rather than node.type, for display in search results Mar 16, 2016
@jywarren jywarren added the Ruby label Mar 17, 2016
@ananyo2012
Copy link
Member

@jywarren Please review the fix for this Issue.

@ananyo2012
Copy link
Member

ananyo2012 commented May 13, 2016

@jywarren One thing I couldn't figure out--How is the node type for certain places set to "place" for certain places? and how is the path set to /place/xyz since I don't see anything for setting the path for a "place" type in the generate_path method in drupal_node model.

@jywarren
Copy link
Member

"place" used to be a type of node, but we've deprecated those as much as possible in favor of simply using wiki pages. It'd be good to go through and thoroughly clean out that older system, and migrate any "place" nodes to "page" nodes.

generate_path is only run on new nodes, so since "place" type nodes a no longer created, they only have that path because path is saved in the record itself... so it's for legacy reasons.

Thanks for fixing this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted requires help by anyone willing to contribute outreach issues involve community involvement and helping people who're stuck somewhere Ruby
Projects
None yet
Development

No branches or pull requests

3 participants