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

Marketplace 🛒: Member may add Products to Marketplace #844

Merged
merged 13 commits into from
Oct 6, 2022

Conversation

anaulin
Copy link
Member

@anaulin anaulin commented Sep 22, 2022

For #831

TODO

  • make controller create action work
  • render the created project on the page
  • Validate Products Name

anaulin and others added 2 commits September 21, 2022 18:14
@anaulin anaulin force-pushed the ensemble/marketplace-furniture branch from ef86f5e to 708f36a Compare September 22, 2022 01:33
anaulin and others added 3 commits September 21, 2022 19:02
This starts to shift our Furniture and Item system away from an
inheritance oriented rails-adjacent structure to a more Rails-forward
structure.

Furniture now places it's routes against the *room*, which allows it to
support either Singleton-type Resource routes, or more traditional
Resources routes.

Further, it brings the `Placeable` interface a bit closer to
ActiveRecord; which should reduce pain-points as we unwind the current
overly-restrictive and complex Furniture/Item design.

* Marketplace: Products are shown!

* Use correct parameter name in request spec

Rails assumes that your parameter names will match the namespace of the
model. For example, a `Marketplace::Product#name` Rails will make HTTP Params
of `marketplace_product[name]`, I had previously assumed it would name
them `product[name]` because I thought it would discard the stuff before
the `::`.

Co-authored-by: Neer Thapa <[email protected]>

* Rename from `routing_context` to `router`

@anaulin had suggested that `routing_context` was confusing; and I
agree. It's just the router! So let's name it that way!

Co-authored-by: Neer Thapa <[email protected]>

* All `Placeable` now implement `to_partial_path`

Co-authored-by: Neer Thapa <[email protected]>

Co-authored-by: Zee Spencer <[email protected]>
Co-authored-by: Neer Thapa <[email protected]>
@zspencer zspencer marked this pull request as ready for review October 2, 2022 17:29
zspencer and others added 8 commits October 2, 2022 10:38
This makes the user experience for adding a product even tighter; by
hiding the Product form until the Distributor is adding a new product.

Once they do, we replace the entire marketplace with the New Product
form; and upon successful create, we replace the entire marketplace with
the full Marketplace view!

Co-authored-by: Neer Thapa <[email protected]>
Still need to figure out how to redirect to furniture

Co-authored-by:  Kelly <[email protected]>
Co-authored-by:  Zee <[email protected]>
Co-authored-by:  Ana <[email protected]>
Validate that `Marketplace::Product` belongs to a space

Co-authored-by:  Kelly <[email protected]>
Co-authored-by:  Zee <[email protected]>
Co-authored-by:  Ana <[email protected]>
@zspencer zspencer changed the title [WIP] Marketplace 🛒 Marketplace 🛒: Member may add Products to Marketplace Oct 6, 2022
Copy link
Member

@zspencer zspencer left a comment

Choose a reason for hiding this comment

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

Woooo! I love it! Will merge once green!

@anaulin anaulin merged commit 074fee6 into main Oct 6, 2022
@anaulin anaulin deleted the ensemble/marketplace-furniture branch October 6, 2022 01:38
@zspencer zspencer mentioned this pull request Oct 13, 2022
15 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants