wip: feat: abstract NotificationItem in dedicated component #2681
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#2681
Loading…
Reference in New Issue
No description provided.
Delete Branch "dpschen/frontend:feature/abstract-NotificationItem-component"
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?
22155d1e14
toc6ff4e4dee
Hi dpschen!
Thank you for creating a PR!
I've deployed the changes of this PR on a preview environment under this URL: https://2681-feature-abstract-notificationite--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!
@ -0,0 +64,4 @@
// Nothing
break
case NOTIFICATION_NAMES.LIST_CREATED:
to.name = 'task.index'
Shouldn't this be
list.index
? (not sure if the route is actually called that)This name is correct.
@ -0,0 +83,4 @@
switch (props.notification.name) {
case NOTIFICATION_NAMES.TASK_COMMENT:
return `commented on ${getTextIdentifier(notification.task)}`
I wonder if we can translate these but that's for another PR.
Yes, saw that too!
I added translations
@ -54,4 +36,1 @@
import BaseButton from '@/components/base/BaseButton.vue'
import User from '@/components/misc/user.vue'
import { NOTIFICATION_NAMES as names, type INotification} from '@/modelTypes/INotification'
import {closeWhenClickedOutside} from '@/helpers/closeWhenClickedOutside'
If vueuse has a helper like ours, do we even need ours?
No, I'm replacing ours piece by piece.
Not all vueuse composables are perfect though.
E.g. there is one
useTextareaAutosize
, but it e.g. doesn't cover the case where the textarea scales with the width of the window. So we should be careful. TheonClickoutside
seems well written though!Looks like this broke the notifications :/
On current main:
Tricky to debug, if you don't have notifications. Histoire would help here 🤔
c6ff4e4dee
to2f576e5006
The import of the new component was missing. I hope that was it.
Now there's this message:
and it uses up all cpu ressource, making the browser unusable.
Can you add a cypress test for this?
2f576e5006
tod99441d72e
Now it seems to kind of work (at least it does not crash) but marking notifications as read seems broken.
d99441d72e
to83297039a9
Can you fix the lint errors?
83297039a9
to8969ddd831
I fixed the lint errors.
Regarding the cypress tests:
Do you really think that's necessary here.
I think it would help more if we would have historie to test these kind of components in isolation. This way I could test all the message types without the need to manipulating anything in the backend.
c737242627
toe66a8c69f3
I think having more tests is always a good thing. In this PR it would have helped because you wouldn't need to first create actions which led to notifitications to see if the notification component works. Having a test would automate that and yield faster feedback. Sure, histoire would be nice but we don't have it right now.
e66a8c69f3
to9fe0b5b766
Since cypress still doesn't work for me locally (I also didn't try anymore to fix that though) the feedbackloop for me is insane long. That's mostly why I try to avoid writing cypress tests right now.
I guess I could almost add histoire in the time I wait for cypress to run through :D
Also: this should all work now.
Looks like no notifications are show now :/
I was lying
9fe0b5b766
to2581c88626
Still no notifications :/
Yes. I rebased this so that I could debug it better.
Still on this. I might need your help for realistic notification example data.
feat: abstract NotificationItem in dedicated componentto wip: feat: abstract NotificationItem in dedicated component2581c88626
toc0ca76fccf