Skip to content

feat(Search) - allow to search media in the EasyAdmin and Sonata Admin bridges#128

Merged
xavierlacot merged 9 commits into
jolicode:mainfrom
loic425:feat/search-in-choose-media-modal
Jul 17, 2026
Merged

feat(Search) - allow to search media in the EasyAdmin and Sonata Admin bridges#128
xavierlacot merged 9 commits into
jolicode:mainfrom
loic425:feat/search-in-choose-media-modal

Conversation

@loic425

@loic425 loic425 commented May 21, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 adds a search capability to the EasyAdmin “choose media” modal by introducing a search UI, wiring a search query parameter through the EasyAdmin media listing endpoint, and updating the modal JS to fetch filtered results.

Changes:

  • Add action.search and media.search_label translations (EN/FR).
  • Render a search form in the EasyAdmin media list template when used in the “choose” modal and pass the current search value from the controller.
  • Implement server-side filtering/recursive listing when ?search=... is provided, and update the JS modal loader to include the search query in AJAX navigation.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/Bridge/EasyAdmin/translations/JoliMediaEasyAdminBundle.fr.yaml Adds French labels for the search UI.
src/Bridge/EasyAdmin/translations/JoliMediaEasyAdminBundle.en.yaml Adds English labels for the search UI.
src/Bridge/EasyAdmin/templates/list.html.twig Adds the search form to the choose-modal listing view.
src/Bridge/EasyAdmin/src/Controller/MediaAdminController.php Reads search query param and applies recursive filtering for directories/medias.
src/Bridge/EasyAdmin/assets/js/components/mediaSelector.js Adds modal search handling and URL manipulation for AJAX navigation.
src/Bridge/EasyAdmin/public/manifest.json Updates built asset reference to new JS filename.
src/Bridge/EasyAdmin/public/entrypoints.json Updates built asset reference to new JS filename.
src/Bridge/EasyAdmin/public/joli-media-easy-admin.51f41996.js Updated compiled JS bundle containing the new modal search logic.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Bridge/EasyAdmin/assets/js/components/mediaSelector.js Outdated
Comment thread src/Bridge/EasyAdmin/assets/js/components/mediaSelector.js Outdated
Comment thread src/Bridge/EasyAdmin/templates/list.html.twig Outdated
Comment thread src/Bridge/EasyAdmin/src/Controller/MediaAdminController.php Outdated
Comment thread src/Bridge/EasyAdmin/src/Controller/MediaAdminController.php
Comment thread src/Bridge/EasyAdmin/src/Controller/MediaAdminController.php Outdated
@loic425
loic425 force-pushed the feat/search-in-choose-media-modal branch from 486daed to 8ec6f3f Compare May 28, 2026 15:21
@xavierlacot
xavierlacot force-pushed the feat/search-in-choose-media-modal branch from 8ec6f3f to 8d25bdc Compare July 17, 2026 12:38
@xavierlacot
xavierlacot requested a review from Copilot July 17, 2026 15:05
@xavierlacot xavierlacot changed the title feat(EasyAdmin): Search in the choose media modal feat(Search) - allow to search media in the EasyAdmin and Sonata Admin bridges Jul 17, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

Comment thread tests/src/Bridge/EasyAdmin/Controller/MediaAdminControllerTest.php
@xavierlacot
xavierlacot merged commit e248346 into jolicode:main Jul 17, 2026
6 checks passed
@loic425
loic425 deleted the feat/search-in-choose-media-modal branch July 17, 2026 15:58
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.

3 participants