-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Replace new product inline form with normal form #2493
Conversation
Previously, creating a new product involved filling out a small inline form which held with only the required attributes of a product. This requires admin users to understand and learn to use two separate forms with the same purpose (filling in product data). It's also awkward if the user wants to fill in some of the information not on this page as they have to create the product. This commit removes the inline new product form in favour of linking to a new product page with the same form as the edit page.
Slug is generated automatically if empty
1b04005
to
c9adade
Compare
A compromise required to make this work: the slug field needs to be disabled when creating a new product in order to keep the behaviour we had previously (slug generated on create, slug required when updating). I think this is a reasonable solution and we can address it later if there is a preferred UX design. |
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.
👏 Nice!
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.
💯
Great work John! |
Previously, creating a new product involved filling out a small inline form which held with only the required attributes of a product.
This requires admin users to understand and learn to use two separate forms with the same purpose (filling in product data). It's also awkward if the user wants to fill in some of the information not on this page as they have to create the product and then fill in the rest of the information they cared about.
This commit removes the inline new product form in favour of linking to a new product page with the same form as the edit page.
Before:
After:
Todo:
Specifying slug doesn't work on a new productIt does work, but is cleared if validations fail due to a bug in friendly_id, which I will file thereShould we add the tabs? Disabled?Can't render. We can revisit if this is important