Skip to content
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

[Admin][Products] Enable creation and editing of option type and management of related option values #6125

Open
chaimann opened this issue Feb 14, 2025 · 6 comments
Assignees

Comments

@chaimann
Copy link
Contributor

Description

Implement the functionality to add/edit option types.

We already have an option types index page:

Image

We're missing a create/edit page that utilizes the new UI components, which could replace this part:
Image

Features

  • Interface for defining option type name and presentation.
  • Reuse the existing table component to create an option values interface.
@chaimann chaimann self-assigned this Feb 14, 2025
@chaimann chaimann converted this from a draft issue Feb 14, 2025
@chaimann
Copy link
Contributor Author

@rainerdema @tvdeyen @kennyadsl hey guys, can i get a confirmation that this one has to go in the modal as well as other similar pages?
Current description does not mention "modal component" compared to other tickets, and the reason why I hesitate is that this page is a bit different from others where we could have just a few fields, while here there is a dynamic nature to it with the ability to add new Option Values, so the content can overgrow the modal frame.

Should it still be a modal and just scroll the content as needed?

@kennyadsl
Copy link
Member

I think you can refer to the figma file for this section here.

The product edit page is a big one, we need to start sooner or later so feel free to continue with this if you feel ready. I guess the strategy here is to move some components that are on separate pages on the legacy admin into the product form, and remove the tab. How does that sound?

@chaimann
Copy link
Contributor Author

@kennyadsl
i've checked the design files and get the idea, but I feel the design is a little bit incomplete and/or tries to handle too many things in one section. Since it's a many-to-many relation between products and option_types, this section will have to be able to provide interface to CRUD both option_types and product_option_types resources, which might be a little bit cumbersome to fit in a single place.

As I understand current design shows the flow for a new option type creation, but it's not clear how one can associate an already existing option type with a product. We could for example show a dropdown with all existing options from which user can choose multiple appropriate options; if none are relevant there can be a button "Create new option" which would bring up the form shown on the design, where user can create a new option and link it to the product.

But then there is also the need to incorporate edit/delete functionality, and to be fair I can't think of a user-friendly way to do that in one section right now.

So there are two possible options here:

  • we can keep separate page/tab in the menu to CRUD option_types and keep the "Option Types" section on the product form responsible for CRUD of product_option_types only (with a link to direct a user to create new option types if they need to) - this would be less complex, therefore less bugs 🙂
  • we can stick to the current strategy and rethink the UI a bit more, in order to create a friendly and intuitive flow for the users

What do you think?

@tvdeyen
Copy link
Member

tvdeyen commented Feb 14, 2025 via email

@tvdeyen
Copy link
Member

tvdeyen commented Feb 14, 2025

We could move the Option Types CRUD to the Settings section if we want to declutter the Product menu. Like return and adjustment reasons this is more a configuration than product data. But we also can keep in the product menu.

@fthobe
Copy link
Contributor

fthobe commented Feb 20, 2025

The product edit page is a big one, we need to start sooner or later so feel free to continue with this if you feel ready. I guess the strategy here is to move some components that are on separate pages on the legacy admin into the product form, and remove the tab. How does that sound?

I think removing tabs for the sakè of removing tabs is inpractical

I would Actually consider having frequently touched stuff

  • stock
  • prices
  • maybe some light weight analytics

On the First Page and tab out stuff Nobody used twice like Images and data entry (names, descriptions,...) tabbed away.

99% of the times i come for stock and prices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

4 participants