-
Notifications
You must be signed in to change notification settings - Fork 4
feat(publications): add support for related publications #143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Create RelatedPublication entity with id, title, releaseDate, url, and cover - Create RelatedPublicationModel for JSON serialization - Update Publication entity to include relatedPublications list - Update PublicationModel to parse 'related' field from API response - Add proper JSON mapping with fromJson, toJson, and fromEntity methods - All tests pass successfully
- Test fromEntity preserves relatedPublications - Test fromJson correctly parses related publications - Test fromJson handles missing related field - Test toJson includes related publications - Test copyWith updates relatedPublications - All 6 tests pass successfully
📊 Test Coverage Report🎯 Coverage: 74.9%
|
🎯 CI Summary🧪 Core SDK testing (critical components changed)
✅ All checks passed!This PR is ready for review. |
📱 APK Build Complete✅ APK successfully built for this PR! 📋 Build Details
📥 Download APKMethod 1: Direct Download (Recommended)
Method 2: GitHub CLI (if you have it installed) gh run download 18774561099 --repo ryanaidilp/stadata_flutter_sdk --name stadata-example-pr-143-e2cb28e📝 APK Info
📊 Size Analysis📈 Detailed APK Size Analysis (click to expand)APK Size Analysis ReportGenerated: Fri Oct 24 08:50:09 UTC 2025 APK File: Stadata_Example_PR-143_e2cb28e.apk 📊 Size Breakdown by Category📚 Stadata Flutter SDK ContributionThe SDK package was not found as a separate entry in the size analysis. This could mean:
Estimated SDK footprint: ~200-400 KB of Dart code 💡 Size Optimization RecommendationsAlready Applied ✅
Additional Optimizations
📈 Analysis Summary
Generated by APK Size Analysis Script using Flutter's 🚀 Installation
🤖 This comment is automatically updated when new commits are pushed to this PR. |
- Export RelatedPublication entity in SDK main library - Create RelatedPublicationsWidget to display list of related publications - Create RelatedPublicationItem widget for individual publication items - Update PublicationDetailContent to show related publications section - Display related publications with cover image, title, and release date - Add navigation placeholder for related publication items
Summary
RelatedPublicationentity with id, title, releaseDate, url, and cover fieldsRelatedPublicationModelfor JSON serialization/deserializationPublicationentity to includerelatedPublicationslist fieldPublicationModelto parserelatedfield from API responseRelatedPublicationin SDK main libraryChanges
SDK Changes
New Files
lib/src/features/publications/domain/entities/related_publication.dart- Entity for related publicationslib/src/features/publications/data/models/related_publication_model.dart- Model for JSON mappingModified Files
lib/src/features/publications/domain/entities/publication.dart- Added relatedPublications fieldlib/src/features/publications/data/models/publication_model.dart- Added JSON parsing for related fieldlib/stadata_flutter_sdk.dart- Exported RelatedPublication entitytest/src/features/publications/data/models/publication_model_test.dart- Added 5 new comprehensive testsExample App Changes
New Files
app/example/lib/features/publications/presentation/widgets/related_publications_widget.dart- Widget to display related publications listModified Files
app/example/lib/features/publications/presentation/widgets/publication_detail_content.dart- Added related publications sectionFeatures
UI Components
RelatedPublicationsWidget
RelatedPublicationItem
Test Coverage
All tests pass successfully:
Screenshots
The example app now displays related publications at the bottom of the publication detail page, showing cover images, titles, and release dates for each related publication.