Skip to content

Conversation

@StanBarrows
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings June 23, 2025 19:58
@StanBarrows StanBarrows merged commit 5bf4c1a into production Jun 23, 2025
4 of 5 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR targets the "main/production" branch and updates both the contacts seeder and the view data action to improve resource references and performance. Key changes include updating the contact image URL in the seeder and refactoring the contact-fetching logic in the ViewDataAction to cache published contacts and filter them in-memory.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
database/seeders/Paperflakes/ContactsTableSeeder.php Updated the contact image URL to reference a new asset version.
app/Actions/ViewDataAction.php Optimized the contact query by caching the published contacts and refactoring the filtering logic.
Comments suppressed due to low confidence (1)

database/seeders/Paperflakes/ContactsTableSeeder.php:146

  • Verify that the updated image URL aligns with the intended asset and naming conventions for consistency with other contact entries.
                'image' => 'https://res.cloudinary.com/codebar/image/upload/w_400,h_400,f_auto,q_auto/www-paperflakes-ch/people/drg_e_background_removal_f_png.webp',

Comment on lines +62 to 72
->filter(function ($contact) use ($section) {
$sections = $contact->sections ?? [];

return array_key_exists($section, $sections);
})
->map(fn ($contact) => ContactDTO::fromModel($contact, $section, $locale));

return [$section => $contacts];
return [$section => $contacts->values()];
})->all();
});
}
Copy link

Copilot AI Jun 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider extracting the anonymous filter function into a separate, well-named method to improve clarity and potential reusability.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants