Fix error when deleting members #148

Merged
moritz merged 1 commit from fix-member-deletion into main 2025-10-09 16:45:42 +02:00
Collaborator

Description of the implemented changes

The changes were:

  • Bugfixing
  • New Feature
  • Breaking Change
  • Refactoring

What has been changed?

There was a stream_delete call altough we don't seem to be using streams for the member overview.

Definition of Done

Code Quality

  • No new technical depths
  • Linting passed
  • Documentation is added were needed

Accessibility

  • New elements are properly defined with html-tags
  • Colour contrast follows WCAG criteria
  • Aria labels are added when needed
  • Everything is accessible by keyboard
  • Tab-Order is comprehensible
  • All interactive elements have a visible focus

Testing

  • Tests for new code are written
  • All tests pass
  • axe-core dev tools show no critical or major issues

Additional Notes

## Description of the implemented changes The changes were: - [x] Bugfixing - [ ] New Feature - [ ] Breaking Change - [ ] Refactoring <!--- Describe the goal of the PR in a few words --> ## What has been changed? <!--- List the things you changed --> There was a `stream_delete` call altough we don't seem to be using streams for the member overview. ## Definition of Done ### Code Quality - [x] No new technical depths - [x] Linting passed - [x] Documentation is added were needed ### Accessibility - [ ] New elements are properly defined with html-tags - [ ] Colour contrast follows WCAG criteria - [ ] Aria labels are added when needed - [ ] Everything is accessible by keyboard - [ ] Tab-Order is comprehensible - [ ] All interactive elements have a visible focus ### Testing - [x] Tests for new code are written - [x] All tests pass - [ ] axe-core dev tools show no critical or major issues ## Additional Notes <!--- Add any additional information for the reviewers here -->
rafael added 1 commit 2025-08-21 14:34:07 +02:00
rafael added this to the Sprint 6 - 11.09 - 02.10. project 2025-09-11 11:33:03 +02:00
requested reviews from simon, carla 2025-09-11 11:33:09 +02:00
carla added 1 commit 2025-09-25 08:49:28 +02:00
carla approved these changes 2025-09-25 08:56:46 +02:00
carla left a comment
Owner

Looks fine, I just had this one question in the comments.

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)}
Owner

Might it be performance wise an issue if we always reassign the whole list or isn't that a problem? :)

Might it be performance wise an issue if we always reassign the whole list or isn't that a problem? :)
Author
Collaborator

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?

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?
Owner

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 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?
Author
Collaborator

I'll take a stab at implementing streams here. But I'll wait until your search MR is merged so we can prevent conflicts :)

I'll take a stab at implementing streams here. But I'll wait until your search MR is merged so we can prevent conflicts :)
Owner

Search MR is merged, @moritz let's check how to handle this

Search MR is merged, @moritz let's check how to handle this
Owner

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.

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.
carla modified the project from Sprint 6 - 11.09 - 02.10. to Sprint 7 - 02.10 - 23.10. 2025-10-02 12:20:10 +02:00
moritz force-pushed fix-member-deletion from b48038ed29 to 7d2b719ca2 2025-10-09 16:42:56 +02:00 Compare
moritz merged commit e2c00f263e into main 2025-10-09 16:45:42 +02:00
moritz deleted branch fix-member-deletion 2025-10-09 16:45:42 +02:00
Sign in to join this conversation.
No description provided.