Skip to content

feat(ios): add ellipsizeMode support#14

Merged
patrickkabwe merged 14 commits intomainfrom
feat/ellipsize-mode
Sep 11, 2025
Merged

feat(ios): add ellipsizeMode support#14
patrickkabwe merged 14 commits intomainfrom
feat/ellipsize-mode

Conversation

@patrickkabwe
Copy link
Copy Markdown
Owner

@patrickkabwe patrickkabwe commented Sep 11, 2025

No description provided.

…: 'head' | 'middle' | 'tail' | 'clip'\n- Wires prop through Nitro generated layers (manual patches)\n- Implements mapping in NitroTextImpl using NSLineBreakMode, including multi-line\n- Mirrors truncation in paragraph style for attributed text\n- Updates JS types and config
…tail/clip\n\n- Add effectiveLineBreakMode helper and apply everywhere\n- Reapply lineBreakMode on numberOfLines/ellipsizeMode changes\n- Fix missing setNeedsLayout in setNumberOfLines
…\n- For numberOfLines > 1 and ellipsizeMode=clip, use .byWordWrapping\n- Prevents single-line clipping and matches RN Text behavior
…t\n\n- Ensure setNumberOfLines and setEllipsizeMode call setNeedsLayout\n- Paragraph style and textContainer use effectiveLineBreakMode derived from current ellipsizeMode + numberOfLines\n- Aligns behavior with RN for multi-line clip/tail
…dd FragmentTopDefaults and apply(fragments:text:top:) in NitroTextImpl\n- Delegate merging from HybridNitroText to NitroTextImpl\n- Keeps Hybrid class thin and centralizes render logic
…agment.swift\n\n- Move FragmentTopDefaults, apply(...) and fontWeight mapping to an extension file\n- Keep NitroTextImpl.swift focused on layout/render logic
…n\n- Keep +Fragment focused on fragment/default merging\n- Group font mapping in a dedicated +Font extension
…xtract makeFont(for:defaultPointSize:) into +Font extension\n- Update callers to pass default point size\n- Keeps NitroTextImpl.swift focused on non-font responsibilities
….swift\n\n- Move makeAttributes/makeParagraphStyle/resolveColor/transform into an extension file\n- Relax access controls so extensions can read state (alignment, transform, container)\n- Keep NitroTextImpl.swift focused on core logic
…- Add small font cache keyed by size/weight/italic to avoid repeated font recreation\n- Call setNeedsLayout on numberOfLines/ellipsizeMode changes to ensure efficient relayout\n- Keep helpers accessible from extensions
@patrickkabwe patrickkabwe merged commit af20c4e into main Sep 11, 2025
0 of 4 checks passed
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@patrickkabwe patrickkabwe deleted the feat/ellipsize-mode branch September 21, 2025 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant