Small refactoring #360
No reviewers
Labels
No labels
bug
duplicate
enhancement
help wanted
high priority
invalid
L
low priority
M
medium priority
needs refinement
optional
question
S
UX research
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: local-it/mitgliederverwaltung#360
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refactor"
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?
1. Domain Public API Documentation Incomplete
Problem: The
@moduledocin domain modules does not list all public functions.Affected Files:
lib/membership/membership.ex- Missing functions in Public API:list_required_custom_fields/0update_member_field_visibility/2update_single_member_field_visibility/3lib/accounts/accounts.ex- Very short Public API documentation, could be more detailedlib/membership_fees/membership_fees.ex- Public API is complete, but could more clearly document that LiveViews use direct Ash callsPriority: Low (Documentation, no functionality affected)
Recommendation: Update Public API sections in all domain modules to list all public functions.
2. Outdated Comments in MemberLive.Form
Problem:
@moduledocinlib/mv_web/live/member_live/form.exstill mentions "Payment Data: Mockup section (not editable)", but Membership Fees are now fully implemented.Affected File:
lib/mv_web/live/member_live/form.ex(Line 16)Priority: Low (Documentation, no functionality affected)
Recommendation: Update
@moduledocto reflect the current status.3. Mv.Accounts Domain Public API Missing Completely
Problem: The
@moduledocinlib/accounts/accounts.exdoes not mention any Public API functions, although several are defined.Affected File:
lib/accounts/accounts.ex- Missing Public API documentation for:create_user/1list_users/0update_user/2destroy_user/1create_register_with_rauthy/1read_sign_in_with_rauthy/1Priority: Low (Documentation, no functionality affected)
Recommendation: Add Public API section to
@moduledoc, similar to other domain modules.4. Mv.Authorization Domain Public API Missing get_role/1
Problem: The
@moduledocinlib/mv/authorization/authorization.exdoes not listget_role/1in the Public API, although it is defined.Affected File:
lib/mv/authorization/authorization.ex- Missing function in Public API:get_role/1(is defined, but not mentioned in Public API)Priority: Low (Documentation, no functionality affected)
Recommendation: Add
get_role/1to the Public API list.5. Remove Deprecated Implementations
Problem:
lib/mv_web/live/custom_field_value_live/show.exMvWeb.ContributionTypeLive.IndexandMvWeb.ContributionPeriodLive.Showare deprecated, they should be removed.6. Missing Tests for Some LiveViews
Problem: Some LiveViews do not have corresponding test files.
Affected LiveViews:
MvWeb.UserLive.Show- No test presentMvWeb.RoleLive.Show- No test presentPriority: Medium (Test coverage could be improved)
Recommendation: Add tests for the three Show LiveViews to ensure complete test coverage.
7. Mv.Accounts.Token @moduledoc Too Short
Problem: The
@moduledocinlib/accounts/token.exis very short and not informative.Affected File:
lib/accounts/token.ex- Currently only: "AshAuthentication specific ressource"Priority: Low (Documentation, no functionality affected)
Recommendation: Expand @moduledoc to explain that this is an AshAuthentication Token Resource and is used for session management.
8. PageController Missing @moduledoc
Problem: The
@moduledocinlib/mv_web/controllers/page_controller.exis completely missing.Affected File:
lib/mv_web/controllers/page_controller.ex- No @moduledoc presentPriority: Low (Documentation, no functionality affected)
Recommendation: Add @moduledoc to explain that this controller renders the homepage.
Note: Other controller modules (Router, Endpoint, Telemetry) also do not have @moduledoc, but this is common and acceptable for standard Phoenix modules.
Analysis Summary
Found Inconsistencies
1. Domain Public API Documentation Incomplete (see Code Adjustments #1)
2. Outdated Comments in MemberLive.Form (see Code Adjustments #2)
3. Mv.Accounts Domain Public API Missing Completely (see Code Adjustments #3)
4. Mv.Authorization Domain Public API Missing get_role/1 (see Code Adjustments #4)
5. CustomFieldValueLive.Show is Deprecated (see Code Adjustments #5)
6. Missing Tests for Some LiveViews (see Code Adjustments #6)
7. Mv.Accounts.Token @moduledoc Too Short (see Code Adjustments #7)
8. PageController Missing @moduledoc (see Code Adjustments #8)