Conversation
The IconSprites component was using an absolute URL based on NEXT_PUBLIC_WEBAPP_URL to load the sprite.svg file. If this environment variable was misconfigured (e.g., pointing to a different IP address), the icons would fail to load, resulting in empty buttons throughout the UI. This change uses a relative URL instead, which will always load the sprite from the same origin as the app, making it resilient to NEXT_PUBLIC_WEBAPP_URL misconfiguration. Also fixed pre-existing lint warnings in the file by adding proper type annotations and refactoring the ternary to an if-else function.
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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 does this PR do?
Fixes an issue where all button icons throughout the UI were empty/invisible due to the SVG sprite failing to load.
Root cause: The
IconSpritescomponent was using an absolute URL based onNEXT_PUBLIC_WEBAPP_URLto load the sprite.svg file. When this environment variable was misconfigured (e.g., pointing to a different IP address than the actual server), the browser couldn't load the sprite, resulting in empty buttons.Fix: Changed from absolute URL to relative URL (
/icons/sprite.svg), which always loads the sprite from the same origin as the app, making it resilient toNEXT_PUBLIC_WEBAPP_URLmisconfiguration.Also fixed pre-existing lint warnings in the file by adding proper type annotations and refactoring the ternary to an if-else function.
Visual Demo
Before (empty buttons):
After (icons visible):
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
NEXT_PUBLIC_WEBAPP_URLis set to a different value than the actual server URL/event-typespage/icons/sprite.svgHuman Review Checklist
Checklist
Link to Devin run: https://partner-workshops.devinenterprise.com/sessions/8994de7171004c98af6695ee31eef916
Smitches ()