feat: migrate kanban card to script setup #2459

Merged
konrad merged 3 commits from feature/kanban-card-script-setup into main 2022-10-03 13:17:05 +00:00
Owner
No description provided.
konrad added 1 commit 2022-10-02 10:29:17 +00:00
continuous-integration/drone/pr Build is passing Details
a5925baff0
feat: migrate kanban card to script setup
konrad requested review from dpschen 2022-10-02 10:29:20 +00:00
dpschen was assigned by konrad 2022-10-02 10:29:26 +00:00
Member

Hi konrad!

Thank you for creating a PR!

I've deployed the changes of this PR on a preview environment under this URL: https://2459-feature-kanban-card-script-setup--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 konrad! Thank you for creating a PR! I've deployed the changes of this PR on a preview environment under this URL: https://2459-feature-kanban-card-script-setup--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 added 2 commits 2022-10-03 10:35:29 +00:00
dpschen reviewed 2022-10-03 10:40:16 +00:00
@ -29,3 +29,3 @@
}
export function getHexColor(hexColor: string) {
export function getHexColor(hexColor: string): string {

Asking because I want to learn here:
I don't know the best practise for here: Does this make sense to add here?
Wouldn't the string return type automatically be implied by the returns in the function?
Asking because it feels similar to when you type a variable using varXY as MyType which I heared is often a last resort to use, similar to using any.

Asking because I want to learn here: I don't know the best practise for here: Does this make sense to add here? Wouldn't the string return type automatically be implied by the returns in the function? Asking because it feels similar to when you type a variable using `varXY as MyType` which I heared is often a last resort to use, similar to using `any`.
Author
Owner

I think it would get implied, yes. The reason I added it here was because I added it to the ITask interface and that has no way of infering a return type because there's nothing to return.

I think it would get implied, yes. The reason I added it here was because I added it to the `ITask` interface and that has no way of infering a return type because there's nothing to return.
Member

I saw that you added getHexColor to the ITask interface.

I undid this because:
When we want to use zod later we can't use methods on models. Or at least that's more an antipattern. So I already started to port some methods from models to exported named functions, for example getAvatarUrl and getDisplayName in the UserModel.

I saw that you added `getHexColor` to the ITask interface. I undid this because: When we want to use zod later we can't use methods on models. Or at least that's more an antipattern. So I already started to port some methods from models to exported named functions, for example `getAvatarUrl` and `getDisplayName` in the UserModel.
dpschen approved these changes 2022-10-03 10:43:59 +00:00
konrad was assigned by dpschen 2022-10-03 10:44:43 +00:00
dpschen removed their assignment 2022-10-03 10:44:49 +00:00
Author
Owner

I saw that you added getHexColor to the ITask interface.

I undid this because:
When we want to use zod later we can't use methods on models. Or at least that's more an antipattern. So I already started to port some methods from models to exported named functions, for example getAvatarUrl and getDisplayName in the UserModel.

I added the method because I wanted to be able to call it in the kanban card where everything was type hinted with the interface only - but the interface did not have the method. If we'll be removing the function from the model anyway I think it's fine to remove it.

> I saw that you added `getHexColor` to the ITask interface. > > I undid this because: > When we want to use zod later we can't use methods on models. Or at least that's more an antipattern. So I already started to port some methods from models to exported named functions, for example `getAvatarUrl` and `getDisplayName` in the UserModel. I added the method because I wanted to be able to call it in the kanban card where everything was type hinted with the interface only - but the interface did not have the method. If we'll be removing the function from the model anyway I think it's fine to remove it.
konrad merged commit 3e21a8ed6e into main 2022-10-03 13:17:05 +00:00
konrad deleted branch feature/kanban-card-script-setup 2022-10-03 13:17:05 +00:00
This repo is archived. You cannot comment on pull requests.
No description provided.