Adding is never a request, and a request says what it would do - #791
Merged
Merged
Conversation
Two things, both about the moment a customer changes their mind. MORE FOOD NEEDS NOBODY'S PERMISSION. An extra naan costs the kitchen a naan it is glad to sell: nothing is wasted, nothing already cooked is thrown away, and the only answer anybody was ever going to give is yes. Holding that in a queue until somebody notices is a customer waiting on a decision that was not one. Taking something away is the opposite - the biryani may be in the pan, and whether it can be called back is a judgement only somebody in the kitchen can make. So the window now gates only the taking away. Inside it nothing has started and the order is still the customer's, exactly as before. Outside it, a request carrying both has its halves answered separately: the naan is already being made by the time the shop reads the question about the biryani. A delivery or a hotel room is still refused outright in both directions, because that is somebody else's money in the total rather than a question about the kitchen. AND THE CARD SAYS WHAT IT WOULD DO. It listed only the lines that moved, so "Chicken Biryani: 2 to 1" told a person nothing about whether that was most of the order or a detail of it - they had to open the sales screen to find out, by which time they were no longer deciding in a hurry. Every line is drawn now, the untouched ones stepped back, with what it was and what it would become side by side. And every request said "Asked to change", whether a customer had dropped one naan or emptied the order. Now that adding never becomes a request, every one of them is something being taken away and the card can say which: cancel the whole order, remove everything on it, remove an item, remove some items, or simply asked for fewer. A line going to nothing says REMOVED rather than "1 to 0", which is a sentence nobody reads at a glance. A request made before this shipped can still be sitting in the queue carrying an addition, so the card still reads one.
Contributor
|
Merged to Try it at https://develop.posnic.io, or run it yourself: git fetch origin develop && git checkout develop
npm install && npm --prefix api install
npm run dev # then http://localhost:3000When you have tested it, say what you did and what happened, and set Reporting that something is broken is as useful as fixing it. It is |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two asks, both about the moment a customer changes their mind.
More food needs nobody's permission
The asymmetry is real rather than a convenience. An extra naan costs the kitchen a naan it is glad to sell: nothing is wasted, nothing already cooked is thrown away, and the only answer anybody was ever going to give is yes. Holding that in a queue until somebody notices is a customer waiting on a decision that was not one.
Taking something away is the opposite. The biryani may be in the pan. That is food already paid for in labour and ingredients, and whether it can be called back is a judgement only somebody standing in the kitchen can make.
So the window now gates only the taking away. Inside it nothing has started and the order is still the customer's, exactly as before. Outside it, a request carrying both has its halves answered separately: "two more naan and drop the biryani" used to wait as a single wish until somebody looked - now the naan is already being made by the time the shop reads the question about the biryani.
A delivery or a hotel room is still refused outright in both directions. That is not the same argument: the window is about the kitchen having started, a venue commission is somebody else's money in the total, and adding to it moves what they are owed.
The bug that would have been
changeCustomerOrderItemsreads its list as the order the customer wants, so a line left out of it is a line removed. Sending "just the additions" would have silently cancelled everything else - the exact opposite of a request to add something. There is a test named after it.And the card says what it would do
It listed only the lines that moved. "Chicken Biryani: 2 to 1" tells a person nothing about whether that is most of the order or a detail of it, so they open the sales screen to find out - by which time they are no longer deciding in a hurry.
Every line is drawn now, the untouched ones stepped back, with what it was and what it would become side by side:
A line going to nothing says REMOVED rather than "1 → 0", because zero is the single most skimmable-past number on a card full of numbers.
"Cancel item or cancel order"
Every request used to say "Asked to change", whether a customer had dropped one naan or emptied the order. Now that adding never becomes a request, every change request is something being taken away, so the card can finally name the question: Cancel the whole order / Remove everything on the order / Remove an item / Remove some items / Asked for fewer.
"Remove everything" matters on its own: a shop that says yes to that has no order left, and calling it "remove some items" would have somebody end an order thinking they were trimming it.
Two things caught while building
A request already in the queue can carry an addition made before this shipped, and one with no
itemsat all predates the queue sending the whole order. The renderer reads both; the existing dock test now says so.A code example inside a comment became a translation site again - the collision scanner reads the two-argument
i18n.tform out of source, and a comment explaining that rule contained one. Same trap as three weeks ago, same fix.Captain has no requests surface at all
You said "desktop or captain app". Desktop has the dock and this improves it. Captain does not have this at all -
grepforchange_requested,cancel_requestedor any attention queue across that repo returns nothing. A waiter on a handset cannot see a customer's request today and this PR does not change that; it is a separate piece of work in another repo, and I would rather say so than half-build it here.Checks
frontend/publicbuilt, which CI doeslang_keys in all 17 packs, each spelled out so the scanner can see it; English answers 3,393 of 3,393