sharkio-dev / sharkio

Sharkio is an API proxy for your development environments. It records all the requests that are sent to your API. It allows you to replay the requests easily. Generate types, documentation, test suites, And interact with your API using AI.
https://sharkio.dev/
MIT License
5 stars 1 forks source link

Generic modals and manage with query params instead of state #347

Open IdoPeled8 opened 9 months ago

IdoPeled8 commented 9 months ago

there is a lot of edit\delete\add modals that are the same. 1 - change all of them to use the new generic modal. 2 - make the modals work using query params instead of state for better navigation

adetyaz commented 9 months ago

@IdoPeled8 Can I work on this?

adetyaz commented 9 months ago

hey @IdoPeled8 No one got back to me about getting the project running

adetyaz commented 8 months ago

Hey @IdoPeled8 I have a question?

Do I just create the modal with placeholder data that shows it works or do I need to go further and add one of the available features as an example

IdoPeled8 commented 8 months ago

Hi,

We have a GenericEditingModal component that currently only the workspaces are using. You need to make all the other places use this component instead of creating a new modal for each component that needs it. This is particularly for simple modals like edit, add, delete with only one input.

For a start, add it in one place where it's needed and create a pull request so the maintainers can review it. Once confirmed, we can proceed to implement it everywhere.

I have added a photo of the generic component and a photo of the component that is currently using the modal.

Thanks, image image

adetyaz commented 8 months ago

To clarify, I don't need to create another modal from scratch right(which I did initially before asking). I just need to implement this for other usecases?

IdoPeled8 commented 8 months ago

To clarify, I don't need to create another modal from scratch right(which I did initially before asking). I just need to implement this for other usecases?

Yes use the existing one, But if you think you made a better modal than the existing one you can use him

adetyaz commented 8 months ago

I'll be using the existing one, the modal is created is quite similar and the existing one is a touch more better. I