**Major Features Added:** - **Inline Reply System**: Replace compose screen with inline reply boxes - **Thread Navigation**: Parent/child navigation with jump functionality - **Chain Flow UI**: Reply counts, expand/collapse animations, visual hierarchy - **Enhanced Animations**: Smooth transitions, hover effects, micro-interactions **Frontend Changes:** - **ThreadedCommentWidget**: Complete rewrite with animations and navigation - **ThreadNode Model**: Added parent references and descendant counting - **ThreadedConversationScreen**: Integrated navigation handlers - **PostDetailScreen**: Replaced with threaded conversation view - **ComposeScreen**: Added reply indicators and context - **PostActions**: Fixed visibility checks for chain buttons **Backend Changes:** - **API Route**: Added /posts/:id/thread endpoint - **Post Repository**: Include allow_chain and visibility fields in feed - **Thread Handler**: Support for fetching post chains **UI/UX Improvements:** - **Reply Context**: Clear indication when replying to specific posts - **Character Counting**: 500 character limit with live counter - **Visual Hierarchy**: Depth-based indentation and styling - **Smooth Animations**: SizeTransition, FadeTransition, hover states - **Chain Navigation**: Parent/child buttons with visual feedback **Technical Enhancements:** - **Animation Controllers**: Proper lifecycle management - **State Management**: Clean separation of concerns - **Navigation Callbacks**: Reusable navigation system - **Error Handling**: Graceful fallbacks and user feedback This creates a Reddit-style threaded conversation experience with smooth animations, inline replies, and intuitive navigation between posts in a chain.
73 lines
1.7 KiB
Dart
73 lines
1.7 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
/// Model for text overlays on Quip videos
|
|
class QuipTextOverlay {
|
|
final String text;
|
|
final Color color;
|
|
final Offset position; // Normalized 0.0-1.0 coordinates
|
|
final double scale;
|
|
final double rotation; // In radians
|
|
|
|
const QuipTextOverlay({
|
|
required this.text,
|
|
required this.color,
|
|
required this.position,
|
|
this.scale = 1.0,
|
|
this.rotation = 0.0,
|
|
});
|
|
|
|
QuipTextOverlay copyWith({
|
|
String? text,
|
|
Color? color,
|
|
Offset? position,
|
|
double? scale,
|
|
double? rotation,
|
|
}) {
|
|
return QuipTextOverlay(
|
|
text: text ?? this.text,
|
|
color: color ?? this.color,
|
|
position: position ?? this.position,
|
|
scale: scale ?? this.scale,
|
|
rotation: rotation ?? this.rotation,
|
|
);
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
return {
|
|
'text': text,
|
|
'color': color.value,
|
|
'position': {'x': position.dx, 'y': position.dy},
|
|
'scale': scale,
|
|
'rotation': rotation,
|
|
};
|
|
}
|
|
|
|
factory QuipTextOverlay.fromJson(Map<String, dynamic> json) {
|
|
return QuipTextOverlay(
|
|
text: json['text'] as String,
|
|
color: Color(json['color'] as int),
|
|
position: Offset(
|
|
(json['position']['x'] as num).toDouble(),
|
|
(json['position']['y'] as num).toDouble(),
|
|
),
|
|
scale: (json['scale'] as num).toDouble(),
|
|
rotation: (json['rotation'] as num).toDouble(),
|
|
);
|
|
}
|
|
}
|
|
|
|
/// Placeholder for future music track functionality
|
|
class MusicTrack {
|
|
final String id;
|
|
final String name;
|
|
final String artist;
|
|
final Duration duration;
|
|
|
|
const MusicTrack({
|
|
required this.id,
|
|
required this.name,
|
|
required this.artist,
|
|
required this.duration,
|
|
});
|
|
}
|