solidus icon indicating copy to clipboard operation
solidus copied to clipboard

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

Open chaimann opened this issue 11 months ago โ€ข 6 comments

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 avatar Feb 14 '25 15:02 chaimann

@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?

chaimann avatar Feb 14 '25 15:02 chaimann

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?

kennyadsl avatar Feb 14 '25 15:02 kennyadsl

@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?

chaimann avatar Feb 14 '25 21:02 chaimann

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 ๐Ÿ™‚

I like this idea. This is similar to what github does with labels.

Image

tvdeyen avatar Feb 14 '25 22:02 tvdeyen

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.

tvdeyen avatar Feb 14 '25 22:02 tvdeyen

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.

fthobe avatar Feb 20 '25 13:02 fthobe