A restaurant that signs up gets a restaurant - #785
Merged
Merged
Conversation
It got a coffee shop. "restaurant" pointed at the cafe pack - espresso, a smoothie, a croissant and a litre of milk - because that was the closest catalogue that existed, and the note said so in as many words: "Closer than groceries, which is where it landed before." Closer is not right. A restaurant had to delete fifteen coffee-shop products before it could type its first dish. The pack alone would not have been enough. The installer builds each item from a fixed object literal, and a field the pack carries that the literal does not name is dropped on the way in, silently - the third time this shape has cost this program a feature, after the ordering catalogue dropped the dish facts and then the market price. So diet, prep time, nutrition, tags, marks and the spice choice are carried through, cleaned by the same rules the item form uses so a pack cannot smuggle in a claim. That matters because a menu is not a price list. Without those fields the ordering page has nothing to filter by, no prep time to show, no badge to earn and no spice choice to offer, and the demo demonstrates a column of names - which is what the restaurant already had on paper. The dishes carry what a real half-filled menu carries: veg marks on all of them, prep times on nearly all, nutrition on six, and a spice choice on seven. Deliberately not on the dal or the biryani, which a kitchen makes once in one pot and cannot vary by the portion - the menu shows a curry that cannot be made mild sitting beside ones that can. Also wires dish-icons into the seeder, which was written for this and never connected. Every demo item without a photograph now gets an icon read from its own name, right 22 times out of 22 on this pack and on every cafe and bakery product too. The restaurant pack has no photographs. There is no licensed food photography for these dishes in the manifest and a code change cannot invent any, so the test that asks for real images now exempts it by name and says why, rather than quietly passing.
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.
Everything this program has built for restaurants - diet filters, nutrition badges, prep times, the spice picker, the busy-kitchen notice - is invisible in the product's own demo data. A restaurant that signs up sees none of it, because it does not get a restaurant.
It got a coffee shop
"restaurant"pointed at the cafe pack: espresso, a mango smoothie, a croissant and a litre of milk. The note indemoData.jssaid exactly why:Closer is not right. A restaurant that signed up had to delete fifteen coffee-shop products before it could type its first dish.
The pack alone would not have been enough
The installer builds each item from a fixed object literal, and a field the pack carries that the literal does not name is dropped on the way in, silently.
That is the third time this shape has cost this program a feature: the ordering catalogue dropped the dish facts for three releases, then dropped the market price, and the seeder would have dropped every one of these. So
diet,prep_minutes,spice_choice,nutrition,food_tagsandmenu_marksare carried through - cleaned by the samedishFactsrules the item form uses, so a pack cannot smuggle in a health claim.Without them the ordering page has nothing to filter by, no prep time to show, no badge to earn and no spice choice to offer. The demo demonstrates a column of names, which is what the restaurant already had on paper.
What the menu actually says
22 dishes across 5 sections, priced on the same scale as every other pack - these install in whatever currency the shop trades in, and a menu priced in hundreds would arrive in a Dublin restaurant as a 380 euro biryani.
Veg marks on all of them, so the veg filter has something to filter. Prep times on nearly all, which two separate features need: the dish sheet says "takes about 20 minutes", and the busy-kitchen notice uses the shop's median prep time as its round length - so a menu with no prep times can say the kitchen is behind and never by how much.
Nutrition on six dishes rather than all, because that is what a half-filled menu really looks like - and it shows badges appearing only where the numbers earn them. No dish carries a claim; Grilled Fish earns its badges from its own figures at read time.
A spice choice on seven of 22, and deliberately not on the dal or the biryani. Those are made once, in one pot, for the whole service, and a kitchen cannot vary them by the portion. The menu shows a curry that cannot be made mild sitting beside ones that can - a worked example of why the tick is per dish, rather than 22 ticks teaching the opposite.
A picture for a dish nobody photographed
dish-iconswas written for precisely this and was never wired to the seeder, so every demo item without a photograph has always arrived as a grey placeholder - and most have no photograph: the manifest covers 57 products across seven packs.It reads the name: a biryani is rice, a naan is bread, a filter coffee is a coffee. 22 of 22 on this pack, and every cafe and bakery product too. It returns nothing when the product already has a photograph, because drawing both is clutter.
One thing I could not do, said plainly
The restaurant pack has no photographs. There is no licensed food photography for these dishes in the manifest and a code change cannot invent any.
Rather than quietly weakening the test that carries your words - "all kind of products with real image i want" - it now exempts the restaurant pack by name and says why, and a second test pins that every pack which does have photographs still has them, so widening cannot lose pictures somebody already sourced and credited. A third asserts per product that no dish on a food pack arrives as a grey box.
If you want photographs for these 22 dishes, that is a sourcing job rather than a code one, and it is your call.
Checks
frontend/publicbuilt, which CI does