karrot-frontend icon indicating copy to clipboard operation
karrot-frontend copied to clipboard

activity.feedbackDismissedBy is a list of users, could be a boolean?

Open tiltec opened this issue 4 years ago • 4 comments

I noticed that activity.feedbackDismissedBy is a list of users that already dismissed the feedback for this activity, but the frontend only needs to know if the current user dismissed the feedback (to determine if the prompt should be shown or not).

backend: https://github.com/yunity/karrot-backend/blob/0fd4f36e6e7964877f1afab2070ab0387b33466c/karrot/activities/serializers.py#L195-L197

frontend: https://github.com/yunity/karrot-frontend/blob/8c3122a93f330ecae426c9657ca5006ea81a0cd3/src/activities/datastore/activities.js#L66

As far as I'm concerned, it would be cleaner to make this into a boolean (e.g. isFeedbackDismissed) - less information transferred, less enriching/filtering work in frontend.

Is there any reason to keep the current behavior?

tiltec avatar Jun 12 '21 19:06 tiltec

@tiltec this was a PR from the Freiburg group. I think we did it this way because we copy/pasted. I don't remember exactly. I totally see your point. I have no clue about the backend. Maybe @pogopaule? For the frontend, this would mean we could ditch the enrichment of feedbackDismissedBy and the filter then would be like this?

.filter(p => !p.isFeedbackDismissed) 

larzon83 avatar Jun 13 '21 08:06 larzon83

This issue is marked as stale because it has not had any activity for 90 days.

It doesn't mean it's not important, so please remove the stale label if you like it, or add a comment saying what it means to you :)

However, if you just leave it like this, I'll close it in 7 days to help keep your issues tidy!

Thanks!

github-actions[bot] avatar Sep 12 '21 00:09 github-actions[bot]

This issue is marked as stale because it has not had any activity for 90 days.

It doesn't mean it's not important, so please remove the stale label if you like it, or add a comment saying what it means to you :)

However, if you just leave it like this, I'll close it in 7 days to help keep your issues tidy!

Thanks!

github-actions[bot] avatar Dec 12 '21 00:12 github-actions[bot]

This issue is marked as stale because it has not had any activity for 180 days.

If it's still important for you add a comment saying what it means to you, remove the stale label, and/or add the "important" label :)

However, if you just leave it like this, I'll close it in 30 days to help keep your issues relevant!

Thanks!

github-actions[bot] avatar Jun 11 '22 01:06 github-actions[bot]

This issue is marked as stale because it has not had any activity for 180 days.

If it's still important for you add a comment saying what it means to you, remove the stale label, and/or add the "important" label :)

However, if you just leave it like this, I'll close it in 30 days to help keep your issues relevant!

Thanks!

github-actions[bot] avatar Jan 08 '23 01:01 github-actions[bot]