Conversation
A done todo usually shows a struck-through title, and the list row had no way to do it, so people rebuilt rows by hand. The new headline-line-through attribute (fluent headlineLineThrough()) follows the line-through naming used by native:text and draws a strikethrough on the headline on iOS and Android. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A list row had no way to show a done item with its title struck through. In our todo app benchmark runs, several of the agent runs rebuilt rows by hand from basic elements just to get this.
This adds
headline-line-through(alsoheadlineLineThrough, fluent->headlineLineThrough()). It follows theline-throughname that<native:text>already uses for the same decoration. It only affects the headline, which is the title in a todo row. It goes over the wire asheadline_line_through. iOS applies.strikethrough()to the headlineText, the same wayNativeUITextRendererdoes. Android setsTextDecoration.LineThroughon the headline.Bind it to your state so done and open rows share one tag:
The value goes through
FILTER_VALIDATE_BOOLEAN, so a string"false"switches it off instead of counting as truthy. The prop is only sent when the attribute is set, so existing rows go over the wire unchanged.Testing:
tests/ListItemLineThroughTest.phpcovers the default, both spellings, bound true/false/string/int values and the fluent builder. The full suite passes against nativephp/mobile 4.5.2.swiftc -typecheck -wmoover core's NativeRender sources plus this package'sresources/ios. The error list is identical to main (all baseline errors from core types outside that folder), and a planted canary in the list item renderer was reported, so the file was checked.compileDebugKotlinpasses in super-native's Android project with the change cherry-picked onto the macOS renderer branch. I didn't run it on an emulator.🤖 Generated with Claude Code