-
Notifications
You must be signed in to change notification settings - Fork 23
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
Switch to use <EuiSuperselect /> component to list docker registery in router deployment #396
Switch to use <EuiSuperselect /> component to list docker registery in router deployment #396
Conversation
bec016a
to
e20b466
Compare
e20b466
to
add1b11
Compare
Thanks for this PR! Hmm do you have any idea what's causing the infinite re-rendering? The popover's supposed to have an effect that's similar to what's shown in the video below: Screen.Recording.2024-11-14.at.10.38.42.movYou can take a look at the code snippet here corresponding to that part above (which looks super similar to what you're working on) and maybe you might figure out what's causing the popover to break 🤔 |
@deadlycoconuts yeah valid point, I was unsuccessful cornering the setstate which is causing the exception. I suspect, the dropdown updates registry, on change of registry, it re-renders the parent component, but as mentioned I was not able to corner it. So I moved away to use "EuiSuperselect" which helped
|
Attaching more manual testing details for adding new registry
One caveat/catch is that config only allows urls to be passed and no other option to pass user friendly name. This is something we could consider refactoring in future |
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.
Thanks a lot for finding an alternative component from the EUI library to replace the EuiPopover/EuiContextMenu combination that somehow isn't working. I believe there's some issue in the parent component using the DockerRegistryPopover that's probably triggering unnecessary re-renders but we'll probably have to come back to this another time :/
ui/src/components/form/docker_image_combo_box/DockerRegistryPopover.js
Outdated
Show resolved
Hide resolved
ui/src/components/form/docker_image_combo_box/DockerRegistryPopover.js
Outdated
Show resolved
Hide resolved
ui/src/components/form/docker_image_combo_box/DockerRegistryPopover.js
Outdated
Show resolved
Hide resolved
hi @deadlycoconuts thanks for sharing the comments. I have addressed your comments with the latest commit. I have kept those open for you to take a look again. Thanks and let me know your thoughts in case there are any more to address! |
Thanks a lot for addressing them! I think we're good to merge this PR! Once this is done we can cut a patch release like this one here https://github.com/caraml-dev/turing/releases/tag/v1.20.2! |
At the time of writing, clicking Docker Image Registry list in Turing UI leads to an error page. This happens because of "Maximum update depth exceeded" which happens usually as infinte re-rendering is blocked. While toggling the popover, the state re-rendering is causing infinte reload. I couldn't find any extra value addition in using "EuiPopover" over the simple EuiSuperSelect.
The MR fixes the issue by choosing switching from "EuiPopover" to use "EuiSuperSelect" component
Test plan - https://drive.google.com/file/d/1CLl-RoVwO8dhiDmv8YUMJRNT3IJdMiK3/view?usp=sharing (limited access)