WIP: feat: create KanbanBucket from ListKanban #1571

Closed
dpschen wants to merge 3 commits from dpschen/frontend:feature/feat-kanban-bucket-component into main
Member

By removing the bucket form ListKanban we can reduce the complexity a lot.

This is still work-in-progress. Most stuff should work.
This might currently not work, but mostly because a small rebase is needed.

The biggest open task is migrating the saveCollapsedBucketState.
=> will solve this in a future pull request

TODO:

  • Also add these changes: #2634
By removing the bucket form ListKanban we can reduce the complexity a lot. ~~This is still work-in-progress. Most stuff should work.~~ This might currently not work, but mostly because a small rebase is needed. The biggest open task is migrating the saveCollapsedBucketState. => will solve this in a future pull request ## TODO: - [ ] Also add these changes: https://kolaente.dev/vikunja/frontend/pulls/2634
dpschen added the
area/internal-code
label 2022-02-18 12:28:04 +00:00
konrad requested changes 2022-02-19 21:41:45 +00:00
@ -0,0 +16,4 @@
const MIN_SCROLL_HEIGHT_PERCENT = 0.25
const props = defineProps<{
bucketIndex: number

number or Number? (What is the difference between them?)

`number` or `Number`? (What is the difference between them?)
Author
Member
`number` is the Typescript **type** of number, while `Number` is a [primitive object wrapper](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number). See: https://www.typescriptlang.org/docs/handbook/declaration-files/do-s-and-don-ts.html#number-string-boolean-symbol-and-object
dpschen marked this conversation as resolved
@ -0,0 +17,4 @@
const props = defineProps<{
bucketIndex: number
isCollapsed: boolean

Does this need to be a prop? Since we now have everything bucket-related in a single component, shouldn't it be enough to use a ref?

Does this need to be a prop? Since we now have everything bucket-related in a single component, shouldn't it be enough to use a ref?
Author
Member

Yes and no. Since we currently save the collapsed state of the whole list, when a bucket collapses we need to change that in order to make this bucket specific. I'm still working on this, this is one of the reasosn this is still WIP.

Yes and no. Since we currently save the collapsed state of the whole list, when a bucket collapses we need to change that in order to make this bucket specific. I'm still working on this, this is one of the reasosn this is still WIP.
Author
Member

If we want to let's refactor this in a future pull request.
Want to keep this pull request as simple as possible.
Main target was to separate KanbanBucket from ListKanban

If we want to let's refactor this in a future pull request. Want to keep this pull request as simple as possible. Main target was to separate KanbanBucket from ListKanban
dpschen marked this conversation as resolved
@ -0,0 +24,4 @@
dragOptions: Object
params: Object
shouldAcceptDrop: boolean
isDraggingTask: boolean

Does this need to be a prop?

Does this need to be a prop?
Author
Member

Will check

Will check
Author
Member

Maybe. But let's go the same way as with #1571 (comment)

Maybe. But let's go the same way as with https://kolaente.dev/vikunja/frontend/pulls/1571#issuecomment-30384
dpschen marked this conversation as resolved
@ -0,0 +164,4 @@
}
</script>
<template>

Could you add the <template> before the <script>? Just to keep it consistent.

Could you add the `<template>` before the `<script>`? Just to keep it consistent.
Author
Member

I was following here the new recommended order. See https://eslint.vuejs.org/rules/component-tags-order.html

When we enable the new settings this will change everywhere.

I was following here the new recommended order. See https://eslint.vuejs.org/rules/component-tags-order.html When we enable the new settings this will change everywhere.

Doesn't the doc you linked say switching <template> and <script> blocks as long as the <style> tag comes last is allowed?

Doesn't the doc you linked say switching `<template>` and `<script>` blocks as long as the `<style>` tag comes last is allowed?
Author
Member

Fromt reading it seems like it, strange!
Because when I ran #930 this reordering was applied automatically.

I will change it back for this pull request. If #930 changes it we'll handle it there.

Fromt reading it seems like it, strange! Because when I ran https://kolaente.dev/vikunja/frontend/pulls/930 this reordering was applied automatically. I will change it back for this pull request. If https://kolaente.dev/vikunja/frontend/pulls/930 changes it we'll handle it there.
dpschen marked this conversation as resolved
@ -621,1 +315,4 @@
}
</style>
<style lang="scss">

