Skip to content
This repository has been archived by the owner on May 1, 2019. It is now read-only.

Enhancement: Also search by owner, split query into words #394

Merged
merged 12 commits into from
Feb 19, 2015

Conversation

localheinz
Copy link
Member

This PR

  • cleans up ZfModule\Mapper\Module a bit
  • improves the search by not only looking for matches in name and description, but also in owner
  • improves the search by exploding the search query by and using the parts for searching

Fixes #153.

Searching by owner

Before

screen shot 2015-02-18 at 10 34 59

After

screen shot 2015-02-18 at 15 50 43

Searching with multiple words

Before

screen shot 2015-02-18 at 15 22 18

After

screen shot 2015-02-18 at 15 49 50

Display of vendor/package vs just package

Before

screen shot 2015-02-18 at 15 44 55

After

screen shot 2015-02-18 at 15 43 35

@localheinz localheinz force-pushed the feature/search branch 2 times, most recently from 4be0604 to 54167b9 Compare February 18, 2015 09:26
@localheinz localheinz changed the title [WIP] Enhancement: Also search by vendor [WIP] Enhancement: Also search by owner Feb 18, 2015
/* @var Sql\Where $where */
$where
->like('name', $like)
->or
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

urgh

(Yes, I know that's how you do it with Zend\Db :-( )

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahah migration to doctrine in this moment is unthinkable :P

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Ocramius

Harhar! Yes, it's ugly.

@gianarb

Happy to migrate to Doctrine!

Things we could benefit from, then:

@localheinz
Copy link
Member Author

/cc @markushausammann

@localheinz localheinz changed the title [WIP] Enhancement: Also search by owner Enhancement: Also search by owner, split query into words Feb 18, 2015
@markushausammann
Copy link

nice!

@markushausammann
Copy link

But actually di wrapper should show the package di-wrapper, which it still doesn't seem to do according to the screenshot.

@localheinz
Copy link
Member Author

@markushausammann

Not sure if it's there, hang on a minute.

@localheinz
Copy link
Member Author

@markushausammann

I didn't have it in my local copy of the database, sorry!

@localheinz
Copy link
Member Author

Also made some adjustments to the way modules are displayed. I think it makes a lot more sense to always display vendor and package, not just the package name.

@markushausammann
Copy link

Ok, sounds good, looking forward to seeing it live.

@@ -22,10 +22,9 @@
<div class="col-xs-7 col-sm-6">
<p>
<a href="<?php echo $this->url('view-module', ['vendor' => $this->escapeUrl($module->getOwner()), 'module' => $this->escapeUrl($module->getName())]) ?>">
<strong><?php echo $this->escapeHtml($module->getName()) ?></strong>
<strong><?php echo $this->escapeHtml($module->getOwner()); ?>/<?php echo $this->escapeHtml($module->getName()); ?></strong>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moduleName helper ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@snapshotpl

Actually, what I would like to do would be a simplification of displaying an item, this definitely shouldn't be repeated all over the place!

You know, a module should probably have no more than two public views

  • side bar
  • results (and the live-search thingy)

However, in reality I would even want to go as far as to have a search similar to what all of you know from packagist, what do you think?

@Ocramius
Copy link
Member

Needs a rebase

@localheinz
Copy link
Member Author

@Ocramius

Rebased, waiting for the build to pass.

Ocramius added a commit that referenced this pull request Feb 19, 2015
Enhancement: Also search by owner, split query into words
@Ocramius Ocramius merged commit 6c9c269 into zendframework:master Feb 19, 2015
@Ocramius
Copy link
Member

@localheinz awesome, merged! \o/

@localheinz localheinz deleted the feature/search branch February 19, 2015 10:46
@localheinz
Copy link
Member Author

Thanks a lot, @Ocramius!

I'm very happy to move forward with this thing!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Search doesn't work good enough given it's the only way to find things
5 participants