H-6604: Fix entity type icon rendering for relative URLs#8876
Draft
CiaranMn wants to merge 1 commit into
Draft
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Replace direct icon rendering with EntityOrTypeIcon component in: - draft-entities-filters.tsx: Use EntityOrTypeIcon for filter type icons - entity-type-header.tsx: Use EntityOrTypeIcon instead of manual URL conversion - graph-data-loader.tsx: Convert relative URLs to absolute before passing to graph This ensures relative icon URLs (starting with '/') are properly converted to absolute URLs and rendered correctly throughout the application. Co-authored-by: Ciaran Morinan <CiaranMn@users.noreply.github.com>
5808dc0 to
d3cf0b8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🌟 What is the purpose of this PR?
This PR fixes broken entity type icon rendering when the
iconfield contains a relative URL (e.g.,/icon/types/cubes.svg). Some components were rendering the raw icon value directly instead of using theEntityOrTypeIconcomponent, which handles URL conversion properly.🔗 Related links
entity-or-type-sidebar-item.tsx(already fixed)🔍 What does this change?
draft-entities-filters.tsx: Replaced direct icon rendering withEntityOrTypeIconcomponent for filter type iconsentity-type-header.tsx: Replaced manual URL conversion and mask styling withEntityOrTypeIconcomponentgraph-data-loader.tsx: Added relative URL to absolute URL conversion before passing icons to the graph visualization libraryAll changes follow the pattern established in
entity-or-type-sidebar-item.tsx, which was already correctly usingEntityOrTypeIcon.Pre-Merge Checklist 🚀
🚢 Has this modified a publishable library?
This PR:
📜 Does this require a change to the docs?
The changes in this PR:
🕸️ Does this require a change to the Turbo Graph?
The changes in this PR:
🛡 What tests cover this?
❓ How to test this?
Linear Issue: H-6604