-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Emit unified search query #22526
Emit unified search query #22526
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.
Thanks for taking care of this! 🚀
See comments :)
Let's address that in a followup, nice catch! |
@raimund-schluessler Looks like you committed the js files in dev mode. Please compile in production mode. |
@skjnldsv I now wonder whether we should better watch: {
query(query, oldQuery) {
if (query !== oldQuery) {
debounce(() => {
emit('nextcloud:unified-search', { query: this.query })
}, 200)
}
},
}, We would be sure to really catch every change of query, even if it will be changed somewhere else in the future. |
Hm, I don't often contribute to server, sorry. I will try to fix this. |
Well, we are catching any query change. You cannot change it from the outside (not sure we should). Unless you encountered some performance/usability issues, but I didn't :) |
No, usability wise, I think it is ok. I just wondered whether it would be cleaner to only emit at a single place instead of in different methods. But I am fine either way. |
efe6f75
to
88a2ad3
Compare
I think I fixed it. However, the Node build fails, and I don't know why. It tells me there are uncommited changes. I also see them when I run |
/compile amend / |
Signed-off-by: Raimund Schlüßler <[email protected]> Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
88a2ad3
to
7abfaad
Compare
Yes, maybe master have an issue 🤷 |
🤖 beep boop beep 🤖 Here are the logs for the failed build: Status of 32553: failureacceptance-header
Show full log
|
So, I should commit all files which are generated by Edit: I guess |
This PR emits a global event when the unified search is started or reset. Apps can use this to filter their content.
For the Tasks app this looks like this (with nextcloud/tasks#1202):
![search](https://user-images.githubusercontent.com/2496460/91761168-c04bab00-ebd4-11ea-9d00-bd84a75d820c.gif)
A problem might be that the search is not persistent, as soon as the unified search input is closed, the filtering is reset. But this is by design of the search input, so I guess there is not much to do.