feat(#162): add first-login intro guide modal#163
Merged
Conversation
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
|
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
|
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
|
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
|
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
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://white-island-090dfd003-163.westeurope.7.azurestaticapps.net |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
$(cat <<'EOF'
Summary
IntroModal.jsx— a 5-slide CarbonModal(passiveModal) that appears on first login whenwl-intro-seenis not set in localStorageCamera,RecentlyViewed,Analytics,EventSchedule,Book),PageHeadingtitle, body textdismiss()setswl-intro-seen=1; X-button and skip also call it; modal resets to step 1 on re-open<style>App.jsx:introOpenstate +useEffectonsession;handleShowIntro()clears the key and opens modal;onShowIntroprop passed to SettingsSettings.jsxOm appen section: ghost "Vis introduksjonsguide" button (Informationicon) above the changelog accordionnb,en, andfaTest plan
localStorage, log in → modal appears automaticallywl-intro-seen; reload confirms no reappearnb,en,falocale strings all present and correct; RTL unbroken infanpm test— 82 tests passhttps://claude.ai/code/session_01H1XtRB3NXDrBNfKsM84FHq
EOF
)
Generated by Claude Code