Menu

1 / 2

Ticking a condition in our app switches on an allergy, and unticking the condition does not switch the allergy off

DEV Community: typescript·Daniel Pertu·about 23 hours ago
#GnmwBr8H
Reading 0:00
15s threshold

Munchable's on-device profile has two layers that look similar and are not.

Conditions are the eating patterns you want checked: IBS and low FODMAP, reflux, lactose, and so on. Each one has its own rule set, and the engine grades what it finds and explains the reason.

Allergies are declared, and they are checked against rather than eaten for. That layer has one hard property: it only ever adds a warning. It cannot clear anything, and it can never report an allergen as absent. If it finds nothing, that means the data we hold did not mention it, and the result screen says exactly that rather than saying you are fine.

They are two arrays on the store, deliberately, and for most of the app's life they did not interact at all. Then we added coeliac disease, which is the one condition that asks a label the same question an allergen asks.

The problem

Someone with coeliac disease ticks the condition.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.