Skip to content

Сохранять кадрирование программы и отдельную мобильную обложку - #782

Merged
TThanos3000 merged 1 commit into
devfrom
feat/dev-program-image-framing
Oct 17, 2026
Merged

TThanos3000 merged 1 commit into
devfrom
feat/dev-program-image-framing

Conversation

@TThanos3000

@TThanos3000 TThanos3000 commented Oct 17, 2026 •

Copy link
Copy Markdown
Collaborator

Что изменено

Добавлены отдельная мобильная обложка и сохраняемые параметры кадра шапки/логотипа. Исходные URL сохраняются: организатор сможет повторно настроить кадр после сохранения.

Зачем

Расширение существующего предпросмотра: основной широкий баннер плохо помещается на телефоне. Контракт: program-image-framing.

Реализация

PartnerProgram: nullable mobile_cover_image_address и JSON image_framing (legacy default{}), additive migration0020. Строгий полный документ cover/mobile_cover/logo с x/y0–100 иzoom1–3; пустой объект сбрасывает настройки. Неизвестные ключи, неверные типы, NaN/Infinity/огромные значения отклоняются без частичной записи. Оmitted fields сохраняют значения.

API

Additive поля в existing management basic PATCH/GET и обоих public/member detail. List дополнен image_framing для одинакового logo в карточках. Существующие updated_at/409 и atomic lock сохранены; старый Angular игнорирует новые поля.

UI

Backend-only PR; следующий Angular PR добавит управление кадром и мобильный uploader. Сначала rollout API/migration, затем клиент.

Permissions

Не менялись: can_manage_program на конкретную программу, manager/staff. Negative anonymous/member/expert/чужой manager проверены на прямом PATCH.

Проверки

  • 48 targeted tests на isolated PostgreSQL: framing5 + management/detail/program regression.
  • Final framing5 повторно после проверки huge integer boundary.
  • Black/flake8, makemigrations --check --dry-run: no changes.
  • Migration0020 применена на local PostgreSQL.
  • Review: write allowlist, deep JSON validation, stale409, no partial update, public/member/list compatibility; blocking findings отсутствуют.

Acceptance criteria

  • F5 server contract: roundtrip, invalid values, negative roles иstale write.
  • F2/F6 API support: independent optional mobile cover; legacy defaults иpartial update compatibility.
  • F1/F3/F4 UI integration: frontend#434, 7 Chrome scenarios with real local Django/PostgreSQL.

Не проверено

Live organizer session отсутствует; storage transport не менялся. Миграция0020 подтверждена пользователем на dev с проверкой чтения и прав записи от приложения; повторный deploy не имеет ожидающих миграций. Full CI PASS; read-only live contract checks ниже.

Риски / migration

Нужна additive migration0020 перед frontend rollout. Backend deploy только dev в ранее разрешённом scope. Production не затронут.

Dev release

  • Source PostgreSQL CI: 1060 PASS +39 locking/migration/vacancy tests, Lint и legacy Tests PASS.
  • Deploy39048607890, attempt2 SUCCESS. Merge c78078c; exact image sha256:5ac944d0794fa90c5e4cfdfa20acfa004572e97997cde2f8ad00542232631522 runs in web/celery; no pending migrations; admin smoke and Celery ping PASS on first attempt.
  • Migration0020 applied by DB owner on dev; application read and write privileges confirmed by supplied terminal output. Table ownership transfer was not independently verified.
  • 4 anonymous live read-only checks PASS: public detail mobile/framing fields, list logo framing, management authentication, admin login.
  • Frontend#434 merged after API compatibility verification; its deployment is tracked in that PR. Production not touched.

@TThanos3000
TThanos3000 merged commit c78078c into dev Oct 17, 2026
3 checks passed
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.

2 participants