Skip to content

Render availability items without version range details #891

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

mportiz08
Copy link
Contributor

Bug/issue #, if applicable: 135420580

Summary

This makes the AvailabilityRange.introducedAt prop optional instead of required.

This adds support for indicating that a symbol is available on a certain platform, even if there are no additional details on the specific version of that platform when it was first introduced.

Example

For an example platform of foo, this is how it should now render:

text
foo (instead of foo 2.0+)

title (hover text)
Available on foo (instead of Available on foo 2.0 and later)

aria-label
foo, Available on foo (same pattern of combining text/title)

Testing

Steps:

  1. Test that the availability strings work the same as today without regressions with symbols that have version details
  2. Test for the above string patterns after removing the introducedAt value from existing availability items

Checklist

Make sure you check off the following items. If they cannot be completed, provide a reason.

  • Added tests
  • Ran npm test, and it succeeded
  • Updated documentation if necessary

@mportiz08
Copy link
Contributor Author

@swift-ci test

Copy link
Member

@marinaaisa marinaaisa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@mportiz08 mportiz08 merged commit 0b380ed into swiftlang:main Sep 12, 2024
1 check passed
@mportiz08 mportiz08 deleted the render-availabile-platform-without-version-details branch September 12, 2024 16:44
anferbui pushed a commit to anferbui/swift-docc-render that referenced this pull request Nov 7, 2024
anferbui pushed a commit to anferbui/swift-docc-render that referenced this pull request Nov 7, 2024
anferbui added a commit that referenced this pull request Nov 7, 2024
Resolves: rdar://135420580
Resolves: rdar://139423135

Co-authored-by: Marcus Ortiz <[email protected]>
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