Ordering Selector & Asset Publishing
Restored ordering address selector and added Symfony asset publishing to the production build path in 3.4.1
Overview
v3.4.1 restored the ordering portal's address selector to full parity and closed an asset-publishing gap in the production build pipeline.
Address Selector Restoration
The address_autocomplete_controller.js Stimulus controller was rewritten (~1,200 lines added) to switch from calling /api/address/insight on the local platform to calling dossier-api directly at /api/insights, making the ordering portal use dossier-api as its source of truth for address resolution.
A new MapshareGeocoderSuggestController provides a server-side proxy that forwards vicplan preset suggestions through dossier-api first, falling back to the local suggestion service on failure. The controller gained substantial new logic for:
- Title status resolution via TomSelect
- SPEAR milestone preview refresh
- SOC and predicted-title-date derivation from milestones
- Suggestion reordering by relevance
- A
mapDossierInsightsToLegacyFormat()adapter that translates the dossier-api bundle into the flat formatpopulateAddressFields()expects
Templates pass a dossier-api-url data attribute to the Stimulus controller, wired from a new DOSSIER_API_URL environment variable exposed as a Twig global.
Asset Publishing Fix
The production bootstrap script (bootstrap-prod.ts) was missing bun run assets steps for both app/ and ordering/. Without these, Symfony-managed assets (bundles like EasyAdmin, FOSCKEditor, etc.) were not published to public/bundles/ during production deploys, causing missing CSS/JS at runtime. Two new pipeline steps were added after each Webpack build to run assets:install.
Configuration
ordering/.env- added environment configurationordering/config/packages/twig.yaml- template path configurationordering/config/services.yaml- service wiring for the new controller.gitignore- updated to track generated asset directories correctly
Files Touched
| File | Change |
|---|---|
ordering/assets/controllers/address_autocomplete_controller.js | Modified (+1,201 / -87 lines) |
ordering/Controller/Api/MapshareGeocoderSuggestController.php | Added |
ordering/templates/_grids/_search.html.twig | Modified |
ordering/templates/ordering_portal/project_select.html.twig | Modified |
scripts/bootstrap-prod.ts | Modified (+16 lines) |
ordering/.env | Modified |
ordering/config/packages/twig.yaml | Modified |
ordering/config/services.yaml | Modified |
.gitignore | Modified |
Changelog Reference
fix: restore ordering address selector and asset publishing(#659)