Redesign event symbol picker with unified icons#1549
Conversation
|
I wanted the icon selection to feel much more open, transparent, and practical for real event use. Before, the options felt too limited and not easy to browse. With this change, I now have a much larger but still meaningful icon choice, organized in a clearer way, with search and direct input so I can quickly pick exactly what I need. I also wanted full flexibility, so I kept the old icons, added support for custom SVG/image uploads, and made custom images manageable (including removal). |
| $assetService = AssetService::getInstance(); | ||
|
|
||
| echo '<script src="' . $assetService->getUrl('api/settings.php') . '"></script>'; | ||
| echo '<script src="' . $assetService->getUrl('node_modules/lucide/dist/umd/lucide.min.js') . '"></script>'; |
There was a problem hiding this comment.
This introduces runtime dependencies on node_modules/lucide/..., node_modules/iconify-icon/..., and also assets/js/admin/iconSelect.js, but the release archive builder does not ship those new paths. scripts/pack-build.js only archives a fixed allowlist of node_modules packages and resources/; it does not include lucide, iconify-icon, or the assets/ tree. In a zip-based install these requests become 404s, so the picker/start-page rendering will work in dev checkouts but break in packaged releases.
| $languageService = LanguageService::getInstance(); | ||
| $attributes = self::buildAttributes($setting); | ||
| $selectedIcon = EventSymbolUtility::normalize((string) ($setting['value'] ?? 'camera')); | ||
| $iconCatalog = EventIconCatalogUtility::getCatalog(); |
There was a problem hiding this comment.
Calling EventIconCatalogUtility::getCatalog() while rendering the admin form makes opening the settings page depend on synchronous third-party HTTP calls. When the 24h cache is stale, getCatalog() will rebuild before falling back, and that rebuild fans out to Lucide plus many Iconify searches with a 12s timeout each. On offline or slow booths this can stall the entire admin page load instead of staying local and responsive.
…r-clean # Conflicts: # lib/configsetup.inc.php # src/Configuration/Section/EventConfiguration.php # template/components/stage.start.php
Prerequisites checklist
What is the purpose of this pull request? (put an "x" next to an item)
What changes did you make? (Give an overview)
iconify:lets-icons:camera-fillorsquare-user-round).PHPStanis green again.Tests:
php tools/phpstan/vendor/bin/phpstan analyze --configuration phpstan.neoncomposer cgl:ciphp tools/phplint/vendor/bin/phplintIs there anything you'd like reviewers to focus on?
AI used to create this Pull Request?
I used AI selectively in the code, for minor suggestions, alternatives or for understanding.
The idea, concept and logic behind the changes are my own.