feat: quick-actions script setup #2478

Merged
konrad merged 1 commits from dpschen/frontend:feature/quick-actions-script-setup into main 2022-10-27 21:10:29 +00:00
Member
No description provided.
dpschen added the
area/internal-code
label 2022-10-03 22:06:09 +00:00
dpschen force-pushed feature/quick-actions-script-setup from 92e6dbc126 to f5826456c8 2022-10-03 22:17:00 +00:00 Compare
Member

Hi dpschen!

Thank you for creating a PR!

I've deployed the changes of this PR on a preview environment under this URL: https://2478-feature-quick-actions-script-set--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!

Beep boop, I'm a bot.

Hi dpschen! Thank you for creating a PR! I've deployed the changes of this PR on a preview environment under this URL: https://2478-feature-quick-actions-script-set--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! > Beep boop, I'm a bot.
konrad reviewed 2022-10-04 11:29:22 +00:00
@ -234,0 +246,4 @@
const placeholder = computed(() => selectedCmd.value?.placeholder || t('quickActions.placeholder'))
const currentList = computed(() => Object.keys(baseStore.currentList).length === 0

Isn't the currentList in the store either null or defined?

Isn't the `currentList` in the store either `null` or defined?
Author
Member

It should be. I actually don't get why you check the length here. This is ported directly from the options version. There it was:

		currentList() {
			const currentList = useBaseStore().currentList
			return Object.keys(currentList).length === 0 ? null : currentList
		},

of before:

		currentList() {
			return Object.keys(this.$store.state[CURRENT_LIST]).length === 0 ? null : this.$store.state[CURRENT_LIST]
		},

Why does this check for the keys length?

It should be. I actually don't get why you check the length here. This is ported directly from the options version. There it was: ```js currentList() { const currentList = useBaseStore().currentList return Object.keys(currentList).length === 0 ? null : currentList }, ``` of before: ```js currentList() { return Object.keys(this.$store.state[CURRENT_LIST]).length === 0 ? null : this.$store.state[CURRENT_LIST] }, ``` Why does this check for the keys length?

I don't know, does the git log say anything useful?

I don't know, does the git log say anything useful?
@ -296,2 +321,3 @@
type Filter = {by: string, value: string | number, comparator: string}
const {text, list, labels} = this.parsedQuery
function filtersToParams(filters: Filter[]) {

I wonder if we could extract and reuse this function?

I wonder if we could extract and reuse this function?
Author
Member

Yes! I have already some ideas to make this better. Here I mostly wanted to port it to typescript. I created this in order to have more overview in the file.

Yes! I have already some ideas to make this better. Here I mostly wanted to port it to typescript. I created this in order to have more overview in the file.
dpschen changed title from WIP: feat: quick-actions script setup to feat: quick-actions script setup 2022-10-27 14:15:31 +00:00
dpschen requested review from konrad 2022-10-27 14:15:38 +00:00
konrad was assigned by dpschen 2022-10-27 14:15:42 +00:00
konrad merged commit 386fd79b49 into main 2022-10-27 21:10:29 +00:00
konrad deleted branch feature/quick-actions-script-setup 2022-10-27 21:10:29 +00:00
This repo is archived. You cannot comment on pull requests.
No description provided.