Fase 2 stap B (frontend): uitsnede per slide in het scherm, herstelpunt in het plan
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -75,3 +75,4 @@ Kept while Bryan is away (2026-11-17): no questions to him, a most probable assu
|
||||
| 44 | **Tiles or list in the library** (Bryan, 2026-11-17). | The library and the trash show the photos as tiles (grid of thumbnails, selectable, same usage and links) by default, with a switch Tiles / List next to the filters. The choice is remembered in the browser (`localStorage`, guarded; it falls back to tiles). The clean-up dialog keeps its list. The picker already is a grid. | Remember the choice on the server per user: needs a user-settings store. | `PhotoSelectionList` (`layout`), `lib/layoutPreference.ts`, `MediaLibraryPage` |
|
||||
| 45 | **Media screen details** (Bryan, 2026-11-17): bulk bar keeps its height; the whole tile selects; smaller tiles; 0 days in the clean-up; no time-basis choice. | The bar is an invisible placeholder of the same height (h-9) while nothing is selected. A click on a tile selects it (shift for a range); links, buttons and the box itself do their own thing. One more tile per row at every width. The clean-up slider goes from 0: 0 days means every photo that is not in use right now qualifies at the next clean-up (preview and confirmation unchanged, with a note at 0). The period always counts from the last use (assumption 29); there was no separate checkbox for the time basis in the clean-up (the only checkbox is "Alleen ongebruikte foto's", a filter, which stays because it protects photos in use), so nothing was removed. | If Bryan meant "Alleen ongebruikte foto's": removing it would put photos in use in the clean-up (counted from their upload date). | `BulkActionBar`, `PhotoSelectionList`, `CleanupDialog`, `CleanupSelection.MinDays` |
|
||||
| 46 | **Phase 2 is built in three switchable steps; the Hero tables stay the truth until phase 3** (2026-11-17, design on `feature/media-library-phase2`). | A write-through to the library tables (`Media:Library:DualWrite`), a nullable crop and set per slide (additive; null = today's behaviour and addresses), and a read switch with a compare mode (`Media:Library:ReadFromLibrary`). All switches off by default, test only, rollback by switching off. Details and back-up/rollback plan: `inception/application-design/phase2-design.md`. | Replace the Hero tables in one go: cannot be rolled back by a switch. | `phase2-design.md` |
|
||||
| 47 | **Crop per slide (step B), built 2026-11-17.** | A slide can have its own crop (nullable columns on `HeroSlides`, migration `AddSlideCrop`, additive); null = the slide uses its photo's crop and set, so no existing address changes. The crop is edited per slide (`PUT/DELETE hero/slides/{id}/focus`, applied at once); a crop equal to the photo's shares the photo's set; equal crops share one set. A slide that is not saved yet cannot be cropped (the button says so): its crop would have no slide to belong to. The "crop is shared" hint of assumption 36 is gone. The photo's own crop stays the default and is no longer edited from the screen (the endpoint remains). | Let an unsaved slide carry its crop in the save request: more code on both sides. | `HeroSlide`, `HeroMapping.Effective`, `HeroImageService.RenderSlideAsync`, `HeroPage` |
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Phase 2: the Hero works through the library, and a crop per use
|
||||
|
||||
Status: design and rollback plan, **not built yet** (2026-11-17). Branch `feature/media-library-phase2` (no PR until #22 is merged). Test only; every switch is OFF by default; SLS-Main is told before every test deploy; phase 3 (dropping the old tables) only after phase 2 is verified on test and never on production without a separate go from Bryan.
|
||||
Status (2026-11-17): step B (crop per slide) is built on this branch (backend, frontend, tests); steps A and C and phase 3 are not built. Branch `feature/media-library-phase2` (no PR until #22 is merged). Test only; every switch is OFF by default; SLS-Main is told before every test deploy; phase 3 (dropping the old tables) only after phase 2 is verified on test and never on production without a separate go from Bryan.
|
||||
|
||||
## What Bryan wants
|
||||
|
||||
@@ -68,7 +68,7 @@ Behaviour:
|
||||
|
||||
Before the first deploy of each step (A, B, C) on a test host:
|
||||
|
||||
1. **Database dump** if it can be taken (`mysqldump --single-transaction`, dated file outside the deploy directory). SLS-Main cannot make one on the Raspberry Pi today (see migration plan): then the assumption stays that the test data can be rebuilt and that every change is additive (new nullable columns, new tables); Bryan has been told.
|
||||
1. **Restore point of the test sites (made by Bryan, 2026-11-17 21:37, confirmed by Pi-Main):** `/mnt/storage1/backups/test-herstelpunt/2026-11-17-213757/` (readable by root only) with `db-SlpSoftwareTest.sql.gz`, `db-AndreaSlopFotografieTest.sql.gz`, `media.tar.gz` (both media directories) and `SHA256SUMS`. Made with `sudo bash /home/claude/server-ops/drafts/2026-11-17-test-herstelpunt/test-herstelpunt.sh`. Restoring is step 22b in `drafts/2026-11-17-test-herstelpunt/README.md` on the Pi, done by Bryan (not tested yet). Take a new one before the next step if a lot changed.
|
||||
2. **Row counts** noted: `HeroImages`, `HeroSlides`, `HeroRetiredFiles`, `MediaAssets`, `MediaUses`.
|
||||
3. **Sample of public addresses** (ten `/media/hero/<setHash>/...` URLs and the hero markers) requested before and after; same bytes.
|
||||
|
||||
@@ -91,5 +91,5 @@ Switches are set through the existing deploy workflow input path (the same way a
|
||||
|
||||
## Assumptions made here (also in assumptions-and-open-questions.md)
|
||||
|
||||
- The Hero tables stay authoritative until phase 3; "reads and writes through the library" is reached in steps A and C behind switches, not by replacing the tables in one go (a one-go replacement cannot be rolled back by a switch).
|
||||
- Test data is no longer assumed to be rebuildable: there is a recorded restore point (above). The Hero tables stay authoritative until phase 3; "reads and writes through the library" is reached in steps A and C behind switches, not by replacing the tables in one go (a one-go replacement cannot be rolled back by a switch).
|
||||
- The crop per slide lives in the slide (nullable) in the Hero until phase 3 and is mirrored to `MediaUses.Crops`; moving the authority to `MediaUses` is part of phase 3.
|
||||
|
||||
Reference in New Issue
Block a user