Allow custom collage layouts from private folder#1428
Allow custom collage layouts from private folder#1428paaaaaaul0101 wants to merge 8 commits intoPhotoboothProject:devfrom
Conversation
|
Hey and thanks for your contributions! |
|
Hi Andi :) Initial situation: Therefore, I want to move away from a fixed layout list defined in code. The goal is to be able to use any number of custom collage layouts without having to make code changes for each new layout. Goal: Implementation: The backend has been adjusted so that layout IDs are no longer treated as fixed enums but are accepted as free strings. This means the system is no longer bound to a predefined list of layouts. When loading a layout in Private layout JSONs that are invalid or faulty are ignored. The admin GUI loads the available layout list fully dynamically via the new API. There is no longer a layout array hardcoded in the code, so new layouts automatically appear in the interface as soon as the corresponding JSON file is added. The layout selection on the start screen is based exclusively on the string IDs stored in layouts_enabled. The display name is taken from the name value in the corresponding layout JSON. |
|
Fix collage selection preview for dynamic layouts
Improve 2x layout text and cut-line positioning
|
5c07ec6 to
5ce05fe
Compare
|
I don’t get the collage svg previews in the admin selection, only on the start page. Apart from that, it looks fine. Thank you. |
reloxx13
left a comment
There was a problem hiding this comment.
Please merge paaaaaaul0101#1
|
Admin: add collage layout previews
|
|
@andi34 Ready for deployment to dev? :) |
|
@paaaaaaul0101 i'll try to test the PR until end of the week and merge if everything works fine |
Change-Id: If994f4100a744630fb89b3c160429135c9b45013
Change-Id: I0fd22507fe60974c743d4f70db85a241aedf2f1e
4200292 to
37fa803
Compare
|
Rebased |
|
Hi @andi34, I wanted to ask if there are any updates or if something is still needed from my side. :) |
|
Hey! Not sure yet, only have testes quickly and my private/collage.json was ignored. Currently private life has priority and Photobooth development not possible next week(s). |
|
Hey, |
|
Hi @andi34, totally understandable. Hi @reloxx13, here’s how the scan works right now: Admin list (what gets shown):
Legacy fallback (loaded only if the layout ID is explicitly selected):
So a file like This separation is intentional so custom layouts live in one predictable folder and the admin list stays clean. Do you want me to extend the admin list scan to include |
|
Hey, |
a2080b4 to
553ba73
Compare
|
Follow-up for migration safety:
Handling of
Why: On existing installations, custom layouts may still be stored in legacy private collage paths ( |
|
Hi @reloxx13, quick update: I added a migration-focused follow-up and tested it on my productive system. What was added:
Production test result:
Could you please do one final migration re-check? |
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)
getCollageLayouts.phpthat scansprivate/collage/layoutsand itslandscape/portraitsubdirectories and returns available layouts as{ id, label }.Collage.php:private/collage/layouts/<orientation>private/collage/layoutsprivate/collage/*template/collage/*layouts_enabled; display names are taken from thenamefield in the layout JSON.Tests:
npm run buildnpm run eslintIs there anything you'd like reviewers to focus on?
src/Collage.phpapi/getCollageLayouts.phpprivate/collage/layouts/landscapeandprivate/collage/layouts/portraitAI 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.