-
-
Notifications
You must be signed in to change notification settings - Fork 46
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
add Nextcloud 20 unified searching #344
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @dassio
Thank you very much for the contribution.
Most of the comments are due bad styles.. but first I would recommend that you try to divide the PR in two.
One PR to support NC20.
- Please make sure it works. You tested?
- You still have to enable the version!. https://github.com/matiasdelellis/facerecognition/blob/master/appinfo/info.xml#L40
- Make sure they pass the tests. Add NC 20 https://github.com/matiasdelellis/facerecognition/blob/master/.travis.yml#L23-L25
Another PR for unified search.
- I think it is a good feature of NC20, but I think it is not intended to return all photos of a person.
- It should return the persons that you found, and if you click them, show the photos.
- For this feature, you may want to wait that i finish the person view on PR Bye bye 'New person..' #336
Hi @dassio
No. The unified search, which allows is to unify the search framework among all the applications!. 😅 Can you imagine that happend if you rename your files to mom_***. Jpg, and files return 5000 files and facerecognition shows you another 5000?. It is completely insane. 🙈 😅 That said, I insist on only showing a link to the person within our application. 😬
Example.. |
Hi @matiasdelellis yes, it would be better to have a link to the personal setting page, i will update on that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow.. Much better .. Thanks again. 😄
Tomorrow I'll merge #336 and you should rebase on it to reuse a lot of code.
Sorry if I'm annoying.. 🙈 😅
Signed-off-by: xiangbin.li <dassio@icloud.com>
Signed-off-by: xiangbin.li <dassio@icloud.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @dassio
Great!!!. 😄 😃 😬 😁 😀 🎉
Last change that I will ask you, and after testing we can merge it. 😀
array_map(function (Person $result) { | ||
$personName = $result->getName(); | ||
return new SearchResultEntry( | ||
$this->urlGenerator->imagePath('facerecognition','avatar.webp'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$this->urlGenerator->imagePath('facerecognition','avatar.webp'), | |
'' |
Don't add a new icon, just use the application icon at least in this stage..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
p.s: The main reason is that bitmap icons don't adapt on dark themes. 😅
$personName, | ||
'', | ||
$this->urlService->getRedirectToPersonUrl($personName), | ||
'', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'', | |
'icon-facerecognition', |
This parameter is the class of the icon... 😉
MM.. You must include the icon as:
facerecognition/css/facerecognition.scss
Lines 5 to 7 in b26f39a
.icon-back { | |
@include icon-color('back', 'facerecognition', $color-black); | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.icon-facrecognition {
@include icon-color('app-dark', 'facerecognition', $color-black);
}
@@ -120,12 +120,12 @@ public function getRedirectToFileUrl(int $fileId) { | |||
/** | |||
* Redirects to the facerecognition page to show photos of an person. | |||
* | |||
* @param int $personId person id to show | |||
* @param string $personName person id to show |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch.. 😬
Ok.. I'm already testing NC19, and it still seems to work fine .. 😄 |
Hi @dassio |
Dear all, I'm really glad you worked out the unified search! |
Hi @dassio I take your work and I'm about to publish it. 😬 https://services.delellis.com.ar/data/facerecognition/facerecognition.tar.gz Please, test. just replace them in the apps/facerecognition folder with this. Thanks for all again. 😄 |
Merged in last release.. Thanks again.. 😄 |
nextcloud change the search mechanism , using an unified search . app has to provide an class that implements
IProvider
interface