Redesign Reader post detail header for adaptive layout#22754
Redesign Reader post detail header for adaptive layout#22754
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Only use editorial.image, featured_image, or featured_media.uri as featured image sources instead of scanning post content for suitable images or videos. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Reorder ConstraintLayout constraints so the visual hierarchy is: blog header → featured image → title → excerpt → interactions → footer Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When a Reader post has a portrait featured image, the image is now scaled to fit the container height and centered horizontally with a gray background fill, instead of being center-cropped which often cuts off heads and other important content. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move featured image from collapsing AppBar to inline in the header view with adaptive aspect ratio. Restructure blog section so site name, author, and date each appear on their own line with absolute date+time format. Add reading time indicator and excerpt display to the header. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Extract Regex and date format constants in header UI state builder - Replace verbose null-check patterns with setTextOrHide helper - Hoist Paint allocation to class property in PortraitAwareCropTransformation - Remove unnecessary list allocation in applyInteractionSectionTheme Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ibute Replace ?attr/colorOnSurfaceVariant (Material3-only) with compatible alternatives since the reading preferences ContextThemeWrapper uses Theme.MaterialComponents.DayNight which lacks this attribute. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…stener - Remove unused postDetailsHeaderViewUiStateBuilder injection from fragment - Replace per-scroll toolbar coloring with one-time setup in initAppBar - Inline trivial buildPostDetailsHeaderUiState delegation - Remove unnecessary default values in ReaderFeaturedImageUiState Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Generated by 🚫 Danger |
|
|
|
|
Replace HtmlCompat.fromHtml() with lighter HtmlUtils.fastStripHtml() for word counting, fix detekt ReturnCount and checkstyle empty-line violations. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Chain blog name and author vertically against the avatar, add marginStart with goneMarginStart so text aligns flush when there is no avatar. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ptive-post-details Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move blog name to top, post title second, avatar with author and date below title, then featured image, blog description (up to 3 lines), and reading time. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Anchor dateline start directly to avatar so it stays positioned when author name is hidden. Add barrier below blog name and follow button so the post title clears both. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
findPost() excludes the text column for performance, so shouldAddFeaturedImage() couldn't detect the image was already in the post body HTML. Fetch with text column included when returning from comments to preserve deduplication. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Flatten ReaderPostDetailsHeaderViewUiState sealed class into top-level data classes (only had one subclass) - Inline trivial wrapper methods in the header UI state builder - Inline single-line delegation methods in the header view Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…d, rename excerpt to blogDescription - Cache SimpleDateFormat as a class property instead of allocating per call - Wrap ReaderBlogTableWrapper.getBlogInfo() in withContext(Dispatchers.IO) and propagate suspend through the call chain - Rename excerpt/text_excerpt to blogDescription/text_blog_description since the field shows blog description, not post excerpt Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This drawable was only referenced by the collapsing toolbar featured image FrameLayout which was removed in the header redesign. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove redundant likeCount/commentCount local variables - Simplify featured image null handling with if/else - Make ReaderFeaturedImageUiState.url and onFeaturedImageClicked non-null since the state object is only created with valid values - Rewrite buildReadingTime with early returns for readability Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## trunk #22754 +/- ##
==========================================
- Coverage 37.42% 37.40% -0.03%
==========================================
Files 2321 2321
Lines 123663 123709 +46
Branches 16768 16785 +17
==========================================
- Hits 46278 46268 -10
- Misses 73673 73730 +57
+ Partials 3712 3711 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Move DB query off main thread in onUserNavigateFromComments - Replace SimpleDateFormat with thread-safe DateTimeFormatter - Reapply toolbar icon colors after menu visibility changes - Hide blog name in blog section layout XML instead of at runtime - Move featured image click lambda out of data class for proper equality - Guard reading time word count against empty split results - Revert formatting-only test changes to reduce diff noise Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds a flat text button with a circled arrow icon on the right side of the reading time row. Tapping it opens the post's original URL in the browser. The button is only shown when the post has a URL. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The comment count is already shown above the comment list, so it's redundant in the likes area. Simplified to a single like count TextView. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Preserve the featured image state across UI re-renders so it doesn't disappear when fresh post text causes the URL deduplication heuristic to produce a different result. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Display up to 5 small circular liker avatars before the like count text below post content. Ungates the liker data pipeline so avatar URLs are fetched regardless of the likes enhancements feature flag. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
onRefreshLikersData() was not called from updatePostDetailsUi(), so the liker data pipeline was never triggered during the initial post load. This meant the likesUiState observer never received data and the avatar ImageViews stayed hidden. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove the 5 small inline avatar ImageViews from the like count row and revert the layout to the original MaterialTextView. The existing liker faces train (32dp RecyclerView avatars) is now always shown since the data pipeline was ungated. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The like count was shown twice: once as a standalone TextView below the tags and again as a trailing label in the liker faces train. Remove the standalone header_like_count TextView and let the faces train be the sole display of like count and liker avatars. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
🤖 Build Failure AnalysisThis build has failures. Claude has analyzed them - check the build annotations for details. |
Use medium-emphasis color for pill stroke and text instead of black. Adjust layout constraints so the pill drives row height and the blog name centers vertically against it, preventing top clipping. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Derive tag visibility from tagItems.isNotEmpty() and view-original visibility from onViewOriginalClicked != null. Also remove unused lambda binding in onFeaturedImageClicked. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract buildInteractionSection and buildViewOriginalClicked helpers to shorten mapPostToUiState. Remove unused OpenPost imports and delete unused ic_arrow_circle_right_16dp drawable. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|





Description
Updated Reader post detail to more closely match iOS, especially the recent redesigns to the Reader post detail header. This PR contains the following changes:
ReaderPostDetailHeaderView, below the title. UsesShapeableImageViewwith rounded corners and supports tap-to-preview.Testing instructions
I recommend viewing this branch alongside the iOS reader and noting any differences between the two (keeping in mind there will be minor rendering differences in the post content).