Please merge the two <style> tags since they are the same

Please merge the two `<style>` tags since they are the same
dpschen marked this conversation as resolved
@ -773,2 +370,2 @@
}
}
.new-bucket {
// Because of reasons, this button ignores the margin we gave it to the right.

Now that I read that comment again, I feel like this might have something to do with margin collapse...

Now that I read that comment again, I feel like this might have something to do with margin collapse...
Author
Member

I will recheck the styles =)

I will recheck the styles =)
Author
Member

Let's do this in an additional pull request. I want to refactor all these components either way. For now I just wanted to separate the logic. Makes future steps simpler.

Let's do this in an additional pull request. I want to refactor all these components either way. For now I just wanted to separate the logic. Makes future steps simpler.
dpschen marked this conversation as resolved
dpschen force-pushed feature/feat-kanban-bucket-component from 940938c65a to 4f25e18c38 2022-05-11 00:10:33 +00:00 Compare
dpschen requested review from konrad 2022-05-11 00:10:43 +00:00
dpschen changed title from WIP: feat: create KanbanBucket from ListKanban to feat: create KanbanBucket from ListKanban 2022-05-11 00:10:51 +00:00
dpschen force-pushed feature/feat-kanban-bucket-component from 4f25e18c38 to 7886515193 2022-05-11 01:08:40 +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://1571-feature-feat-kanban-bucket-compo--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://1571-feature-feat-kanban-bucket-compo--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.
dpschen force-pushed feature/feat-kanban-bucket-component from 7e963d3c8e to dfe3356df3 2022-05-19 20:14:28 +00:00 Compare
Author
Member

This is currently out of date, but was working already.
I'm not sure if I should update this if we don't merge it then?

This is currently out of date, but was working already. I'm not sure if I should update this if we don't merge it then?
Owner

I think this would be a good thing to have. If you want to continue working on this, I'd appreciate a rebase.

I think this would be a good thing to have. If you want to continue working on this, I'd appreciate a rebase.
dpschen force-pushed feature/feat-kanban-bucket-component from dfe3356df3 to 244b5318c1 2022-10-27 14:40:41 +00:00 Compare
dpschen force-pushed feature/feat-kanban-bucket-component from 244b5318c1 to 0750839e64 2022-10-27 14:51:03 +00:00 Compare
dpschen force-pushed feature/feat-kanban-bucket-component from 0750839e64 to d6970bdd6d 2022-10-27 14:53:54 +00:00 Compare
Owner

Trying to do anything on the kanban board returns this error:

image

Trying to do anything on the kanban board returns this error: ![image](/attachments/f9d56908-0c1a-4423-ac21-30cf12e60f02)
4.4 KiB
dpschen changed title from feat: create KanbanBucket from ListKanban to WIP: feat: create KanbanBucket from ListKanban 2022-10-28 11:58:51 +00:00
Author
Member

Trying to do anything on the kanban board returns this error:

image

Yes, sry this was working once, but I need to make it work again. I rebased it to get a better understanding of the diff. But it's not yet functional again.

> Trying to do anything on the kanban board returns this error: > > ![image](/attachments/f9d56908-0c1a-4423-ac21-30cf12e60f02) Yes, sry this was working once, but I need to make it work again. I rebased it to get a better understanding of the diff. But it's not yet functional again.
Owner

Closing this as it appears stale.

Please rebase and reopen if you think this is still relevant.

Closing this as it appears stale. Please rebase and reopen if you think this is still relevant.
konrad closed this pull request 2023-10-22 17:41:54 +00:00
This repo is archived. You cannot comment on pull requests.
No description provided.