Modernise Scenario board and comparison with shared theme tokens
This commit is contained in:
parent
ba322b1e54
commit
0dddaf5dd8
@ -73,3 +73,7 @@ For Dev-only verification, provision an identity with `--dev-browser-identity cr
|
||||
|
||||
|
||||
Responsive Chapters, Timeline and Plot Lines: start the isolated Razor host from the repository root with `dotnet run --project PlotLine.Tests -- --toolbar-browser-host`, then run `npm run test:responsive-content` in this directory. Repeat with `PD_RESPONSIVE_STANDALONE=1` for simulated standalone shell mode. The test checks 360, 390, 412, 800 and 1440 CSS pixels in modern dark, warm dark and modern light themes, with short/long chapter titles, long rail/book names, visible actions, sticky rails, internal scrolling, zoom connector coordinates and page overflow. Screenshots at 390 and 1440px are written to `/tmp/responsive-*.png`. These fixtures render compiled application views without a database; standalone simulation does not replace device testing.
|
||||
|
||||
## Alternative Scenario theme acceptance
|
||||
|
||||
Start the isolated Razor host from the repository root with `dotnet run --project PlotLine.Tests -- --toolbar-browser-host`, then run `xvfb-run -a node PlotLine.Tests/Browser/scenario-themes.cjs` in another terminal. This renders the actual Scenario list, creation, board and Compare views without database access. The test enumerates the configured themes, switches them with the account theme picker, checks populated and empty states at 1440/650 widths, measures representative text contrast, and installs and launches a real standalone Chromium PWA. Screenshots go to `/tmp/pd-scenario-visual` (override with `PD_SCENARIO_SCREENSHOTS`). Movement form identities and chapter selection are checked; database-backed scene movement and applying a scenario are deliberately outside this fixture.
|
||||
|
||||
74
PlotLine.Tests/Browser/scenario-themes.cjs
Normal file
74
PlotLine.Tests/Browser/scenario-themes.cjs
Normal file
@ -0,0 +1,74 @@
|
||||
// Real Razor views in the isolated browser host; no author data or database access.
|
||||
const {chromium}=require('playwright');
|
||||
const assert=require('node:assert/strict');
|
||||
const fs=require('node:fs'),os=require('node:os'),path=require('node:path');
|
||||
const base=process.env.PD_BROWSER_FIXTURE_URL||'http://127.0.0.1:5238';
|
||||
const output=process.env.PD_SCENARIO_SCREENSHOTS||'/tmp/pd-scenario-visual';
|
||||
fs.mkdirSync(output,{recursive:true});
|
||||
(async()=>{
|
||||
const profile=fs.mkdtempSync(path.join(os.tmpdir(),'pd-scenario-pwa-'));
|
||||
const context=await chromium.launchPersistentContext(profile,{headless:false,viewport:{width:1440,height:1000}});
|
||||
const cdp=await context.browser().newBrowserCDPSession();let installed=false;
|
||||
const manifestId=base+'/Projects';
|
||||
try {
|
||||
const page=context.pages()[0];await page.goto(base+'/scenario-fixture/Timeline');
|
||||
const themes=await page.evaluate(()=>window.PlotDirectorApplicationThemes);assert.equal(themes.length,7);
|
||||
async function theme(p,key){
|
||||
const choice=p.locator(`[data-app-theme-choice="${key}"]`);
|
||||
if(!await choice.isVisible())await p.locator('#accountMenuButton').click();
|
||||
await choice.click();await p.waitForFunction(t=>document.documentElement.dataset.appTheme===t,key);
|
||||
await p.waitForFunction(()=>!document.querySelector('[data-app-theme-choice]').disabled);
|
||||
await p.keyboard.press('Escape');await p.waitForTimeout(200);
|
||||
}
|
||||
async function check(p,mode){for(const view of ['Timeline','Compare','Create','Index']){
|
||||
await p.goto(base+'/scenario-fixture/'+view);
|
||||
for(const key of themes){await theme(p,key);await p.setViewportSize({width:1440,height:1000});
|
||||
assert(await p.locator('.scenario-workspace').count());
|
||||
if(view==='Timeline'){
|
||||
assert.equal(await p.locator('.scenario-scene-card').count(),15);
|
||||
assert(await p.locator('.scenario-scroll').evaluate(e=>e.scrollWidth>e.clientWidth));
|
||||
await p.locator('.scenario-scroll').focus();await p.keyboard.press('ArrowRight');await p.locator('.scenario-scroll').evaluate(e=>e.scrollLeft=0);await p.locator('h1').click();
|
||||
await p.locator('.scenario-chapter-form select').first().selectOption('3');
|
||||
assert.equal(await p.locator('.scenario-chapter-form select').first().inputValue(),'3');
|
||||
await p.locator('h1').click();await p.locator('.scenario-scroll').evaluate(e=>e.scrollLeft=0);
|
||||
assert.equal(await p.locator('form[action="/Scenarios/MoveScene"]').count(),43);
|
||||
}
|
||||
if(view==='Compare'){assert(await p.getByText('Moved · Scenario',{exact:true}).isVisible());assert.equal(await p.locator('.scenario-position').count(),2);}
|
||||
const contrasts=await p.evaluate(()=>{
|
||||
const canvas=document.createElement('canvas'),ctx=canvas.getContext('2d');
|
||||
const luminance=color=>{ctx.fillStyle=color;ctx.fillRect(0,0,1,1);return [...ctx.getImageData(0,0,1,1).data].slice(0,3).map(n=>n/255).map(n=>n<=.04045?n/12.92:((n+.055)/1.055)**2.4).reduce((sum,n,i)=>sum+n*[.2126,.7152,.0722][i],0);};
|
||||
const results=[];
|
||||
for(const selector of ['.scenario-banner h1','.scenario-banner p','.scenario-scene-card > p','.scenario-mini-data','.scenario-warning-badge','.attention-list strong','.scenario-position','.scenario-position-alternative','.scenario-chapter-form select','.scenario-scene-card .btn']){
|
||||
const el=document.querySelector(selector);if(!el)continue;
|
||||
let bgEl=el,bg;while(bgEl){bg=getComputedStyle(bgEl).backgroundColor;if(bg!=='rgba(0, 0, 0, 0)'&&bg!=='transparent')break;bgEl=bgEl.parentElement;}
|
||||
const a=luminance(getComputedStyle(el).color),b=luminance(bg);results.push([selector,(Math.max(a,b)+.05)/(Math.min(a,b)+.05)]);
|
||||
}return results;
|
||||
});
|
||||
for(const [selector,ratio]of contrasts)assert(ratio>=4.5,`${mode}/${view}/${key}/${selector}: contrast ${ratio}`);
|
||||
await p.screenshot({path:path.join(output,`${mode}-${view}-${key}.png`),fullPage:true});
|
||||
await p.setViewportSize({width:650,height:900});
|
||||
assert(await p.evaluate(()=>document.documentElement.scrollWidth<=innerWidth+1),`${mode}/${view}/${key}: page overflow`);
|
||||
await p.screenshot({path:path.join(output,`${mode}-${view}-${key}-narrow.png`),fullPage:true});
|
||||
}
|
||||
await p.goto(base+'/scenario-fixture/'+view+'?empty=true');
|
||||
for(const key of themes){await theme(p,key);if(view==='Compare')assert(await p.getByText('No scene movements yet.').isVisible());if(view==='Timeline')assert(await p.getByText('No scenes in this scenario.').isVisible());}
|
||||
}}
|
||||
// Reconstruct the legacy CSS presentation on the same synthetic Razor content.
|
||||
if(process.env.PD_SCENARIO_BEFORE==='true'){
|
||||
await context.route('**/css/site.css*',r=>r.fulfill({contentType:'text/css',body:fs.readFileSync('/tmp/pd-scenario-before-site.css','utf8')}));
|
||||
await context.route('**/css/application-shell.css*',r=>r.fulfill({contentType:'text/css',body:fs.readFileSync('/tmp/pd-scenario-before-shell.css','utf8')}));
|
||||
for(const view of ['Timeline','Compare'])for(const key of ['modern-light','modern-dark']){
|
||||
await page.goto(base+'/scenario-fixture/'+view);await theme(page,key);
|
||||
await page.screenshot({path:path.join(output,`before-css-${view}-${key}.png`),fullPage:true});
|
||||
}
|
||||
await context.unroute('**/css/site.css*');await context.unroute('**/css/application-shell.css*');
|
||||
}
|
||||
await check(page,'chromium');
|
||||
await page.goto(base+'/scenario-fixture/Timeline');
|
||||
await cdp.send('PWA.install',{manifestId,installUrlOrBundleUrl:base+'/scenario-fixture/Timeline'});installed=true;
|
||||
await cdp.send('PWA.changeAppUserSettings',{manifestId,displayMode:'standalone'});
|
||||
const opened=context.waitForEvent('page');await cdp.send('PWA.launch',{manifestId,url:base+'/scenario-fixture/Timeline'});const app=await opened;await app.waitForLoadState();
|
||||
assert(await app.evaluate(()=>matchMedia('(display-mode: standalone)').matches));await check(app,'pwa');
|
||||
console.log('PASS Scenario Razor views: '+themes.join(', ')+'; Chromium and installed PWA; board, Compare, Create, Index; 1440/650 widths; live token switching; populated/empty/warning states; chapter selectors and movement form contracts. Screenshots: '+output);
|
||||
}finally{if(installed)await cdp.send('PWA.uninstall',{manifestId}).catch(()=>{});await context.close();fs.rmSync(profile,{recursive:true,force:true});}
|
||||
})().catch(e=>{console.error(e);process.exitCode=1;});
|
||||
@ -378,6 +378,23 @@ internal static class ToolbarBrowserHost
|
||||
});
|
||||
app.MapGet("/Writing/Context", context => RenderFullAsync(context, "Writing", "Context", new WritingContextPageViewModel { ProjectID = 7, BookID = int.TryParse(context.Request.Query["bookId"].ToString(), out var bookId) ? bookId : 12 })).WithOrder(-1);
|
||||
app.MapGet("/Writing/Intent", context => RenderFullAsync(context, "Writing", "Intent", new WritingIntentPageViewModel { ProjectID = 7, BookID = int.TryParse(context.Request.Query["bookId"].ToString(), out var bookId) ? bookId : 12 })).WithOrder(-1);
|
||||
app.MapGet("/scenario-fixture/{view}", async (HttpContext context, string view) =>
|
||||
{
|
||||
var project = new Project { ProjectID = 7, ProjectName = "Scenario visual qualification" };
|
||||
var scenario = new Scenario { ScenarioID = 17, ProjectID = 7, BookID = 12, ScenarioName = "Alternative reveal order with a long descriptive title", Description = "Explore the consequences of moving the discovery later while preserving canonical story structure." };
|
||||
var empty = context.Request.Query["empty"] == "true";
|
||||
var warnings = empty ? Array.Empty<ScenarioWarning>() : new[] { new ScenarioWarning { SeverityName = "Warning", WarningTypeName = "Knowledge order", Message = "A scene uses information before its introduction.", Details = "Review the proposed order; the main timeline is unaffected." } };
|
||||
var chapters = Enumerable.Range(1, 5).Select(i => new Chapter { ChapterID = i, ChapterNumber = i, ChapterTitle = $"Chapter {i}: An unexpectedly long chapter heading that should wrap" }).ToArray();
|
||||
var scenes = empty ? Array.Empty<ScenarioScene>() : Enumerable.Range(1, 15).Select(i => new ScenarioScene { ScenarioID = 17, SceneID = i, ProposedChapterID = (i - 1) / 3 + 1, ProposedSortOrder = i, SceneNumber = i, SceneTitle = $"Scene {i}: The unexpected discovery and its consequences", Summary = "A difficult decision changes the direction of the investigation and reveals a hidden connection.", RevisionStatusName = "Draft", TimeLabel = "20 November · 09:30", ThreadLabels = "The missing letter", CharacterLabels = "Alex, Sam", LocationLabel = "Station", AssetLabels = "Letter", WarningCount = i == 1 ? 1 : 0 }).ToArray();
|
||||
object model = view switch {
|
||||
"Timeline" => new ScenarioTimelineViewModel { Project = project, Scenario = scenario, Chapters = chapters, Scenes = scenes, Warnings = warnings },
|
||||
"Compare" => new ScenarioCompareViewModel { Project = project, Scenario = scenario, ScenarioWarnings = warnings, MovedScenes = empty ? [] : [new() { SceneID = 1, SceneTitle = scenes[0].SceneTitle, MainPosition = "Chapter 1 · Scene 1", ScenarioPosition = "Chapter 3 · Scene 7", HasMoved = true }] },
|
||||
"Create" => new ScenarioCreateViewModel { ProjectID = 7 },
|
||||
"Index" => new ScenarioListViewModel { Project = project, Scenarios = empty ? [] : [scenario] },
|
||||
_ => throw new ArgumentException("Unknown scenario fixture view")
|
||||
};
|
||||
await RenderFullAsync(context, "Scenarios", view, model);
|
||||
});
|
||||
app.MapGet("/fixture", async context =>
|
||||
{
|
||||
if (context.Request.Query["page"] == "writer" && context.Request.Query["layout"] == "full")
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
@model ScenarioCompareViewModel
|
||||
@{
|
||||
ViewData["ShellClass"] = "scenario-workspace";
|
||||
ViewData["Title"] = "Compare Scenario";
|
||||
}
|
||||
|
||||
@ -39,8 +40,8 @@
|
||||
{
|
||||
<article>
|
||||
<strong>@row.SceneTitle</strong>
|
||||
<span>Main: @row.MainPosition</span>
|
||||
<span>Scenario: @row.ScenarioPosition</span>
|
||||
<span class="scenario-position"><small>Main timeline</small>@row.MainPosition</span>
|
||||
<span class="scenario-position scenario-position-alternative"><small>Moved · Scenario</small>@row.ScenarioPosition</span>
|
||||
</article>
|
||||
}
|
||||
</div>
|
||||
@ -65,7 +66,7 @@
|
||||
@foreach (var warning in Model.ScenarioWarnings)
|
||||
{
|
||||
<article>
|
||||
<span class="badge text-bg-light">@warning.SeverityName</span>
|
||||
<span class="badge scenario-warning-badge">@warning.SeverityName</span>
|
||||
<strong>@warning.WarningTypeName</strong>
|
||||
<p>@warning.Message</p>
|
||||
@if (!string.IsNullOrWhiteSpace(warning.Details))
|
||||
@ -83,8 +84,8 @@
|
||||
<p class="muted">This updates the real scene chapter/order using the scenario order. Linked story data stays attached to the same scenes.</p>
|
||||
<form asp-action="Apply" method="post" class="plotline-form">
|
||||
<input type="hidden" name="id" value="@Model.Scenario.ScenarioID" />
|
||||
<label class="form-label">Confirmation text <help-icon key="scenarios.fields.confirmationText" mode="inline" /></label>
|
||||
<input name="confirmation" class="form-control" value="" placeholder="This will replace the current scene order with the scenario order. Continue?" />
|
||||
<label for="scenario-confirmation" class="form-label">Confirmation text <help-icon key="scenarios.fields.confirmationText" mode="inline" /></label>
|
||||
<input id="scenario-confirmation" name="confirmation" class="form-control" value="" placeholder="This will replace the current scene order with the scenario order. Continue?" />
|
||||
<button class="btn btn-danger mt-2" type="submit">Apply Scenario</button>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
@model ScenarioCreateViewModel
|
||||
@{
|
||||
ViewData["ShellClass"] = "scenario-workspace";
|
||||
ViewData["DesktopLayout"] = "compact";
|
||||
ViewData["Title"] = "Create Scenario";
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
@model ScenarioListViewModel
|
||||
@{
|
||||
ViewData["ShellClass"] = "scenario-workspace";
|
||||
ViewData["DesktopLayout"] = "management";
|
||||
ViewData["Title"] = "Scenarios";
|
||||
ViewData["ProjectSection"] = "Scenarios";
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
@model ScenarioTimelineViewModel
|
||||
@{
|
||||
ViewData["Title"] = $"{Model.Scenario.ScenarioName} Scenario";
|
||||
ViewData["ShellClass"] = "plotline-shell-wide";
|
||||
ViewData["ShellClass"] = "plotline-shell-wide scenario-workspace";
|
||||
var scenesByChapter = Model.Scenes.GroupBy(x => x.ProposedChapterID).ToDictionary(x => x.Key, x => x.OrderBy(s => s.ProposedSortOrder).ToList());
|
||||
var orderedScenes = Model.Scenes.OrderBy(x => x.ProposedSortOrder).ToList();
|
||||
}
|
||||
@ -32,13 +32,17 @@
|
||||
<div class="alert alert-info">@message</div>
|
||||
}
|
||||
|
||||
<section class="scenario-warning-strip">
|
||||
<section class="scenario-warning-strip @(Model.Warnings.Count == 0 ? "scenario-warning-strip-empty" : "")" role="status">
|
||||
<strong>@Model.Warnings.Count scenario warning@(Model.Warnings.Count == 1 ? "" : "s")</strong>
|
||||
<span>These warnings belong to the sandbox and do not affect the main warning board.</span>
|
||||
</section>
|
||||
|
||||
<section class="scenario-board">
|
||||
<div class="scenario-scroll">
|
||||
@if (!Model.Scenes.Any())
|
||||
{
|
||||
<p class="muted">No scenes in this scenario.</p>
|
||||
}
|
||||
<div class="scenario-scroll" tabindex="0" role="region" aria-label="Scenario chapters — scroll horizontally">
|
||||
@foreach (var chapter in Model.Chapters)
|
||||
{
|
||||
var chapterScenes = scenesByChapter.GetValueOrDefault(chapter.ChapterID, []);
|
||||
@ -49,7 +53,7 @@
|
||||
|
||||
<article class="scenario-chapter">
|
||||
<header>
|
||||
<span>Chapter @chapter.ChapterNumber:g</span>
|
||||
<span>Chapter @chapter.ChapterNumber.ToString("0.##")</span>
|
||||
<strong>@chapter.ChapterTitle</strong>
|
||||
</header>
|
||||
<div class="scenario-scene-row">
|
||||
@ -59,7 +63,7 @@
|
||||
var next = orderedScenes.SkipWhile(x => x.SceneID != scene.SceneID).Skip(1).FirstOrDefault();
|
||||
<article data-pd-context="scenario scene" data-pd-context-id="@scene.SceneID" data-pd-context-label="@scene.SceneTitle" class="scenario-scene-card">
|
||||
<div class="scenario-scene-title">
|
||||
<span>Scene @scene.SceneNumber:g</span>
|
||||
<span>Scene @scene.SceneNumber.ToString("0.##")</span>
|
||||
<strong>@scene.SceneTitle</strong>
|
||||
</div>
|
||||
<div class="story-bible-meta">
|
||||
@ -103,15 +107,15 @@
|
||||
<input type="hidden" name="scenarioId" value="@Model.Scenario.ScenarioID" />
|
||||
<input type="hidden" name="sceneId" value="@scene.SceneID" />
|
||||
<input type="hidden" name="position" value="End" />
|
||||
<select name="targetChapterId" class="form-select form-select-sm">
|
||||
<select aria-label="Target chapter for scene @scene.SceneNumber" name="targetChapterId" class="form-select form-select-sm">
|
||||
@foreach (var chapterOption in Model.Chapters)
|
||||
{
|
||||
<option value="@chapterOption.ChapterID" selected="@(chapterOption.ChapterID == scene.ProposedChapterID)">Ch @chapterOption.ChapterNumber:g</option>
|
||||
<option value="@chapterOption.ChapterID" selected="@(chapterOption.ChapterID == scene.ProposedChapterID)">Ch @chapterOption.ChapterNumber.ToString("0.##")</option>
|
||||
}
|
||||
</select>
|
||||
<button class="btn btn-outline-primary btn-sm" type="submit">Move to chapter</button>
|
||||
</form>
|
||||
<a asp-controller="Scenes" asp-action="Edit" asp-route-id="@scene.SceneID">Open scene</a>
|
||||
<a class="btn btn-outline-secondary btn-sm" asp-controller="Scenes" asp-action="Edit" asp-route-id="@scene.SceneID">Open scene</a>
|
||||
</article>
|
||||
}
|
||||
</div>
|
||||
@ -138,7 +142,7 @@
|
||||
@foreach (var warning in Model.Warnings)
|
||||
{
|
||||
<article>
|
||||
<span class="badge text-bg-light">Scenario warning</span>
|
||||
<span class="badge scenario-warning-badge">Scenario warning</span>
|
||||
<strong>@warning.WarningTypeName</strong>
|
||||
<p>@warning.Message</p>
|
||||
@if (!string.IsNullOrWhiteSpace(warning.Details))
|
||||
|
||||
@ -754,3 +754,104 @@ html[data-app-theme] .writing-context-page .writing-workspace-role-indicator {
|
||||
|
||||
.pd-shell [data-word-ribbon-status]{max-width:210px;white-space:normal;font-size:11px;line-height:15px}
|
||||
.pd-shell [data-word-ribbon-status]:empty{display:none}
|
||||
|
||||
/* Alternative Scenarios uses the shared shell palette, including live theme changes. */
|
||||
html[data-app-theme] .scenario-workspace .scenario-banner {
|
||||
border-radius: var(--pd-radius);
|
||||
border-inline-start: 4px solid var(--pd-accent);
|
||||
color: var(--pd-text);
|
||||
}
|
||||
.scenario-workspace :is(.scenario-banner > div, .scenario-scene-card, .scenario-card, .scenario-compare-list article) {
|
||||
min-width: 0;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.scenario-workspace .scenario-banner { flex-wrap: wrap; }
|
||||
.scenario-workspace .scenario-banner > div:first-child { flex: 1 1 20rem; }
|
||||
.scenario-workspace .scenario-banner .button-row { flex: 1 1 22rem; }
|
||||
.scenario-workspace .scenario-warning-strip { flex-wrap: wrap; }
|
||||
html[data-app-theme] .scenario-workspace :is(.scenario-warning-strip, .attention-list article) {
|
||||
color: var(--pd-text);
|
||||
background: color-mix(in srgb, var(--pd-surface) 94%, var(--pd-warning));
|
||||
border: 1px solid var(--pd-border);
|
||||
border-inline-start: 3px solid var(--pd-warning);
|
||||
}
|
||||
html[data-app-theme] .scenario-workspace .attention-list p { color: var(--pd-text); }
|
||||
html[data-app-theme] .scenario-workspace .attention-list p.muted { color: var(--pd-muted); }
|
||||
html[data-app-theme] .scenario-workspace .scenario-warning-badge {
|
||||
background: var(--pd-surface);
|
||||
color: var(--pd-warning);
|
||||
border: 1px solid currentColor;
|
||||
}
|
||||
.scenario-workspace .scenario-scene-card > p { margin: 0; }
|
||||
html[data-app-theme] .scenario-workspace .scenario-scene-card:focus-within { border-color: var(--pd-focus); }
|
||||
html[data-app-theme] .scenario-workspace .scenario-scene-card:hover { border-color: var(--pd-accent); }
|
||||
.scenario-workspace .scenario-chapter-form select { flex: 1 1 8rem; min-width: 0; }
|
||||
html[data-app-theme] .scenario-workspace :is(a, button, input, select, textarea, [tabindex]):focus-visible {
|
||||
outline: 2px solid var(--pd-focus);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
html[data-app-theme] .scenario-workspace .scenario-compare-list article {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 1fr));
|
||||
color: var(--pd-text);
|
||||
border-inline-start: 3px solid var(--pd-info);
|
||||
}
|
||||
.scenario-workspace .scenario-position { display: grid; gap: .25rem; padding: .5rem; }
|
||||
.scenario-workspace .scenario-position small { color: var(--pd-muted); font-weight: 600; }
|
||||
.scenario-workspace .scenario-position-alternative { background: var(--pd-selected); border-radius: var(--pd-radius); }
|
||||
html[data-app-theme] .scenario-workspace .danger-zone { border-color: var(--pd-danger); }
|
||||
@media (max-width: 760px) {
|
||||
html[data-app-theme] .scenario-workspace .scenario-compare-list article { grid-template-columns: minmax(0, 1fr); }
|
||||
.scenario-workspace .scenario-board { padding: 8px; }
|
||||
}
|
||||
.scenario-workspace .attention-list article { grid-template-columns: auto minmax(0, 1fr); }
|
||||
@media (max-width: 480px) {
|
||||
.scenario-workspace .attention-list article { grid-template-columns: minmax(0, 1fr); }
|
||||
.scenario-workspace .attention-list p { grid-column: 1; }
|
||||
}
|
||||
html[data-app-theme] .scenario-workspace .scenario-warning-strip-empty {
|
||||
background: var(--pd-surface);
|
||||
border-inline-start-color: var(--pd-info);
|
||||
}
|
||||
html[data-app-theme] .scenario-workspace .btn-primary {
|
||||
--bs-btn-color: var(--pd-on-accent);
|
||||
--bs-btn-hover-color: var(--pd-on-accent);
|
||||
--bs-btn-active-color: var(--pd-on-accent);
|
||||
}
|
||||
html[data-app-theme] .scenario-workspace :is(.btn-outline-primary, .btn-outline-secondary, .btn-outline-danger) {
|
||||
--bs-btn-color: var(--pd-accent);
|
||||
--bs-btn-border-color: var(--pd-border);
|
||||
--bs-btn-hover-color: var(--pd-text);
|
||||
--bs-btn-hover-bg: var(--pd-hover);
|
||||
--bs-btn-hover-border-color: var(--pd-accent);
|
||||
--bs-btn-active-color: var(--pd-text);
|
||||
--bs-btn-active-bg: var(--pd-selected);
|
||||
--bs-btn-active-border-color: var(--pd-accent);
|
||||
background: var(--pd-control);
|
||||
}
|
||||
html[data-app-theme] .scenario-workspace .btn-outline-danger {
|
||||
--bs-btn-color: var(--pd-danger);
|
||||
--bs-btn-border-color: var(--pd-danger);
|
||||
}
|
||||
html[data-app-theme] .scenario-workspace :is(.btn-outline-primary, .btn-outline-secondary, .btn-outline-danger):hover { background: var(--pd-hover); }
|
||||
html[data-app-theme] .scenario-workspace .btn:disabled { opacity: .65; }
|
||||
html[data-app-theme] .scenario-workspace .story-bible-meta span { background: var(--pd-surface-2); }
|
||||
.scenario-workspace .scenario-scene-card .story-bible-meta { margin: 0; }
|
||||
html[data-app-theme] .scenario-workspace .scenario-position-alternative { background: var(--pd-selected); }
|
||||
html[data-app-theme] .scenario-workspace :is(.soft-count, .story-bible-card-title > span) {
|
||||
color: var(--pd-muted);
|
||||
background: var(--pd-surface-2);
|
||||
border-color: var(--pd-border);
|
||||
}
|
||||
html[data-app-theme] .scenario-workspace :is(.story-bible-section, .story-bible-card) {
|
||||
color: var(--pd-text);
|
||||
background: var(--pd-surface);
|
||||
border-color: var(--pd-border-subtle);
|
||||
border-radius: var(--pd-radius);
|
||||
box-shadow: var(--pd-shadow);
|
||||
}
|
||||
html[data-app-theme] .scenario-workspace .danger-zone { border-color: var(--pd-danger); }
|
||||
html[data-app-theme] .scenario-workspace :is(h1, h2, h3) {
|
||||
color: var(--pd-heading);
|
||||
font-family: var(--pd-font-ui);
|
||||
}
|
||||
|
||||
@ -1726,8 +1726,8 @@ a:focus-visible {
|
||||
}
|
||||
|
||||
.badge.text-bg-light,
|
||||
.story-bible-meta span,
|
||||
.soft-count {
|
||||
.story-bible-meta span:not(.scenario-workspace *),
|
||||
.soft-count:not(.scenario-workspace *) {
|
||||
border: 1px solid rgba(84, 68, 48, 0.13);
|
||||
background: rgba(255, 250, 241, 0.78) !important;
|
||||
color: var(--plotline-text-muted) !important;
|
||||
@ -2397,7 +2397,7 @@ a:focus-visible {
|
||||
[data-theme="dark"] .story-bible-facts dt,
|
||||
[data-theme="dark"] .story-bible-link-list span,
|
||||
[data-theme="dark"] .story-bible-scene-summary span,
|
||||
[data-theme="dark"] .attention-list p,
|
||||
[data-theme="dark"] .attention-list p:not(.scenario-workspace *),
|
||||
[data-theme="dark"] .analytics-section-heading span,
|
||||
[data-theme="dark"] .analytics-list-item p,
|
||||
[data-theme="dark"] .analytics-link-row span,
|
||||
@ -2551,7 +2551,7 @@ a:focus-visible {
|
||||
[data-theme="dark"] .scene-pov-label,
|
||||
[data-theme="dark"] .location-pill,
|
||||
[data-theme="dark"] .archive-pill,
|
||||
[data-theme="dark"] .badge,
|
||||
[data-theme="dark"] .badge:not(.scenario-workspace *),
|
||||
[data-theme="dark"] .badge.text-bg-light,
|
||||
[data-theme="dark"] .status-pill,
|
||||
[data-theme="dark"] .archived-badge,
|
||||
@ -2560,10 +2560,10 @@ a:focus-visible {
|
||||
[data-theme="dark"] .breadcrumb-trail span,
|
||||
[data-theme="dark"] .scenario-tag,
|
||||
[data-theme="dark"] .plain-preview,
|
||||
[data-theme="dark"] .soft-count,
|
||||
[data-theme="dark"] .soft-count:not(.scenario-workspace *),
|
||||
[data-theme="dark"] .attachment-kind,
|
||||
[data-theme="dark"] .preset-chip,
|
||||
[data-theme="dark"] .story-bible-meta span {
|
||||
[data-theme="dark"] .story-bible-meta span:not(.scenario-workspace *) {
|
||||
color: #f4eadc !important;
|
||||
background: rgba(212, 154, 98, 0.18) !important;
|
||||
border-color: rgba(241, 195, 143, 0.36) !important;
|
||||
@ -2571,7 +2571,7 @@ a:focus-visible {
|
||||
}
|
||||
|
||||
[data-theme="dark"] .badge.text-bg-light,
|
||||
[data-theme="dark"] .soft-count,
|
||||
[data-theme="dark"] .soft-count:not(.scenario-workspace *),
|
||||
[data-theme="dark"] .status-pill,
|
||||
[data-theme="dark"] .archived-badge {
|
||||
color: #ead8c4 !important;
|
||||
|
||||
@ -4514,12 +4514,12 @@ body.dragging-location [data-drag-type="location"] {
|
||||
justify-content: space-between;
|
||||
gap: 18px;
|
||||
align-items: flex-start;
|
||||
border: 1px solid rgba(103, 80, 164, 0.22);
|
||||
border: 1px solid var(--plotline-accent);
|
||||
border-radius: 12px;
|
||||
padding: 16px;
|
||||
margin-bottom: 16px;
|
||||
background: linear-gradient(135deg, rgba(103, 80, 164, 0.10), rgba(255, 255, 255, 0.86));
|
||||
box-shadow: 0 12px 28px rgba(36, 32, 26, 0.08);
|
||||
background: var(--plotline-surface);
|
||||
box-shadow: var(--pd-shadow);
|
||||
}
|
||||
|
||||
.scenario-banner h1 {
|
||||
@ -4532,7 +4532,7 @@ body.dragging-location [data-drag-type="location"] {
|
||||
}
|
||||
|
||||
.scenario-card {
|
||||
border-color: rgba(103, 80, 164, 0.18);
|
||||
border-color: var(--plotline-line);
|
||||
}
|
||||
|
||||
.scenario-warning-strip {
|
||||
@ -4543,7 +4543,7 @@ body.dragging-location [data-drag-type="location"] {
|
||||
border-radius: 10px;
|
||||
padding: 10px 12px;
|
||||
margin-bottom: 14px;
|
||||
background: rgba(255, 255, 255, 0.76);
|
||||
background: var(--plotline-surface);
|
||||
color: var(--plotline-muted);
|
||||
}
|
||||
|
||||
@ -4555,7 +4555,7 @@ body.dragging-location [data-drag-type="location"] {
|
||||
border: 1px solid var(--plotline-line);
|
||||
border-radius: 12px;
|
||||
padding: 12px;
|
||||
background: rgba(247, 245, 240, 0.74);
|
||||
background: var(--plotline-soft);
|
||||
overflow: hidden;
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
@ -4564,15 +4564,18 @@ body.dragging-location [data-drag-type="location"] {
|
||||
display: flex;
|
||||
gap: 14px;
|
||||
overflow-x: auto;
|
||||
align-items: flex-start;
|
||||
scrollbar-color: var(--pd-muted) var(--pd-surface-2);
|
||||
scrollbar-gutter: stable;
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
|
||||
.scenario-chapter {
|
||||
min-width: 360px;
|
||||
max-width: 520px;
|
||||
border: 1px solid rgba(82, 75, 65, 0.14);
|
||||
flex: 0 0 min(360px, 100%);
|
||||
min-width: 0;
|
||||
border: 1px solid var(--plotline-line);
|
||||
border-radius: 10px;
|
||||
background: rgba(255, 255, 255, 0.86);
|
||||
background: var(--plotline-surface);
|
||||
}
|
||||
|
||||
.scenario-chapter header {
|
||||
@ -4598,10 +4601,10 @@ body.dragging-location [data-drag-type="location"] {
|
||||
.scenario-scene-card {
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
border: 1px solid rgba(82, 75, 65, 0.12);
|
||||
border: 1px solid var(--plotline-line);
|
||||
border-radius: 9px;
|
||||
padding: 10px;
|
||||
background: white;
|
||||
background: var(--plotline-surface-elevated);
|
||||
}
|
||||
|
||||
.scenario-scene-title {
|
||||
@ -4644,7 +4647,7 @@ body.dragging-location [data-drag-type="location"] {
|
||||
border: 1px solid var(--plotline-line);
|
||||
border-radius: 9px;
|
||||
padding: 10px;
|
||||
background: rgba(255, 255, 255, 0.82);
|
||||
background: var(--plotline-surface-elevated);
|
||||
}
|
||||
|
||||
.danger-zone {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user