Skip to content

Implement HTML ruby and quote elements#242

Merged
jverkoey merged 1 commit into
mainfrom
claude/implement-ruby-elements-011CUqsbRurPuatHZLkgPW7e
Nov 6, 2025
Merged

Implement HTML ruby and quote elements#242
jverkoey merged 1 commit into
mainfrom
claude/implement-ruby-elements-011CUqsbRurPuatHZLkgPW7e

Conversation

@jverkoey

@jverkoey jverkoey commented Nov 6, 2025

Copy link
Copy Markdown
Collaborator

This commit implements four new HTML text-level semantic elements for Slipstream:

  • Quote (q): Represents short inline quotations with optional cite attribute
  • Ruby (ruby): Container for ruby annotations used in East Asian typography
  • RubyText (rt): Ruby text component for annotations
  • RubyParenthesis (rp): Fallback parentheses for browsers without ruby support

The Quote element follows the View-based pattern as it includes an optional cite attribute for specifying the source URL of the quotation. The Ruby, RubyText, and RubyParenthesis elements use the simpler W3CElement pattern as they don't require attributes.

All elements include:

  • Comprehensive documentation with usage examples
  • Support for both ViewBuilder content and text initializers
  • Full test coverage
  • Updated documentation mapping in SlipstreamForWebDevelopers.md

These implementations follow SwiftUI idioms while honoring W3C terminology, maintaining consistency with existing Slipstream elements like Bold, Italic, and Emphasis.

Part of #25

This commit implements four new HTML text-level semantic elements for Slipstream:

- Quote (q): Represents short inline quotations with optional cite attribute
- Ruby (ruby): Container for ruby annotations used in East Asian typography
- RubyText (rt): Ruby text component for annotations
- RubyParenthesis (rp): Fallback parentheses for browsers without ruby support

The Quote element follows the View-based pattern as it includes an optional cite
attribute for specifying the source URL of the quotation. The Ruby, RubyText, and
RubyParenthesis elements use the simpler W3CElement pattern as they don't require
attributes.

All elements include:
- Comprehensive documentation with usage examples
- Support for both ViewBuilder content and text initializers
- Full test coverage
- Updated documentation mapping in SlipstreamForWebDevelopers.md

These implementations follow SwiftUI idioms while honoring W3C terminology,
maintaining consistency with existing Slipstream elements like Bold, Italic,
and Emphasis.
@jverkoey jverkoey enabled auto-merge (squash) November 6, 2025 02:59
@jverkoey jverkoey merged commit f57c2db into main Nov 6, 2025
2 checks passed
@jverkoey jverkoey deleted the claude/implement-ruby-elements-011CUqsbRurPuatHZLkgPW7e branch November 6, 2025 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants