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: Allow to edit registries #198
Conversation
Hello @ankanroy-code and thanks for your contribution 🎉 To be able to merge pull requests on containers organization, commits need to be signed Off. |
@benoitf thanks i did it. |
Thanks for your contribution @ankanroy-code !! |
@benoitf hey i did a rebase of editmode to my main. did it work. i am new to git. so sorry,it taking time to understand what commands am i passing. |
@ankanroy-code it seems not. I mean, we shouldn't see the commits that are already in the main branch. |
@benoitf should i make a new PR from the main? |
@ankanroy-code changing git history can be done in your branch. No need to create a new one. But if it's easier for you, you may try with a new one. |
@ankanroy-code also probably we would need to share some stuff between the 'creation' and the 'update' component |
@benoitf sorry for late reply, went to college today for the first time. Just came back. If you so the rebase, please do it, it would be great help. |
Can you give me some example? Or a bit more specific explanation. I am new, so the terms are not clear. I googled it, but could not understand the question. |
The idea is that by having a common component, if for example we add a new parameter to the 'creation' panel then it's handled by the 'update/edit' part |
FYI I did rebase your branch
|
@benoitf what is 'creation' panel and what is 'update/edit' part. If you can specify the code, it world be great. |
@@ -3,6 +3,7 @@ import { onMount } from 'svelte'; | |||
import type { Registry } from '@tmpwip/extension-api'; | |||
import { registriesInfos } from '../../stores/registries'; | |||
import PreferencesRegistriesCreateRegistryModal from './PreferencesRegistriesCreateRegistryModal.svelte'; | |||
import PreferncesEditRegistrieModal from './PreferncesEditRegistrieModal.svelte'; |
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.
the filename has a typo (missing e in Preferences) and missing s at RegistrieS
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.
FYI I did rebase your branch
$ git remote add upstream https://github.com/containers/podman-desktop $ git fetch upstream $ git pull --rebase upstream main $ git push -f origin editmode
@benoitf hey I fixed it. Which brunch should I push my code to, Main or editmode.
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.
always push to editmode
(this is a the branch used to create this Pull Request)
@benoitf thxxxxxxx |
There is a PR check that is failing (linter/formatter) Ensure to run the command |
@benoitf I fixed the linter/formatter issue |
@ankanroy-code I don't see the modal file ( I see you removed the old file but in PR diff I don't see the new file) |
also I don't see any common code between create and edit modal that will lead to something harder to maintain |
Working on. It will be over in 4 hours |
@benoitf I made a common file for the functions that are reused |
I've added changes to your branch to use a single modal file (two mode: create or edit). It avoids to duplicate 200lines of code. changes are there e458aa5 |
Signed-off-by: ankanroy-code <8ankanroy@gmail.com>
Signed-off-by: ankanroy-code <8ankanroy@gmail.com>
Signed-off-by: ankanroy-code <8ankanroy@gmail.com>
Signed-off-by: ankanroy-code <8ankanroy@gmail.com>
Also add new event for update (instead of remove/add) Change-Id: I4e221e6ad5508681972e560a94a3f37781750c72 Signed-off-by: Florent Benoit <fbenoit@redhat.com>
@benoitf Nice, It reduced a lot of code. Also fixed all the problems. Thanks!!! For your help. |
UI - add feature : #156
make registries editable
Untitled.mp4
HOW I DID IT?
basic idea: delete the old registry create a new registry, using the old registry and the changed data.
why did i not used the same component?
as it was looking more complicated to do! and had to add more rendering logic in the html part.
PROBLEMS?
Please let me know any changes you world like