feat: unified search#6243
Conversation
278e4ba to
0dd4d80
Compare
0dd4d80 to
85ed9f6
Compare
85ed9f6 to
d8263f7
Compare
| $qb = $this->getFilesAssociatedFilesWithMeQueryBuilder($user->getUID(), $filter, false, $sort); | ||
|
|
||
|
|
||
| $qb->orderBy('f.created_at', 'DESC'); |
There was a problem hiding this comment.
Remove, it is no longer necessary. Row: 434
d8263f7 to
cc89ce6
Compare
|
I made a rebase with main branch to fix conflicts, only this. |
585b325 to
608a303
Compare
| $qb = $this->getFilesAssociatedFilesWithMeQueryBuilder($user->getUID(), $filter, false, $sort); | ||
|
|
||
|
|
||
| $qb->orderBy('f.created_at', 'DESC'); |
There was a problem hiding this comment.
Look, now the $sort is sent at row 431 but here is defined again. This row should be removed now
| $qb->orderBy('f.created_at', 'DESC'); |
| } | ||
|
|
||
| private function getFilesAssociatedFilesWithMeQueryBuilder(string $userId, array $filter = [], bool $count = false): IQueryBuilder { | ||
| private function getFilesAssociatedFilesWithMeQueryBuilder(string $userId, array $filter = [], bool $count = false, array $sort = []): IQueryBuilder { |
There was a problem hiding this comment.
When a function has many arguments, it's advisable to split them into multiple rows. This approach preserves the git log, allowing changes related to added or removed arguments to be clearer and more isolated. If all arguments are on a single line, adding or removing an argument can lead to a commit that alters the entire line. Consequently, running git blame will not make it easy to see changes related to individual arguments.
| private function getFilesAssociatedFilesWithMeQueryBuilder(string $userId, array $filter = [], bool $count = false, array $sort = []): IQueryBuilder { | |
| private function getFilesAssociatedWithMeQueryBuilder( | |
| string $userId, | |
| array $filter = [], | |
| bool $count = false, | |
| array $sort = [], | |
| ): IQueryBuilder { |
|
|
||
| $searchResultEntry = new SearchResultEntry( | ||
| $thumbnailUrl, | ||
| $file->getName() ?? $this->l10n->t('Unnamed document'), |
There was a problem hiding this comment.
Name is mandatory
| $file->getName() ?? $this->l10n->t('Unnamed document'), | |
| $file->getName(), |
| } | ||
|
|
||
| private function formatResult(File $file, IUser $user): SearchResultEntry { | ||
| $userFolder = $this->rootFolder->getUserFolder($user->getUID()); |
There was a problem hiding this comment.
| $userFolder = $this->rootFolder->getUserFolder($user->getUID()); | |
| $userFolder = $this->rootFolder->getUserFolder($file->getUserId()); |
3a213a2 to
2337ff9
Compare
Signed-off-by: Crisciany Souza <crisciany.souza@librecode.coop>
Signed-off-by: Crisciany Souza <crisciany.souza@librecode.coop>
Signed-off-by: Crisciany Souza <crisciany.souza@librecode.coop>
Signed-off-by: Crisciany Souza <crisciany.souza@librecode.coop>
Signed-off-by: Crisciany Souza <crisciany.souza@librecode.coop>
7bb8e56 to
a4a76d9
Compare
|
/backport to stable32 |
|
/backport to stable31 |
Issue: #6027
✨ Features
Global Search Integration: Documents can now be found using Nextcloud's unified search
Smart Filtering: Search by document name with automatic filtering
Rich Results: Display document thumbnails, file paths, and signature status
Status Labels: Show document status (Draft, Able to sign, Partially signed, Signed, Deleted)
Dynamic Icons: Automatically detect and display appropriate MIME type icons
Pagination Support: Handle large result sets efficiently