feat: search in quick actions #943
No reviewers
Labels
No Label
area/internal-code
changes requested
confirmed
dependencies
duplicate
good first issue
help wanted
hosting
invalid
kind/bug
kind/feature
question
wontfix
No Milestone
No project
No Assignees
3 Participants
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: vikunja/frontend#943
Loading…
Reference in New Issue
No description provided.
Delete Branch "feature/search-in-quick-actions"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR enhances the global search bar adds support for the quick add magic filters to scope the search.
Related discussion: https://community.vikunja.io/t/searching-for-a-specific-task-within-a-specific-list/280
@ -125,1 +123,3 @@
lists = (allLists.filter(l => {
const {list} = this.parsedQuery
lists = list === null ? [] : (allLists.filter(l => {
There is too much happening in this tenary which makes it hard to read.
I've moved one out, hope it is clearer now.
@ -236,18 +238,23 @@ export default {
return cmds
},
parsedQuery() {
nice!
@ -285,1 +311,4 @@
}
}
this.taskSearchTimeout = setTimeout(async () => {
Having this timeout deep hidden inside the searchTasks makes it hard to follow.
We should use a common pattern debounce for these cases.
@ -317,2 +341,4 @@
const {assignees} = this.parsedQuery
this.teamSearchTimeout = setTimeout(async () => {
Not happy with this deep nesting here (hard to follow what happens).
Tried to untangle it a bit with async, but still not happy (untested):
While working on this I always had to think of proposal pipeline operator...
Then I found https://www.freecodecamp.org/news/pipe-and-compose-in-javascript-5b04004ac937/ 🤔 😆
Maybe we could use something like this: https://vueuse.org/shared/useDebounceFn/#usage
That component is a prime candidate for using the composition api.
Let's do this later in another issue =)
For now: what do you think about the above as a temporary solution?
I think that makes sense, refactored it.
@ -48,0 +48,4 @@
getLabelsByExactTitles(state) {
return labelTitles => Object
.values(state.labels)
.filter(({title}) => {
Done.
Hi konrad!
Thank you for creating a PR!
I've deployed the changes of this PR on a preview environment under this URL: https://943-featuresearch-in-quick-actions--vikunja-frontend-preview.netlify.app
You can use this url to view the changes live and test them out.
You will need to manually connect this to an api running somehwere. The easiest to use is https://try.vikunja.io/.
Have a nice day!