Skip to content

[Component] Text - Property Completion #2121

@kikisaints

Description

@kikisaints

The following unchecked properties are needed to complete the Text control integration into RNWCPP.

P1

  • selectable
    Lets the user select text, to use the native copy and paste functionality.
    Maps to TextBlock.IsTextSelectionEnabled (Win8)
  • ellipsizeMode
    When numberOfLines is set, this prop defines how text will be truncated. numberOfLines must be set in conjunction with this prop.
    Partially supported by XAML. Enum:
    -head: Not supported by XAML
    -middle: Not supported by XAML
    -tail: Maps to TextBlock.TextTrimming.CharacterEllipsis (Win 8.1) or TextBlock.TextTrimming.WordEllipsis (Win8)
    -clip: Maps to TextBlock.TextTrimming.Clip (Win 8.1)
  • numberOfLines
    Maps to TextBlock.MaxLines (Win 8.1)
  • allowFontScaling
    Specifies whether fonts should scale to respect Text Size accessibility settings. The default is true.
    Maps to TextBlock.IsTextScaleFactorEnabled (Phone 8.1)
  • selectionColor
    Maps to TextBlock.SelectionHighlightColor (Win 8.1)

P2

  • Nested Text
    Partially supported by XAML. TextBlock does not nest. Nesting can be handled by creating Spans, but this creates some impedance mismatches with the RN API as Span doesn't have all the same behaviors as TextBlock. Needs more investigation.

P3

  • pressRetentionOffset
    When the scroll view is disabled, this defines how far your touch may move off of the button, before deactivating the button. Once deactivated, try moving it back and you'll see that the button is once again reactivated! Move it back and forth several times while the scroll view is disabled. Ensure you pass in a constant to reduce memory allocations.
    Needs investigation. Mobile-specific feature, do we need this?

Already Completed

  • onLayout
  • onLongPress
  • onPress
Future
  • maxFontSizeMultiplier iOS Only
  • disabled Android Only
  • textBreakStrategy Android Only
  • adjustsFontSizeToFit iOS Only
  • minimumFontScale iOS Only
  • surpressHighlighting iOS Only

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions