Skip to content

feat(#162): add first-login intro guide modal#163

Merged
ChristopherRotnes merged 5 commits into
masterfrom
claude/display-open-issues-gLgod
May 12, 2026
Merged

feat(#162): add first-login intro guide modal#163
ChristopherRotnes merged 5 commits into
masterfrom
claude/display-open-issues-gLgod

Conversation

@ChristopherRotnes
Copy link
Copy Markdown
Owner

@ChristopherRotnes ChristopherRotnes commented May 11, 2026

$(cat <<'EOF'

Summary

  • Adds IntroModal.jsx — a 5-slide Carbon Modal (passiveModal) that appears on first login when wl-intro-seen is not set in localStorage
  • Each slide: 64px Carbon icon (Camera, RecentlyViewed, Analytics, EventSchedule, Book), PageHeading title, body text
  • Navigation: ghost "Hopp over" (any step), secondary "Forrige" (hidden on step 1), primary "Neste" / "Kom i gang" (step 5)
  • Step indicator ("Steg N av 5") and replay hint (step 5 only) rendered in modal body
  • dismiss() sets wl-intro-seen=1; X-button and skip also call it; modal resets to step 1 on re-open
  • Responsive: max-width 560px desktop, full-viewport ≤500px via inline <style>
  • App.jsx: introOpen state + useEffect on session; handleShowIntro() clears the key and opens modal; onShowIntro prop passed to Settings
  • Settings.jsx Om appen section: ghost "Vis introduksjonsguide" button (Information icon) above the changelog accordion
  • All strings translated in nb, en, and fa

Test plan

  • Clear localStorage, log in → modal appears automatically
  • All 5 slides navigate correctly; step indicator updates; "Forrige" hidden on step 1
  • "Hopp over" on any step closes modal and sets wl-intro-seen; reload confirms no reappear
  • X-button also sets key and closes
  • "Kom i gang" on step 5 shows replay hint, sets key, closes
  • Settings → Om appen → "Vis introduksjonsguide" reopens modal from step 1
  • nb, en, fa locale strings all present and correct; RTL unbroken in fa
  • Mobile (≤500px): full-viewport; desktop: centred at 560px max
  • npm test — 82 tests pass

https://claude.ai/code/session_01H1XtRB3NXDrBNfKsM84FHq
EOF
)


Generated by Claude Code

Five-slide Carbon Modal walks new users through Upload → History →
Report → Planner → Library on first login (gated by wl-intro-seen in
localStorage). Skip/Prev/Next/Get-started navigation; step indicator;
replay hint on final slide. Settings → Om appen gains a ghost replay
button that clears the key and reopens from step 1. All strings
translated in nb, en, and fa.

https://claude.ai/code/session_01H1XtRB3NXDrBNfKsM84FHq
@github-actions
Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://white-island-090dfd003-163.westeurope.7.azurestaticapps.net

Always mounting IntroModal caused Carbon's Theme wrapper and Modal
overlay elements to persist in the DOM when closed, leading to a
white flash on the History calendar and mouseover issues. Render
only when introOpen is true so nothing from the modal exists in
the tree while it's closed.

https://claude.ai/code/session_01H1XtRB3NXDrBNfKsM84FHq
@github-actions
Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://white-island-090dfd003-163.westeurope.7.azurestaticapps.net

ThemeProvider was setting data-theme via useEffect, which runs after
the first render. During that frame --surface-card (and other tokens
only defined inside [data-theme="g100"]) were undefined, so calendar
cells fell back to white. Setting data-theme synchronously inside the
useState initializer ensures the attribute is on <html> before any
component renders.

https://claude.ai/code/session_01H1XtRB3NXDrBNfKsM84FHq
@github-actions
Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://white-island-090dfd003-163.westeurope.7.azurestaticapps.net

Adds a blocking inline script in index.html that reads carbon-theme
from localStorage (with prefers-color-scheme fallback) and sets
data-theme on <html> before any CSS or React touches the page.
Closes the remaining flash window between HTML parse and bundle
execution that the useState synchronous fix could not reach.

https://claude.ai/code/session_01H1XtRB3NXDrBNfKsM84FHq
@github-actions
Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://white-island-090dfd003-163.westeurope.7.azurestaticapps.net

IntroModal is now conditionally rendered so it always mounts fresh
with step=0 — the useEffect that reset step on open is dead code.
Also documents the theme FOUC fixes in CHANGELOG.

https://claude.ai/code/session_01H1XtRB3NXDrBNfKsM84FHq
@ChristopherRotnes ChristopherRotnes marked this pull request as ready for review May 12, 2026 06:18
@ChristopherRotnes ChristopherRotnes merged commit 23f5620 into master May 12, 2026
3 checks passed
@ChristopherRotnes ChristopherRotnes deleted the claude/display-open-issues-gLgod branch May 12, 2026 06:18
@github-actions
Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://white-island-090dfd003-163.westeurope.7.azurestaticapps.net

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants