Skip to content

Conversation

sofiaromorales
Copy link
Contributor

Bug/issue #, if applicable: 126713717

Summary

When a framework had a display name different to the top level symbol name both variations would appear as availability badges in the symbols that were declared in extensions of that same framework, resulting in odd availability information.

Before the fix:
Screenshot 2024-05-22 at 20 12 45

After the fix:
Screenshot 2024-05-22 at 20 14 38

This was caused by the logic introduced here:
https://github.com/apple/swift-docc/pull/732/files#diff-68ec34e58e2102fa55684b18f310a856fd3220cf919e869bca4ad5f179ac1f14R1206

Dependencies

N/A

Testing

Steps:

  1. Preview attached doc catalog.
  2. Assert that the availabilities displayed in the Foo symbol does not show the framework name.

Checklist

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

  • Added tests
  • Ran the ./bin/test script and it succeeded
  • Updated documentation if necessary (N/A)
    AvailabilityBug.docc.zip

… show up twice in the avaialbility badges.

When a framework had a display name different to the symbol name both variantions would appear as availability badges in  symbols that were declared in extensions of that same framework, resulting in  odd availaiblity information.

rdar://126713717
@sofiaromorales
Copy link
Contributor Author

@swift-ci please test

@d-ronnqvist
Copy link
Contributor

Should the framework name show up once after this fix? In the 2nd screenshot there's no longer any module availability item.

@sofiaromorales
Copy link
Contributor Author

Should the framework name show up once after this fix? In the 2nd screenshot there's no longer any module availability item.

No. Per this change (https://github.com/apple/swift-docc/pull/732/files#diff-68ec34e58e2102fa55684b18f310a856fd3220cf919e869bca4ad5f179ac1f14R1206) it should only appear with external related modules.

@sofiaromorales
Copy link
Contributor Author

@swift-ci please test

@sofiaromorales
Copy link
Contributor Author

@swift-ci please test

@sofiaromorales sofiaromorales merged commit 037f0bc into swiftlang:main May 23, 2024
sofiaromorales added a commit to sofiaromorales/swift-docc that referenced this pull request May 23, 2024
… show up twice in the avaialbility badges. (swiftlang#922)

When a framework had a display name different to the top-level symbol name, both variations would appear as availability badges in the symbols that were declared in extensions of that same framework, resulting in odd availability information.

rdar://126713717
sofiaromorales added a commit that referenced this pull request May 23, 2024
… show up twice in the avaialbility badges. (#922) (#927)

When a framework had a display name different to the top-level symbol name, both variations would appear as availability badges in the symbols that were declared in extensions of that same framework, resulting in odd availability information.

rdar://126713717
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.

3 participants