0.1.2.1 Change varietal volume
The next task to solve was how we can allow the users to delete and add varietals, considering that before they press the 'Create your label' button, the volume should always be 100%.
If the user deletes a varietal, then the remaining one becomes 100%.
We developed the following logic. If there’s one varietal, and the user adds one more, then the second one adds up to 100%. The same happens when the user changes the percentage of one of the two varietals. The total volume is always 100%
If there are two varietals in the blender, and the user adds one more, its percentage is 5 percent, and the total percentage is now 105%, highlighted in red. If the user presses on the CTA, then we show a notification that offers to distribute varietals proportionally to make it 100%
Same happens when the total percentage is less than 100%