Skip to content

fix(entities-plugins): prevent infinite updates for dev #1644

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 1 commit into from
Sep 23, 2024

Conversation

Justineo
Copy link
Contributor

Summary

KM-532

This PR introduces a check for changes to the src attribute, which should prevent the infinite update issue.

Currently, we are directly updating the src attribute of the <img> element within the @error handler. If the defaultIcon is invalid, this can result in an infinite update loop.

Additionally, due to a bug in Vite, even though the new URL(...) part is correctly transformed into base64 data URIs, when developing a project that depends on public-ui-components, Vite reprocesses the asset URL, leading to an invalid URL in the development environment. Combined with the original implementation of <PluginIcon>, this causes an infinite update loop during host app development (e.g., konnect-ui-apps).

I’ve also submitted a PR to address the issue in Vite itself, but since we are still using vite@4.5.3 in konnect-ui-apps, we may need this temporary fix in the meantime.

@Justineo Justineo requested review from a team as code owners September 22, 2024 16:22
@CLAassistant
Copy link

CLAassistant commented Sep 22, 2024

CLA assistant check
All committers have signed the CLA.

@Justineo Justineo merged commit 013e2a1 into main Sep 23, 2024
9 checks passed
@Justineo Justineo deleted the fix/prevent-potential-infinite-update branch September 23, 2024 02:07
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