Phase 20AH – Unify Word Companion / Story Intelligence Onboarding Flow
This commit is contained in:
parent
2097122898
commit
37e01f4b5d
@ -32,6 +32,13 @@ public sealed class OnboardingOptionViewModel
|
||||
public string? Badge { get; init; }
|
||||
}
|
||||
|
||||
public sealed class OnboardingJourneyHeaderViewModel
|
||||
{
|
||||
public int CurrentStep { get; init; }
|
||||
public int TotalSteps { get; init; } = 9;
|
||||
public string AriaLabel { get; init; } = "Manuscript import progress";
|
||||
}
|
||||
|
||||
public sealed class WritingJourneyOnboardingForm
|
||||
{
|
||||
[Required(ErrorMessage = "Choose the closest writing stage before continuing.")]
|
||||
|
||||
@ -3,37 +3,11 @@
|
||||
@{
|
||||
ViewData["Title"] = "Set up PlotDirector";
|
||||
var currentJourneyOrder = CurrentJourneyOrder(Model);
|
||||
var journeySteps = new[]
|
||||
{
|
||||
new { Label = "Welcome", Order = 1 },
|
||||
new { Label = "Writing Preferences", Order = 2 },
|
||||
new { Label = "Project", Order = 3 },
|
||||
new { Label = "Book", Order = 4 },
|
||||
new { Label = "Connect Word", Order = 5 },
|
||||
new { Label = "Scan", Order = 6 },
|
||||
new { Label = "Review", Order = 7 },
|
||||
new { Label = "Analyse", Order = 8 },
|
||||
new { Label = "Complete", Order = 9 }
|
||||
};
|
||||
}
|
||||
|
||||
<section class="onboarding-shell" aria-labelledby="onboarding-title">
|
||||
<div class="onboarding-panel">
|
||||
<div class="onboarding-progress" aria-label="Setup progress">
|
||||
<span>Step @Model.StepNumber of @Model.TotalSteps</span>
|
||||
<div class="onboarding-progress-track">
|
||||
<span style="width:@((Model.StepNumber * 100) / Model.TotalSteps)%"></span>
|
||||
</div>
|
||||
</div>
|
||||
<ol class="onboarding-stepper" aria-label="Story setup journey">
|
||||
@foreach (var step in journeySteps)
|
||||
{
|
||||
<li class="@JourneyStepClass(step.Order, currentJourneyOrder)">
|
||||
<span>@step.Order</span>
|
||||
<strong>@step.Label</strong>
|
||||
</li>
|
||||
}
|
||||
</ol>
|
||||
<partial name="_OnboardingJourneyHeader" model="@(new OnboardingJourneyHeaderViewModel { CurrentStep = currentJourneyOrder })" />
|
||||
|
||||
@if (Model.CurrentStep == OnboardingSteps.Welcome)
|
||||
{
|
||||
@ -255,11 +229,11 @@
|
||||
else
|
||||
{
|
||||
<div class="onboarding-copy">
|
||||
<p class="eyebrow">Ready for the next phase</p>
|
||||
<p class="eyebrow">Step @currentJourneyOrder of 9</p>
|
||||
@if (Model.IsMicrosoftWordPath)
|
||||
{
|
||||
<h1 id="onboarding-title">Connect your Word Companion</h1>
|
||||
<p>Open Microsoft Word, open your manuscript, start the PlotDirector Word Companion, and sign in using your PlotDirector account. PlotDirector will stay on this page with you while the scan and build run.</p>
|
||||
<h1 id="onboarding-title">@(currentJourneyOrder >= 6 ? "Scan Manuscript" : "Connect your Word Companion")</h1>
|
||||
<p>Open Microsoft Word, open your manuscript, start the PlotDirector Word Companion, and sign in using your PlotDirector account. PlotDirector will stay on this page with you while the scan runs.</p>
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -327,13 +301,13 @@
|
||||
type="button"
|
||||
data-onboarding-scan-start
|
||||
disabled="@(!CanStartScan(Model.CompanionPresence, Model.ScanState))">
|
||||
@(Model.ScanState.IsComplete ? "Scan again" : "Scan manuscript")
|
||||
Scan manuscript
|
||||
</button>
|
||||
<a class="btn btn-outline-primary @(Model.ScanState.IsComplete ? string.Empty : "disabled")"
|
||||
data-onboarding-scan-review
|
||||
href="@(Model.ScanState.PreviewID.HasValue ? Url.Action("ScanReview", "Onboarding", new { previewId = Model.ScanState.PreviewID }) : "#")"
|
||||
aria-disabled="@(!Model.ScanState.IsComplete)">
|
||||
@(string.Equals(Model.ScanState.ReviewStatus, ManuscriptScanReviewStatuses.ReadyToImport, StringComparison.Ordinal) ? "Edit review" : "Review scan")
|
||||
@(string.Equals(Model.ScanState.ReviewStatus, ManuscriptScanReviewStatuses.ReadyToImport, StringComparison.Ordinal) ? "Edit review" : "Review chapters")
|
||||
</a>
|
||||
</div>
|
||||
@if (string.Equals(Model.ScanState.ReviewStatus, ManuscriptScanReviewStatuses.ReadyToImport, StringComparison.Ordinal))
|
||||
|
||||
@ -19,11 +19,12 @@
|
||||
<form class="onboarding-panel onboarding-review-panel" asp-controller="Onboarding" asp-action="SaveScanReview" method="post">
|
||||
@Html.AntiForgeryToken()
|
||||
<input type="hidden" asp-for="PreviewID" name="PreviewID" />
|
||||
<partial name="_OnboardingJourneyHeader" model="@(new OnboardingJourneyHeaderViewModel { CurrentStep = 7 })" />
|
||||
|
||||
<div class="onboarding-copy">
|
||||
<p class="eyebrow">@Model.SelectedBookTitle</p>
|
||||
<h1 id="scan-review-title">Review manuscript scan</h1>
|
||||
<p>Nothing has been added to your story map yet. Choose the chapters Story Intelligence should analyse for scene creation.</p>
|
||||
<p class="eyebrow">Step 7 of 9</p>
|
||||
<h1 id="scan-review-title">Review Chapters</h1>
|
||||
<p>Review the chapters PlotDirector found before Story Intelligence begins.</p>
|
||||
<p>Scene and character scan details are shown for context only in this phase.</p>
|
||||
</div>
|
||||
|
||||
@ -260,7 +261,6 @@
|
||||
|
||||
<div class="onboarding-actions">
|
||||
<a class="btn btn-outline-secondary" asp-controller="Onboarding" asp-action="Index">Back to setup</a>
|
||||
<button class="btn btn-outline-primary" type="submit" name="intent" value="save">Save review</button>
|
||||
<button class="btn btn-primary" type="submit" name="intent" value="continue">Save and continue</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@ -5,10 +5,11 @@
|
||||
|
||||
<section class="onboarding-shell" aria-labelledby="story-intelligence-title">
|
||||
<div class="onboarding-panel">
|
||||
<partial name="_OnboardingJourneyHeader" model="@(new OnboardingJourneyHeaderViewModel { CurrentStep = 8 })" />
|
||||
<div class="onboarding-copy">
|
||||
<p class="eyebrow">@Model.SelectedBookTitle</p>
|
||||
<h1 id="story-intelligence-title">Analyse chapters with Story Intelligence</h1>
|
||||
<p>PlotDirector can now analyse your manuscript to identify scenes and begin understanding your story.</p>
|
||||
<p class="eyebrow">Step 8 of 9</p>
|
||||
<h1 id="story-intelligence-title">Analyse Manuscript</h1>
|
||||
<p>PlotDirector will analyse approved chapters in the background and prepare scene suggestions for review.</p>
|
||||
</div>
|
||||
|
||||
@if (TempData["OnboardingStoryIntelligenceError"] is string error)
|
||||
@ -59,8 +60,8 @@
|
||||
</div>
|
||||
|
||||
<section class="onboarding-form-section">
|
||||
<p>It will extract scene summaries, scene purpose, characters, locations, assets, relationships, timeline clues and story observations.</p>
|
||||
<p>For this step, only scenes are created in PlotDirector. The other discoveries are prepared for later review stages.</p>
|
||||
<p>Nothing will be created yet. PlotDirector will prepare scene suggestions for review.</p>
|
||||
<p>For this step, only scenes can be created in PlotDirector. Characters, locations, assets and relationships stay as later suggestions.</p>
|
||||
</section>
|
||||
|
||||
@if (!string.IsNullOrWhiteSpace(Model.Message))
|
||||
@ -75,9 +76,7 @@
|
||||
}
|
||||
|
||||
<div class="onboarding-actions">
|
||||
<form asp-action="ScanManuscript" method="post">
|
||||
<button class="btn btn-outline-secondary" type="submit">Scan manuscript again</button>
|
||||
</form>
|
||||
<a class="btn btn-outline-secondary" asp-action="ScanReview" asp-route-previewId="@Model.PreviewID">Back to chapter review</a>
|
||||
<form asp-action="SkipStoryIntelligence" method="post">
|
||||
<button class="btn btn-outline-secondary" type="submit">Skip for now</button>
|
||||
</form>
|
||||
|
||||
@ -5,27 +5,28 @@
|
||||
|
||||
<section class="onboarding-shell" aria-labelledby="story-complete-title">
|
||||
<div class="onboarding-panel onboarding-review-panel">
|
||||
<partial name="_OnboardingJourneyHeader" model="@(new OnboardingJourneyHeaderViewModel { CurrentStep = 9 })" />
|
||||
<div class="onboarding-copy">
|
||||
<p class="eyebrow">@Model.BookTitle</p>
|
||||
<p class="eyebrow">Step 9 of 9</p>
|
||||
<div class="onboarding-success-heading">
|
||||
<span aria-hidden="true">✓</span>
|
||||
<h1 id="story-complete-title">Your scenes have been created.</h1>
|
||||
<h1 id="story-complete-title">Manuscript import complete</h1>
|
||||
</div>
|
||||
<p>PlotDirector created scenes from the approved manuscript chapters. Characters, locations, assets and relationships were left untouched.</p>
|
||||
</div>
|
||||
|
||||
<div class="onboarding-scan-counts onboarding-review-counts">
|
||||
<div>
|
||||
<span>Chapters</span>
|
||||
<span>Chapters analysed</span>
|
||||
<strong>@Model.ChaptersCommitted</strong>
|
||||
</div>
|
||||
<div>
|
||||
<span>Scenes created</span>
|
||||
<span>Scenes prepared / created</span>
|
||||
<strong>@Model.ScenesCreated</strong>
|
||||
</div>
|
||||
<div>
|
||||
<span>Project</span>
|
||||
<strong>@Model.ProjectName</strong>
|
||||
<span>Notes needing review</span>
|
||||
<strong>None imported</strong>
|
||||
</div>
|
||||
<div>
|
||||
<span>Book</span>
|
||||
@ -34,8 +35,8 @@
|
||||
</div>
|
||||
|
||||
<div class="onboarding-actions">
|
||||
<a class="btn btn-primary" asp-controller="Writer" asp-action="Index" asp-route-projectId="@Model.ProjectID">Open Writer Workspace</a>
|
||||
<a class="btn btn-outline-primary" asp-controller="Projects" asp-action="Details" asp-route-id="@Model.ProjectID">Open Project Overview</a>
|
||||
<a class="btn btn-primary" asp-controller="Writer" asp-action="Index" asp-route-projectId="@Model.ProjectID">View scenes</a>
|
||||
<a class="btn btn-outline-primary" asp-controller="Projects" asp-action="Details" asp-route-id="@Model.ProjectID">View book</a>
|
||||
<a class="btn btn-outline-secondary" asp-controller="Projects" asp-action="Index">Back to Dashboard</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -13,9 +13,10 @@
|
||||
data-story-intelligence-run-ids="@runIds"
|
||||
data-story-max-progress-percent="@progressPercent"
|
||||
data-story-intelligence-has-active-runs="@Model.HasActiveRuns.ToString().ToLowerInvariant()">
|
||||
<partial name="_OnboardingJourneyHeader" model="@(new OnboardingJourneyHeaderViewModel { CurrentStep = 8 })" />
|
||||
<div class="onboarding-copy story-live-hero">
|
||||
<p class="eyebrow">@Model.BookTitle</p>
|
||||
<h1 id="story-progress-title">Reading your manuscript...</h1>
|
||||
<p class="eyebrow">Step 8 of 9</p>
|
||||
<h1 id="story-progress-title">Reading your manuscript</h1>
|
||||
<p>PlotDirector is analysing your chapters and preparing scenes for review. You can safely leave this page and return later.</p>
|
||||
</div>
|
||||
|
||||
@ -29,7 +30,7 @@
|
||||
}
|
||||
|
||||
<section class="alert alert-info">
|
||||
Nothing has been added to your project yet. PlotDirector is preparing suggestions. You will review them before anything is created.
|
||||
You can close Word or this browser tab once analysis has started. PlotDirector is working from a saved manuscript snapshot.
|
||||
</section>
|
||||
|
||||
<section class="story-live-progress-card" aria-label="Import progress">
|
||||
|
||||
@ -13,8 +13,9 @@
|
||||
|
||||
<section class="onboarding-shell" aria-labelledby="story-review-title">
|
||||
<div class="onboarding-panel onboarding-review-panel story-review-page">
|
||||
<partial name="_OnboardingJourneyHeader" model="@(new OnboardingJourneyHeaderViewModel { CurrentStep = 8 })" />
|
||||
<div class="onboarding-copy">
|
||||
<p class="eyebrow">@Model.BookTitle</p>
|
||||
<p class="eyebrow">Step 8 of 9</p>
|
||||
<h1 id="story-review-title">Review analysis</h1>
|
||||
<p>PlotDirector has finished reading your manuscript. Review the chapter results, then create scenes when you are ready.</p>
|
||||
</div>
|
||||
|
||||
43
PlotLine/Views/Onboarding/_OnboardingJourneyHeader.cshtml
Normal file
43
PlotLine/Views/Onboarding/_OnboardingJourneyHeader.cshtml
Normal file
@ -0,0 +1,43 @@
|
||||
@model OnboardingJourneyHeaderViewModel
|
||||
@{
|
||||
var steps = new[]
|
||||
{
|
||||
new { Label = "Welcome", Order = 1 },
|
||||
new { Label = "Writing Preferences", Order = 2 },
|
||||
new { Label = "Project", Order = 3 },
|
||||
new { Label = "Book", Order = 4 },
|
||||
new { Label = "Connect Word", Order = 5 },
|
||||
new { Label = "Scan Manuscript", Order = 6 },
|
||||
new { Label = "Review Chapters", Order = 7 },
|
||||
new { Label = "Analyse Manuscript", Order = 8 },
|
||||
new { Label = "Complete", Order = 9 }
|
||||
};
|
||||
}
|
||||
|
||||
<div class="onboarding-progress" aria-label="@Model.AriaLabel">
|
||||
<span>Step @Model.CurrentStep of @Model.TotalSteps</span>
|
||||
<div class="onboarding-progress-track">
|
||||
<span style="width:@((Model.CurrentStep * 100) / Model.TotalSteps)%"></span>
|
||||
</div>
|
||||
</div>
|
||||
<ol class="onboarding-stepper" aria-label="Manuscript import journey">
|
||||
@foreach (var step in steps)
|
||||
{
|
||||
<li class="@StepClass(step.Order, Model.CurrentStep)">
|
||||
<span>@step.Order</span>
|
||||
<strong>@step.Label</strong>
|
||||
</li>
|
||||
}
|
||||
</ol>
|
||||
|
||||
@functions {
|
||||
private static string StepClass(int order, int currentStep)
|
||||
{
|
||||
if (order < currentStep)
|
||||
{
|
||||
return "is-complete";
|
||||
}
|
||||
|
||||
return order == currentStep ? "is-current" : "is-upcoming";
|
||||
}
|
||||
}
|
||||
@ -33,7 +33,7 @@
|
||||
</section>
|
||||
}
|
||||
|
||||
@if (Model.OnboardingNudge.ShouldShow)
|
||||
@if (Model.OnboardingNudge.ShouldShow && !Model.StoryIntelligence.ShouldShow)
|
||||
{
|
||||
<section class="onboarding-dashboard-nudge @(Model.OnboardingNudge.CompanionConnected ? "is-connected" : string.Empty)"
|
||||
data-word-companion-presence="@(Model.OnboardingNudge.IsCompanionPresence.ToString().ToLowerInvariant())"
|
||||
@ -49,10 +49,10 @@
|
||||
|
||||
@if (Model.StoryIntelligence.ShouldShow)
|
||||
{
|
||||
<section class="story-intelligence-dashboard-card"
|
||||
<section class="story-intelligence-dashboard-card story-intelligence-dashboard-card--compact"
|
||||
aria-label="Story Intelligence">
|
||||
<div>
|
||||
<p class="eyebrow">Story Intelligence</p>
|
||||
<p class="eyebrow">Manuscript import</p>
|
||||
<h2>@Model.StoryIntelligence.Title</h2>
|
||||
<p>@Model.StoryIntelligence.Description</p>
|
||||
</div>
|
||||
|
||||
@ -1071,6 +1071,18 @@
|
||||
padding: 1.15rem 1.25rem;
|
||||
}
|
||||
|
||||
.story-intelligence-dashboard-card--compact {
|
||||
padding: .9rem 1rem;
|
||||
}
|
||||
|
||||
.story-intelligence-dashboard-card--compact h2 {
|
||||
font-size: 1.15rem;
|
||||
}
|
||||
|
||||
.story-intelligence-dashboard-card--compact p:not(.eyebrow) {
|
||||
font-size: .95rem;
|
||||
}
|
||||
|
||||
.story-intelligence-dashboard-card h2 {
|
||||
margin: 0 0 .35rem;
|
||||
font-size: 1.25rem;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user