Split member_live/index.ex into a coordinator + modules #601

Merged
simon merged 12 commits from issue/mitgliederverwaltung-535 into main 2026-10-17 02:22:21 +02:00
Owner

closes #535

Description of the implemented changes

The changes were:

  • Bugfixing
  • New Feature
  • Breaking Change
  • Refactoring

Split member_live/index.ex into a coordinator + modules. The member overview LiveView (about 1950 lines) is reduced to a coordinator of about 700 lines: the list state lives in one MvWeb.MemberOverview.State struct with a shared URL codec (Params) and sort module, page loading, bulk-action scope, column selection and mount setup move into pure modules, and the export now reads the same overview state from its URL params, so overview and export cannot drift apart.

What has been changed?

  • Pin the overview behaviour the split must keep
  • Move the codecs shared with the export out of the LiveView namespace
  • Model search, sort and filters as one state with a shared URL codec
  • Restore every sortable column from a bookmarked URL
  • Keep the list state in one assign read through the shared codec
  • Carry the overview state as its URL params and reject outdated payloads
  • Split the overview LiveView into loader, bulk scope, column and setup modules
  • Pin that the PDF lists the golden members in the same order
  • Keep member names from adding recipients to bulk email lists
  • Keep state, codecs and queries of large LiveViews in pure modules

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

  • Review loop hit the 4-iteration cap; the remaining findings were accepted by the reviewer of the run.
  • Large commit: "Split the overview LiveView into loader, bulk scope, column and setup modules" touches most of the diff (new modules, dedupe, review cleanup).
  • Small behaviour changes: bookmarked sort_field=membership_fee_type / name is restored instead of falling back to last name; boolean filter ids in the URL are normalized like group ids; the member page's back link no longer appends ?highlight= (the overview ignores the param).
  • Export payloads from a page loaded before this deploy are rejected with HTTP 400 and a "reload the page" message (CSV and PDF).
  • Security: member names containing address delimiters or control characters are quoted/cleaned in the bulk BCC and copied address list (was possible on main). The single-member mailto link on the member page is still unencoded — tracked as a follow-up.
closes #535 ## Description of the implemented changes The changes were: - [x] Bugfixing - [x] New Feature - [ ] Breaking Change - [x] Refactoring Split member_live/index.ex into a coordinator + modules. The member overview LiveView (about 1950 lines) is reduced to a coordinator of about 700 lines: the list state lives in one `MvWeb.MemberOverview.State` struct with a shared URL codec (`Params`) and sort module, page loading, bulk-action scope, column selection and mount setup move into pure modules, and the export now reads the same overview state from its URL params, so overview and export cannot drift apart. ## What has been changed? - Pin the overview behaviour the split must keep - Move the codecs shared with the export out of the LiveView namespace - Model search, sort and filters as one state with a shared URL codec - Restore every sortable column from a bookmarked URL - Keep the list state in one assign read through the shared codec - Carry the overview state as its URL params and reject outdated payloads - Split the overview LiveView into loader, bulk scope, column and setup modules - Pin that the PDF lists the golden members in the same order - Keep member names from adding recipients to bulk email lists - Keep state, codecs and queries of large LiveViews in pure modules ## Definition of Done ### Code Quality - [ ] 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 - Review loop hit the 4-iteration cap; the remaining findings were accepted by the reviewer of the run. - Large commit: "Split the overview LiveView into loader, bulk scope, column and setup modules" touches most of the diff (new modules, dedupe, review cleanup). - Small behaviour changes: bookmarked `sort_field=membership_fee_type` / `name` is restored instead of falling back to last name; boolean filter ids in the URL are normalized like group ids; the member page's back link no longer appends `?highlight=` (the overview ignores the param). - Export payloads from a page loaded before this deploy are rejected with HTTP 400 and a "reload the page" message (CSV and PDF). - Security: member names containing address delimiters or control characters are quoted/cleaned in the bulk BCC and copied address list (was possible on main). The single-member mailto link on the member page is still unencoded — tracked as a follow-up.
Boolean filter ids in the URL are now normalized like group and fee type
ids, so an upper-cased or whitespace-padded catalog id applies instead of
being dropped; URLs the overview writes always carry canonical ids.
Merge remote-tracking branch 'origin/main' into issue/mitgliederverwaltung-535
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/promote/production Build is passing
354d72842c
simon merged commit affbefe6e7 into main 2026-10-17 02:22:21 +02:00
simon deleted branch issue/mitgliederverwaltung-535 2026-10-17 02:22:21 +02:00
Sign in to join this conversation.
No description provided.