-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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(dashboard): restructure create product flow #7374
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Ignored Deployments
|
|
Very nice! Minor thing: We should default to having all variants checked in the first step of the flow |
Also, another thing: When selecting "No variants", we should create a default variant under the hood. The details should just say "Default variant" etc. I should have mentioned this earlier, my bad. |
@olivermrbl should this be for the first option only or? What if the user creates an option, selects only some variants for creation and then creates a new option, which variants are checked then? |
If we can have a control flow like so, that would be great: Scenario 1:
Scenario 2:
Scenario 3:
|
@olivermrbl we create that on the admin, right? Do we create the default variant right after the first step is complete or when we send the payload? Because if we create a default variant for the user should we also create default pricing and inventory stuff for that variant? |
Yeah, we should still allow merchants to specify pricing and inventory for the default variant. Something like this. Lemme just validate the design with Ludvig |
@olivermrbl @kasperkristensen would love to hear your thoughts on this one |
Will give this a spin today! Are there any larger todos remaining? |
No, should be ready for review |
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.
Couple of things:
We need to initialize the values of each field when we create a variant in-memory. If not we get two issues: The input changes from uncontrolled to controlled, and if you add a value to a field that isn't inited, and then hit cmd + z it will insert the value "undefined" into the field.
The grid gets laggy when you have many variants, and you are horizontally scrolled so all of the boolean cells are rendered. I saw a good amount of performance increase when I changed the country select cell to render a placeholder when its not the anchor cell. Think we should do this for all "complex" cells, but fine to leave for now, as the grid is still WIP (need to address the things I've outlined in the comment above the component).
...ls-form/components/product-create-details-general-section/product-create-general-section.tsx
Outdated
Show resolved
Hide resolved
…n input, create default variants/options initially
I addressed the other comment but I think that we should address bulk editor WIP stuff and performance optimisations in a separate ticket |
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.
Approving this, so we can tackle the rest in follow-up PRs. What do you think @kasperkristensen?
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.
Lets merge it in, I think most if not all current issues are related to the DataGrid, which we can tackle later.
WHAT
Other
NOTE