Uh oh!
There was an error while loading. Please reload this page.
Emit unified search query - #22526
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
skjnldsv
left a comment
There was a problem hiding this comment.
Thanks for taking care of this! 🚀
See comments :)
skjnldsv
commented
Sep 1, 2020
Let's address that in a followup, nice catch! |
georgehrke
commented
Sep 1, 2020
@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. |
raimund-schluessler
commented
Sep 1, 2020
Hm, I don't often contribute to server, sorry. I will try to fix this. |
skjnldsv
commented
Sep 1, 2020
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 :) |
raimund-schluessler
commented
Sep 1, 2020
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
88a2ad3Compareraimund-schluessler
commented
Sep 1, 2020
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 |
skjnldsv
commented
Sep 2, 2020
/compile amend / |
Signed-off-by: Raimund Schlüßler <raimund.schluessler@mailbox.org> Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
88a2ad3 to
7abfaadCompareskjnldsv
commented
Sep 2, 2020
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):

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.