Skip to content

fix: hide app icon if not found #16684

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
merged 4 commits into from
Feb 25, 2025
Merged

fix: hide app icon if not found #16684

merged 4 commits into from
Feb 25, 2025

Conversation

mtojek
Copy link
Member

@mtojek mtojek commented Feb 24, 2025

Fixes: #14759

This PR dynamically hides icon's <img> tag if the image can't be loaded (HTTP 404).

Screenshot 2025-02-24 at 17 08 25 Screenshot 2025-02-25 at 11 20 56

@mtojek mtojek self-assigned this Feb 24, 2025
@mtojek mtojek requested a review from BrunoQuaresma February 24, 2025 16:22
@mtojek mtojek marked this pull request as ready for review February 24, 2025 16:22
@mtojek mtojek requested a review from johnstcn February 24, 2025 17:55
Copy link
Member

@johnstcn johnstcn left a comment

Choose a reason for hiding this comment

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

LGTM but deferring to the FE expert here!

@matifali
Copy link
Member

Can we also show a warning somewhere to let the user know that the path used is incorrect? I am not sure what is the best place to show the warning.

  1. Toast notification?
  2. In logs?
  3. Developer Console.?

@mtojek
Copy link
Member Author

mtojek commented Feb 25, 2025

@matifali This is strictly in the browser, so we don't have too many options. As a Coder user, I wouldn't like to see some toasts, but I believe we could drop a single console.log

@mtojek mtojek enabled auto-merge (squash) February 25, 2025 10:22
@mtojek mtojek merged commit a2d4b99 into main Feb 25, 2025
30 of 32 checks passed
@mtojek mtojek deleted the 14759-app branch February 25, 2025 10:30
@github-actions github-actions bot locked and limited conversation to collaborators Feb 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

handle invalid and nonexistent icon paths in coder_app
3 participants