Skip to content

Proposal: opt-in native link pill presentation through linkVariants #860

Description

@juliusmarminge

Problem

markdownStyle.linkVariants already selects link styling by URL. Consumers sometimes need a compact native link with a display label and local icon while keeping the Markdown label and original URL for copy, accessibility, and link callbacks.

Proposed extension

Keep the existing LinkVariantStyle configuration and normalization. Add optional per-variant fontFamily support, then opt-in iOS/Android pill presentation through pill, label, iconUri, border/padding geometry and maxWidth. Existing color fields apply; ordinary links stay unchanged by default. An optional iconTintColor follow-up preserves original image colors when omitted.

The native presentation remains one wrapping unit, uses the existing block font and available content width, and keeps original characters and link semantics. Icons use local file:// URIs with bounded, downsampled native caches. Web retains ordinary links. Text-input APIs are unchanged.

Implementation is prepared as small review layers. Native text-storage preservation and inline-code background suppression are part of the core pill behavior. This proposal does not add link recognition, media, asset manifests, an icon registry, or consumer routing.

The prepared PRs will remain drafts for API discussion. Combined-consumer iOS rendering and file interactions were inspected after a native rebuild; isolated library example/E2E and native XCTest proof is not claimed.

Draft implementation layers for discussion: #861 for per-variant font family, #862 for native pills, and #863 for optional icon tint. The dependent drafts include earlier layers because they target upstream main; their bodies link layer-only comparisons.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions