-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
fix: ensure the extension loads even if extensions.js is loaded after the component is mounted #20559
Conversation
Signed-off-by: Yiwei Gong <imwithye@gmail.com>
❌ Preview Environment deleted from BunnyshellAvailable commands (reply to this comment):
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Thanks for detailed description and recording.
/cherry-pick release-2.12 |
Cherry-pick failed with |
/cherry-pick release-2.13 |
Signed-off-by: Yiwei Gong <imwithye@gmail.com>
Signed-off-by: Yiwei Gong <imwithye@gmail.com> Signed-off-by: Adrian Aneci <aneci@adobe.com>
In this PR, we address a minor issue with the extension, which also relates to #16842 and #19612. Previously, this issue occurred with system-level extensions, and we have now identified the same problem with resource-level extensions.
The Issue
ArgoCD loads extensions when mounting components, but if
extensions.js
is loaded after the component has already mounted, the extension fails to appear. The short video provided demonstrates this issue. Only by manually triggering a component re-render does the extension become visible again.before.mp4
We use the
console
to simulate a slow load of extensions.js. Since the webpage is fully rendered, executing code in the console does not update the UI. As a result, the resource extension and status panel extension only appear after we manually trigger a component re-render.Fix
We added an event listener to the application details component. Whenever a new extension is added, it triggers a re-render of the component, ensuring the extension appears as expected. Most importantly, the extension’s URL works correctly, regardless of whether
extensions.js
loads before or after the UI code.after.mp4
Checklist: