Игорь Надеин
e14ccbf956
feat: implement Telegram-style image dimension pre-loading to fix auto-scroll
- Backend: added width/height fields to MessageAttachment model with Pillow auto-extraction
- Migration: 0021_add_image_dimensions + populate_image_dimensions management command
- API: serialize width/height in messageAttachmentSerializer and consumers.py
- Frontend: switched from CSS aspect-ratio to explicit pixel calculation (Telegram approach)
* messageRendererV2.js: calculate exact dimensions (maxWidth=500px, proportional height)
* Fixes scroll jump issue: images now reserve exact space before loading
* Debug logging added to validate dimension rendering
- Testing: 18/18 images populated successfully with dimensions
This prevents scroll position shifts when images load after initial positioning,
implementing the same approach as Telegram Web.
Related: scroll positioning, image preloading, chat UX
2026-01-14 17:32:06 +03:00
..
2025-10-28 08:29:43 +03:00
2025-12-08 11:21:31 +03:00
2025-12-18 10:19:47 +03:00
2025-11-20 09:00:55 +03:00
2025-12-05 17:01:33 +03:00
2025-11-20 09:00:55 +03:00
2025-11-20 09:00:55 +03:00
2026-01-12 17:37:41 +03:00
2026-01-12 17:37:41 +03:00
2026-01-14 17:32:06 +03:00
2025-11-28 10:09:23 +03:00
2025-11-28 10:09:23 +03:00
2026-01-14 17:32:06 +03:00
2025-11-30 12:21:36 +03:00
2026-01-12 17:37:41 +03:00
2026-01-12 11:11:02 +03:00
2026-01-08 14:39:40 +03:00
2026-01-13 09:19:19 +03:00
2025-12-01 14:19:58 +03:00
2025-11-20 09:00:55 +03:00
2025-11-27 17:23:13 +03:00
2025-11-20 09:00:55 +03:00
2025-11-29 13:52:21 +03:00
2025-11-20 12:54:01 +03:00
2025-11-20 09:00:55 +03:00
2025-11-20 09:00:55 +03:00
2025-11-21 12:46:43 +03:00
2025-11-20 09:00:55 +03:00
2025-12-03 14:42:26 +03:00
2025-12-05 13:19:04 +03:00
2025-12-08 13:37:20 +03:00
2025-11-20 09:00:55 +03:00
2025-12-08 11:07:45 +03:00
2025-12-30 10:35:34 +03:00
2025-12-03 13:48:31 +03:00
2025-11-29 13:52:21 +03:00
2025-11-29 13:52:21 +03:00
2025-12-05 10:56:23 +03:00
2025-12-05 09:57:54 +03:00
2025-11-20 09:00:55 +03:00
2025-11-20 09:00:55 +03:00
2025-11-20 09:00:55 +03:00
2025-11-20 09:00:55 +03:00
2025-11-20 09:00:55 +03:00
2025-10-28 08:40:25 +03:00
2025-12-02 14:02:10 +03:00
2026-01-06 08:11:24 +03:00
2026-01-14 17:32:06 +03:00
2026-01-14 17:32:06 +03:00
2026-01-14 17:32:06 +03:00
2025-12-01 14:19:58 +03:00
2025-11-20 09:00:55 +03:00
2025-12-05 11:10:02 +03:00
2025-11-20 09:00:55 +03:00
2025-11-20 09:00:55 +03:00
2025-11-20 09:00:55 +03:00
2025-12-03 13:48:31 +03:00
2025-12-08 12:09:32 +03:00
2025-12-08 12:09:32 +03:00
2025-11-29 13:52:21 +03:00
2025-12-05 15:59:21 +03:00
2026-01-05 14:35:19 +03:00
2025-12-29 15:32:27 +03:00
2025-11-20 09:00:55 +03:00
2025-11-20 09:00:55 +03:00
2025-11-20 09:00:55 +03:00
2025-11-20 09:00:55 +03:00
2025-12-17 09:14:34 +03:00
2025-11-29 13:52:21 +03:00
2025-11-29 16:41:03 +03:00
2026-01-13 15:02:20 +03:00