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: Delivery constraints live on DeliveryArea #1420

Merged

Conversation

zspencer
Copy link
Member

Allowing a Marketplace to specify it's delivery fees, constraints, etc. and a DeliveryArea to override them was putting us in a bit of a mess from "how does data even?!"

This consolidates everything onto DeliveryArea, yay!

@zspencer zspencer requested a review from a team April 30, 2023 18:17
@zspencer zspencer force-pushed the marketplace/delivery/migrate-delivery-info-off-marketplace branch 3 times, most recently from 2b5efd5 to fede865 Compare April 30, 2023 18:26
zspencer added a commit that referenced this pull request Apr 30, 2023
- Prerequisite for #1420

- #1325
- #1136
- #1185

This does not get rid of the reading of the fields; but it does make it
so they are no longer writable; which will make the "stop reading from
them!" PR a bit tidier.
@zspencer zspencer force-pushed the marketplace/delivery/migrate-delivery-info-off-marketplace branch from fede865 to 19fa3a2 Compare April 30, 2023 18:36
@zspencer zspencer changed the base branch from main to marketplace/wire-carts-and-delivery-areas-together April 30, 2023 18:37
@zspencer zspencer changed the title Marketplace: Delivery constraints live on DeliveryArea 🥗🧹 Marketplace: Delivery constraints live on DeliveryArea Apr 30, 2023
@zspencer zspencer force-pushed the marketplace/delivery/migrate-delivery-info-off-marketplace branch from 19fa3a2 to 83318a4 Compare April 30, 2023 18:47
@zspencer zspencer added 🧹 refactor Includes non-behavioral changes 🥗 test automation Adds some automated tests. V nutritious. labels Apr 30, 2023
zspencer added a commit that referenced this pull request Apr 30, 2023
- Prerequisite for #1420

- #1325
- #1136
- #1185

This does not get rid of the reading of the fields; but it does make it
so they are no longer writable; which will make the "stop reading from
them!" PR a bit tidier.
@zspencer zspencer force-pushed the marketplace/wire-carts-and-delivery-areas-together branch from 1fe029a to 07cbf20 Compare April 30, 2023 19:49
@zspencer zspencer force-pushed the marketplace/delivery/migrate-delivery-info-off-marketplace branch from 83318a4 to 7daecf4 Compare April 30, 2023 19:50
Base automatically changed from marketplace/wire-carts-and-delivery-areas-together to main May 4, 2023 00:35
zspencer added a commit that referenced this pull request May 4, 2023
…1422)

🧹 `Marketplace`: `DeliveryConstraint`s only set in `DeliveryArea`

- Prerequisite for #1420

- #1325
- #1136
- #1185

This does not get rid of the reading of the fields; but it does make it
so they are no longer writable; which will make the "stop reading from
them!" PR a bit tidier.
def initialize(cart:, order_by: cart.marketplace.order_by,
delivery_window: cart.marketplace.delivery_window, **kwargs)
def initialize(cart:, order_by: cart.delivery_area&.order_by,
delivery_window: cart.delivery_area&.delivery_window, **kwargs)
Copy link
Member

Choose a reason for hiding this comment

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

Is this ever used with a different order_by and delivery_window passed in? It feels like this could be tightened to just accept cart.

Not part of your changes, just thinking out loud.

Copy link
Member Author

Choose a reason for hiding this comment

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

That would be nice! I don't remember exactly why I had done it this way the first time; but I think it was because I was using component previews or something to test.

- #1325
- #1136
- #1185

Allowing a `Marketplace` to specify it's delivery fees, constraints,
etc. and a `DeliveryArea` to override them was putting us in a bit of a
mess from "how does data even?!"

This consolidates everything onto `DeliveryArea`, yay!
@zspencer zspencer force-pushed the marketplace/delivery/migrate-delivery-info-off-marketplace branch from 7daecf4 to 11f48ef Compare May 4, 2023 00:36
@zspencer zspencer merged commit 4b292d3 into main May 4, 2023
@zspencer zspencer deleted the marketplace/delivery/migrate-delivery-info-off-marketplace branch May 4, 2023 00:41
@zspencer zspencer added this to the 1.0 - Andromeda milestone May 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧹 refactor Includes non-behavioral changes 🥗 test automation Adds some automated tests. V nutritious.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants