Add formula template walkthrough and UX improvements
- 7-step guided walkthrough modal (concept, output modes, fields, formula, testing, box example, cylinder example); auto-shown first time the tab opens with no templates; always accessible via "How it works" button - Variable pill badges below formula input showing all valid field names + rate; update live as fields are added/renamed; clickable to insert at cursor - Fix: Add Field no longer shows validation error on blank new rows; validation only fires once the user has typed something - Help article: added Common Formula Patterns section with box, cylinder, and flat panel worked examples (fields table + formula + expected output) - HelpKnowledgeBase updated with pattern examples and walkthrough note Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1401,7 +1401,11 @@ public static class HelpKnowledgeBase
|
||||
Using in wizard: item wizard shows "Custom Formula Item" card if active templates exist → choose template → template diagram shown for reference → enter measurements → Calculate → verify result → continue to coatings/prep steps
|
||||
Formula variable names: snake_case, letters/digits/underscores only. Reserved variable: "rate" (pre-populated from Default Rate).
|
||||
NCalc syntax: +, -, *, /, %, Pow(b,e), Abs(x), Round(x,d), Max(a,b), Min(a,b), Sqrt(x)
|
||||
Example formula (box, inches): 2*(l*w + l*h + w*h) / 144 * rate
|
||||
Common formula patterns (all Fixed Rate, divide inches by 144 to get sqft):
|
||||
- 6-sided box: fields l_in/w_in/h_in → 2*(l_in*w_in + l_in*h_in + w_in*h_in) / 144 * rate
|
||||
- Cylinder: fields d_in/h_in → (3.14159 * d_in * h_in + 2 * 3.14159 * Pow(d_in/2, 2)) / 144 * rate
|
||||
- Flat panel: fields l_in/w_in → l_in * w_in / 144 * rate
|
||||
Walkthrough: first time opening Custom Formulas tab with no templates triggers a 7-step guided tour automatically; also accessible via "How it works" button
|
||||
Help article: Help → Custom Formula Item Templates
|
||||
""";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user