ParlaChoreDocs

📖 ParlaChore Partial Swapper – Developer Notes

🔎 What we built to handle the front end


🧪 Lifecycle summary

  1. Page scaffold loads → initParlaChore() runs.
  2. Nav config fetched → buildNavRibbon() draws nav based on userState.
  3. Page flag read → loadPage("/partials/${page}.html").
  4. Partial swapped in → overlay content replaced, fade‑in applied.
  5. Init hook runs → e.g. initLoginPartial() attaches one‑shot listener.
  6. Form submitted → handler intercepts, calls backend, consumes JSON.
  7. State updated → <meta name="userState"> set, refreshNav() redraws nav.
  8. Next partial loaded → e.g. settings or welcome page.
  9. Error case → if page=error, load Timmy error partial instead.