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

Replace new product inline form with normal form #2493

Merged
merged 6 commits into from
Jan 11, 2018

Conversation

jhawthorn
Copy link
Contributor

@jhawthorn jhawthorn commented Jan 9, 2018

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 product It does work, but is cleared if validations fail due to a bug in friendly_id, which I will file there
  • Slug should not be required on new records (it is generated automatically)
  • Missing breadcrumbs
  • Should we add the tabs? Disabled? Can't render. We can revisit if this is important
  • Fix specs?

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
@jhawthorn
Copy link
Contributor Author

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.

@jhawthorn jhawthorn removed the WIP label Jan 10, 2018
Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏 Nice!

Copy link
Contributor

@jordan-brough jordan-brough left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@gmacdougall
Copy link
Member

Great work John!

@gmacdougall gmacdougall merged commit b60c72f into solidusio:master Jan 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:solidus_backend Changes to the solidus_backend gem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants