-
Notifications
You must be signed in to change notification settings - Fork 266
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
feat: update registries editing page #747
Conversation
packages/renderer/src/lib/preferences/PreferencesRegistriesEditing.svelte
Outdated
Show resolved
Hide resolved
packages/renderer/src/lib/preferences/PreferencesRegistriesEditing.svelte
Outdated
Show resolved
Hide resolved
packages/renderer/src/lib/preferences/PreferencesRegistriesEditing.svelte
Outdated
Show resolved
Hide resolved
packages/renderer/src/lib/preferences/PreferencesRegistriesEditing.svelte
Outdated
Show resolved
Hide resolved
I'm unsure that the menu should appear when I hover the kebab menu. I expect to click on the button to see the context ? j31BVEkTnP.mp4 |
packages/renderer/src/lib/preferences/PreferencesRegistriesEditing.svelte
Outdated
Show resolved
Hide resolved
cf5f5b4
to
7c2d611
Compare
!serviceUrl.match( | ||
/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)/g, | ||
) |
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.
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.
moved dev dependency to the upper level to be accessible in main package and updated validation to use this valiadtor
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.
but I'm not sure, should we also mention this library in vite.config.js
here https://github.com/containers/podman-desktop/blob/pd%23446/packages/main/vite.config.js#L50
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.
If it works in production mode, no need. If it doesn't it needs
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.
got it, it works in production mode. auxiliary, I've added types for validation package, just to avoid warns that any
type is used in runtime
|
||
modifiedRegistries.push(modifiedRegistry); | ||
|
||
updateUI(); |
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.
hello, why do we have these updateUI() calls ?
UI should refresh automatically
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.
it should, but it actually doesn't refresh when we iterate over storage elements and need dynamic change the dom elements on the UI after processing onClick events, updating storage with self elements solves this problem and I think it's like a bug in svelte. so yes, here is a little workaround
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.
I think we're not doing something correct on our side.
For example for svelte, we need to reassign a value, not append to an array for example
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.
I guess you should do
modifiedRegistries = [...modifiedRegistries, modifiedRegistry]
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.
updated, thanks for pointing to this doc
523b011
to
b0876e4
Compare
The code looks way better now. Thanks I think the only blocker issue before merging is that the password is displayed by default when we add a registry or when clicking on edit. |
422f415
to
b4760fc
Compare
Signed-off-by: Vladyslav Zhukovskyi <vzhukovs@redhat.com>
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.
checked with all latest enhancements and it works great now 🎉
What does this PR do?
Part of #446
Provides an updated UI page for editing registries.
Signed-off-by: Vladyslav Zhukovskyi vzhukovs@redhat.com
Screenshot/screencast of this PR
What issues does this PR fix or reference?
#446
How to test this PR?
Open the Registries page in Settings menu.