Skip to content

Remove ability to override icons in "Topics" section #774

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

Merged

Conversation

mportiz08
Copy link
Contributor

@mportiz08 mportiz08 commented Jan 26, 2024

Bug/issue #, if applicable: 120670171

Summary

Due to limitations with remote SVG assets, there can be an issue where the color of a custom icon may be present in multiple locations using the same color, which results in a less than ideal experience.

Current known workarounds for this issue would necessitate server side headers for cross origin resource sharing, which DocC-Render can't control since it is a client-side only tool—with that in mind, it makes more sense to remove the ability for overriding the icon here and leaving it as something to customize in the hero element only for now.

Testing

Steps:

  1. Add the following snippet to an existing documentation catalog, with the referenced icon asset.
@Metadata {
  @PageImage(purpose: icon, source: "example-custom-icon.svg", alt: "icon")
}
  1. Verify that the custom icon still shows up in the hero element for the page, but it no longer appears in the "Topics" section from a parent page.

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

Due to limitations with remote SVG assets, there can be an issue where
the color of a custom icon may be present in multiple locations using
the same color, which results in a less than ideal experience.

Current known workarounds for this issue would necessitate server side
headers for cross origin resource sharing, which DocC-Render can't
control since it is a client-side only tool—with that in mind, it makes
more sense to remove the ability for overriding the icon here and
leaving it as something to customize in the hero element only for now.
@mportiz08
Copy link
Contributor Author

@swift-ci test

@mportiz08 mportiz08 merged commit 940167c into swiftlang:main Jan 31, 2024
@mportiz08 mportiz08 deleted the prevent-overriding-topics-section-icons branch January 31, 2024 23:05
mportiz08 added a commit that referenced this pull request Feb 8, 2024
Due to limitations with remote SVG assets, there can be an issue where
the color of a custom icon may be present in multiple locations using
the same color, which results in a less than ideal experience.

Current known workarounds for this issue would necessitate server side
headers for cross origin resource sharing, which DocC-Render can't
control since it is a client-side only tool—with that in mind, it makes
more sense to remove the ability for overriding the icon here and
leaving it as something to customize in the hero element only for now.

Resolves: rdar://120670171
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