Fix error when deleting members #148
Labels
No labels
bug
duplicate
enhancement
help wanted
high priority
invalid
L
low priority
M
medium priority
needs refinement
question
S
UX research
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: local-it/mitgliederverwaltung#148
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix-member-deletion"
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?
Description of the implemented changes
The changes were:
What has been changed?
There was a
stream_deletecall altough we don't seem to be using streams for the member overview.Definition of Done
Code Quality
Accessibility
Testing
Additional Notes
Looks fine, I just had this one question in the comments.
@ -23,2 +23,3 @@{:noreply, stream_delete(socket, :members, member)}updated_members = Enum.reject(socket.assigns.members, &(&1.id == id)){:noreply, assign(socket, :members, updated_members)}Might it be performance wise an issue if we always reassign the whole list or isn't that a problem? :)
Good point! Performance-wise, it would probably be good to actually use streams if we have a large number of members in this list. Although I'd say for <= 100 entries, this is not a problem, so if we choose to use pagination, I think performance-wise we'd be fine without using streams. Are we planning to use pagination in the future?
I actually came to the same point while working on sorting. I think pagination would be a good idea, but I would take that discussion to another issue. Because there are pros and also cons about pagination. When we use pagination, end-users who are used to excel can also be irritated. If you filter and you do not realise that you have two pages of results that can be also annoying. I will open an issue to discuss that. Whats the effort to go with streams and the win? Because when we have 300-500 members it might make sense anyways?
I'll take a stab at implementing streams here. But I'll wait until your search MR is merged so we can prevent conflicts :)
Search MR is merged, @moritz let's check how to handle this
I would say for now it's ok to send the whole list.
Showing over 300 member on one page should be avoided anyway. I would favor pagination with a high default value. But we can discuss this further in the related issue.
b48038ed29to7d2b719ca2