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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: local-it/mitgliederverwaltung#208
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/197_custom_fields_overview"
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:
We want to show the custom fields as columns in the member overview. For now by default with a flag set to true.
What has been changed?
Definition of Done
Code Quality
Accessibility
Testing
Additional Notes
dec7550420to6f6808d2adWIP: Show custom fields per default in member overview closes #197to Show custom fields per default in member overview closes #197Show custom fields per default in member overview closes #197to Show custom fields per default in member overview closes #197 and #153Looks great. Maybe we could open a future issue for the in-memory sorting performance problem if the number of member is scaling.
Also some notes in the
development-progress-log.mdwould be nice.@ -165,0 +210,4 @@cfv ->formatted = Formatter.format_custom_field_value(cfv.value, custom_field)if formatted == "", do: "", else: formattedThis line isn't doing anything?
@ -233,2 +329,4 @@])# Load custom field values for visible custom fieldscustom_field_ids = Enum.map(socket.assigns.custom_fields_visible, & &1.id)Maybe it would be less confusing if this overloaded variable would be called
custom_field_ids_listand the other onecustom_field_ids_set@ -242,0 +353,4 @@# Performance: This iterates through all members and their custom_field_values.# For large datasets (>1000 members), this could be optimized by filtering# at the database level, but requires more complex Ash queries.custom_field_ids = MapSet.new(Enum.map(socket.assigns.custom_fields_visible, & &1.id))custom_field_idsis already set. To reduce some code redundancy and computation overhead you could write:@ -245,0 +383,4 @@# Note: We filter to visible custom fields after loading to reduce memory usage# Ash loads relationships efficiently with JOINs, but we only keep visible onesquery|> Ash.Query.load(custom_field_values: [custom_field: [:id, :name, :value_type]])Is there a reason not to filter the custom_field_values directly in the DB? This would be much more efficient.
For example:
No, good point!
@ -0,0 +54,4 @@defp format_value_by_type(value, :integer, _), do: to_string(value)defp format_value_by_type(value, :email, _) when is_binary(value) do:stringand:emailare formatted the same way, they could be merged:09c580e02dto2284cd93c4Issue for in memory sorting: #222