-
-
Notifications
You must be signed in to change notification settings - Fork 729
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
send-shipment-email-optionally #11762
send-shipment-email-optionally #11762
Conversation
ab03a22
to
3a99a57
Compare
Moving back to In Dev, as this is still a draft PR |
09be01e
to
6fbcbec
Compare
6fbcbec
to
257cffc
Compare
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.
Thank you, this is great. There's just one little thing that I like changed.
%div{class: "margin-bottom-30"} | ||
= hidden_field_tag :id, order.id | ||
= check_box_tag :send_shipment_email | ||
= label_tag :send_shipment_email, "Send email confirmation to customer" |
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.
This needs a translations.
%form | ||
= render ConfirmModalComponent.new(id: "ship_order", confirm_reflexes: "click->Admin::OrdersReflex#ship", controller: "orders", reflex: "Admin::Orders#ship") do | ||
%div{class: "margin-bottom-30"} | ||
%p This will mark the order as Shipped |
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.
Here, too.
%div{class: "margin-bottom-30"} | ||
= hidden_field_tag :id, order.id | ||
= check_box_tag :send_shipment_email | ||
= label_tag :send_shipment_email, "Send email confirmation to customer" |
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.
And here.
@mkllnk Thanks for the review. I will work on this tomorrow. Was out sick past couple of days! |
@mkllnk Done |
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 ! 🙏
Hi @binarygit, Here are my test results. The short versionUnfortunately the specification was incomplete - there is a third place for marking an order as shipped. It's listed as an action in the actions dropdown menu as well. This alone wouldn't be a problem, but unfortunately the behaviour of that action has now changed after this PR - which is why I think that this is a regression we should fix before releasing. Before your PR there was always the email sent without asking, after your PR there is no email sent without asking (using the actions dropdown). Users can't notice and this will cause irritation for sure. We should avoid that. The long versionPlaces to test
DesignNote: I tested with the new design as well as the legacy one, but images are taken from the new one only. I think we should have the checkbox active as default value because this mimics the behaviour before the PR. Users could be very annoyed by the extra clicks when following their standard workflows. To be confirmed by @openfoodfoundation/train-drivers-product-owners. Also we have three different designs of the modal now:
If not too much work we should unify and in my opinion we should copy this one: To do:
Admin vs. super admin usersFunctionality and design are identical for both users. ✔️ Action dropdown opens automaticallyAfter marking an order as shipped via the button on the edit order page, the actions dropdown is opened automatically even though the mouse is positioned somewhere else on the screen. This is a (minor) regression as well. Peek.2023-12-04.20-54.mp4ConclusionI think we should improve before merging. Would you be ok with that @binarygit? Thanks for your work on this again! 🙏 |
Yes good call on marking the checkbox active by default 👍 thanks @drummer83 Regarding the designs perhaps we can work on this in a separate PR? If the behavior works, it's a nice little improvement (so many people ship by mistake and then can't cancel anymore). Of course if it's fast to add it, forget me :) Nice to have you back @binarygit 😍 |
@drummer83 Thank You so much for the through testing and your remarks. I agree with you. I don't think it will take alot of time to incorporate these changes. I'll work on this this evening and should finish. |
059de87
to
007c95b
Compare
007c95b
to
8114d6e
Compare
Hi @binarygit, Button on page /orders
Button on page /admin/orders/<order_number>/edit
Action from dropdown menu
ConclusionI'm really sorry. I think we have to look at the two failing cases. 😢 |
Thanks for testing this @drummer83 . I'll look into what's happening and push a fix. |
ecd2f9f
to
e7c806b
Compare
e7c806b
to
e865f27
Compare
@drummer83 Could you please test this again? The recent commit fixes the issues you mentioned above and also adds tests! The meat of the commit is adding the tests which is why I am not re-requesting a review. Also I think the whole commit history is shown as "new" because I rebased latest changes from master and there was a conflict in one file which I resolved. |
Hi @binarygit, Button on page /orders
Button on page /admin/orders/<order_number>/edit
Action from dropdown menu
ConclusionGreat! We are there now! 🥳 |
What? Why?
What should we test?
Scenanio 1:
/admin/orders
Scenario 2:
/admin/orders/<order_number>/edit
Release notes
Changelog Category (reviewers may add a label for the release notes):
The title of the pull request will be included in the release notes.
Dependencies
Documentation updates