|
|
53ec1a7b87
|
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 |
|
|
|
d5be62b34c
|
refactor: восстановлены старые стили пузырей сообщений, аватаров и разделителей (pre-redesign)
- Восстановлен мягкий цвет пузырей: color-mix(92%) вместо жесткого var(--bs-primary)
- Аватары: border-radius 9999px + grid layout для идеальных кругов
- Разделители: правильный spacing, font-weight 700, pointer-events, color-mix прозрачность
- Добавлены оптимизации скролла: rootMargin 300px, limit 50 сообщений (Telegram-стиль)
- Добавлены новые модули: messageLoader, scrollManager, chatUtils
- Рефакторинг логики загрузки сообщений для предотвращения дубликатов
- Создана документация по архитектуре и тестированию
|
2026-01-12 17:21:41 +03:00 |
|