Rename Phase 1A: Internal PlotWeaver technical cleanup only

This commit is contained in:
Nick Beckley 2026-06-08 15:14:34 +01:00
parent 6069a2e9a7
commit 813dacdea9
6 changed files with 62 additions and 62 deletions

View File

@ -38,7 +38,7 @@ public class Program
builder.Services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme) builder.Services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme)
.AddCookie(options => .AddCookie(options =>
{ {
options.Cookie.Name = "PlotWeaver.Auth"; options.Cookie.Name = "PlotLine.Auth";
options.LoginPath = "/Account/Login"; options.LoginPath = "/Account/Login";
options.LogoutPath = "/Account/Logout"; options.LogoutPath = "/Account/Logout";
options.AccessDeniedPath = "/Account/AccessDenied"; options.AccessDeniedPath = "/Account/AccessDenied";
@ -52,7 +52,7 @@ public class Program
OnValidatePrincipal = async context => OnValidatePrincipal = async context =>
{ {
var userIdValue = context.Principal?.FindFirstValue(ClaimTypes.NameIdentifier); var userIdValue = context.Principal?.FindFirstValue(ClaimTypes.NameIdentifier);
var securityStampValue = context.Principal?.FindFirstValue("PlotWeaver.SecurityStamp"); var securityStampValue = context.Principal?.FindFirstValue("PlotLine.SecurityStamp");
if (!int.TryParse(userIdValue, out var userId) || !Guid.TryParse(securityStampValue, out var securityStamp)) if (!int.TryParse(userIdValue, out var userId) || !Guid.TryParse(securityStampValue, out var securityStamp))
{ {
context.RejectPrincipal(); context.RejectPrincipal();

View File

@ -237,11 +237,11 @@ public sealed class AuthService(
private static readonly TimeSpan PendingTwoFactorLifetime = TimeSpan.FromMinutes(10); private static readonly TimeSpan PendingTwoFactorLifetime = TimeSpan.FromMinutes(10);
private static readonly TimeSpan LockoutDuration = TimeSpan.FromMinutes(15); private static readonly TimeSpan LockoutDuration = TimeSpan.FromMinutes(15);
private const int MaxFailedLoginAttempts = 5; private const int MaxFailedLoginAttempts = 5;
private const string SecurityStampClaimType = "PlotWeaver.SecurityStamp"; private const string SecurityStampClaimType = "PlotLine.SecurityStamp";
private const string PendingTwoFactorUserIdKey = "PlotWeaver.PendingTwoFactor.UserID"; private const string PendingTwoFactorUserIdKey = "PlotLine.PendingTwoFactor.UserID";
private const string PendingTwoFactorRememberMeKey = "PlotWeaver.PendingTwoFactor.RememberMe"; private const string PendingTwoFactorRememberMeKey = "PlotLine.PendingTwoFactor.RememberMe";
private const string PendingTwoFactorReturnUrlKey = "PlotWeaver.PendingTwoFactor.ReturnUrl"; private const string PendingTwoFactorReturnUrlKey = "PlotLine.PendingTwoFactor.ReturnUrl";
private const string PendingTwoFactorExpiresUtcKey = "PlotWeaver.PendingTwoFactor.ExpiresUtc"; private const string PendingTwoFactorExpiresUtcKey = "PlotLine.PendingTwoFactor.ExpiresUtc";
public async Task<RegistrationResult> RegisterAsync(RegisterViewModel model) public async Task<RegistrationResult> RegisterAsync(RegisterViewModel model)
{ {

View File

@ -27,15 +27,15 @@ public sealed class HelpIconTagHelper(IHelpService help) : TagHelper
output.TagName = "span"; output.TagName = "span";
output.TagMode = TagMode.StartTagAndEndTag; output.TagMode = TagMode.StartTagAndEndTag;
output.Attributes.SetAttribute("class", isInline output.Attributes.SetAttribute("class", isInline
? "plotweaver-help-icon-wrapper plotweaver-help-icon-wrapper-inline" ? "plotline-help-icon-wrapper plotline-help-icon-wrapper-inline"
: "plotweaver-help-icon-wrapper"); : "plotline-help-icon-wrapper");
output.Attributes.SetAttribute("data-help-icon", "true"); output.Attributes.SetAttribute("data-help-icon", "true");
output.Attributes.SetAttribute("data-help-key", Key); output.Attributes.SetAttribute("data-help-key", Key);
output.Attributes.SetAttribute("data-help-title", quickTitle); output.Attributes.SetAttribute("data-help-title", quickTitle);
output.Attributes.SetAttribute("data-help-summary", quickSummary); output.Attributes.SetAttribute("data-help-summary", quickSummary);
output.Content.SetHtmlContent($""" output.Content.SetHtmlContent($"""
<button type="button" <button type="button"
class="plotweaver-help-icon" class="plotline-help-icon"
aria-label="Help: {WebUtility.HtmlEncode(quickTitle)}" aria-label="Help: {WebUtility.HtmlEncode(quickTitle)}"
data-help-tooltip="true" data-help-tooltip="true"
data-help-micro="{WebUtility.HtmlEncode(micro)}">?</button> data-help-micro="{WebUtility.HtmlEncode(micro)}">?</button>

View File

@ -140,8 +140,8 @@
</div> </div>
</nav> </nav>
</header> </header>
<div class="plotweaver-help-layout" data-help-layout> <div class="plotline-help-layout" data-help-layout>
<div class="plotweaver-help-main"> <div class="plotline-help-main">
<div class="container-fluid plotline-shell @ViewData["ShellClass"]"> <div class="container-fluid plotline-shell @ViewData["ShellClass"]">
<main role="main" class="pb-3"> <main role="main" class="pb-3">
@if (TempData["ArchiveMessage"] is string archiveMessage) @if (TempData["ArchiveMessage"] is string archiveMessage)
@ -160,11 +160,11 @@
</main> </main>
</div> </div>
</div> </div>
<div class="plotweaver-help-splitter" data-help-splitter role="separator" aria-orientation="vertical" aria-label="Resize help drawer"></div> <div class="plotline-help-splitter" data-help-splitter role="separator" aria-orientation="vertical" aria-label="Resize help drawer"></div>
<aside class="plotweaver-help-drawer" data-help-drawer aria-label="Help drawer"> <aside class="plotline-help-drawer" data-help-drawer aria-label="Help drawer">
<div class="plotweaver-help-collapsed-strip" data-help-expand role="button" tabindex="0" aria-label="Expand help drawer">Help</div> <div class="plotline-help-collapsed-strip" data-help-expand role="button" tabindex="0" aria-label="Expand help drawer">Help</div>
<div class="plotweaver-help-drawer-panel"> <div class="plotline-help-drawer-panel">
<header class="plotweaver-help-drawer-header"> <header class="plotline-help-drawer-header">
<div> <div>
<p class="eyebrow mb-0">Contextual help</p> <p class="eyebrow mb-0">Contextual help</p>
<strong data-help-drawer-heading>Help</strong> <strong data-help-drawer-heading>Help</strong>
@ -175,7 +175,7 @@
<button class="btn btn-outline-secondary" type="button" data-help-close>Close</button> <button class="btn btn-outline-secondary" type="button" data-help-close>Close</button>
</div> </div>
</header> </header>
<div class="plotweaver-help-drawer-content" data-help-content> <div class="plotline-help-drawer-content" data-help-content>
<p class="muted">Choose More from a help popover to open the full guide.</p> <p class="muted">Choose More from a help popover to open the full guide.</p>
</div> </div>
</div> </div>

View File

@ -1669,7 +1669,7 @@ a:focus-visible {
--bs-alert-border-color: #705229; --bs-alert-border-color: #705229;
} }
.plotweaver-help-layout { .plotline-help-layout {
--help-drawer-width: 25%; --help-drawer-width: 25%;
display: flex; display: flex;
align-items: stretch; align-items: stretch;
@ -1678,25 +1678,25 @@ a:focus-visible {
transition: gap 0.18s ease; transition: gap 0.18s ease;
} }
.plotweaver-help-main { .plotline-help-main {
flex: 1 1 auto; flex: 1 1 auto;
min-width: 0; min-width: 0;
transition: flex-basis 0.18s ease; transition: flex-basis 0.18s ease;
} }
.plotweaver-help-splitter, .plotline-help-splitter,
.plotweaver-help-drawer { .plotline-help-drawer {
display: none; display: none;
} }
.plotweaver-help-layout.help-open .plotweaver-help-splitter { .plotline-help-layout.help-open .plotline-help-splitter {
display: block; display: block;
flex: 0 0 8px; flex: 0 0 8px;
cursor: col-resize; cursor: col-resize;
background: linear-gradient(90deg, transparent, rgba(107, 114, 128, 0.22), transparent); background: linear-gradient(90deg, transparent, rgba(107, 114, 128, 0.22), transparent);
} }
.plotweaver-help-layout.help-open .plotweaver-help-drawer { .plotline-help-layout.help-open .plotline-help-drawer {
display: block; display: block;
flex: 0 0 clamp(20%, var(--help-drawer-width), 50%); flex: 0 0 clamp(20%, var(--help-drawer-width), 50%);
min-width: 20%; min-width: 20%;
@ -1706,25 +1706,25 @@ a:focus-visible {
transition: flex-basis 0.18s ease; transition: flex-basis 0.18s ease;
} }
.plotweaver-help-layout.help-collapsed .plotweaver-help-splitter { .plotline-help-layout.help-collapsed .plotline-help-splitter {
display: none; display: none;
} }
.plotweaver-help-layout.help-collapsed .plotweaver-help-drawer { .plotline-help-layout.help-collapsed .plotline-help-drawer {
flex-basis: 2.35rem; flex-basis: 2.35rem;
min-width: 2.35rem; min-width: 2.35rem;
max-width: 2.35rem; max-width: 2.35rem;
} }
.plotweaver-help-layout.help-collapsed .plotweaver-help-drawer-panel { .plotline-help-layout.help-collapsed .plotline-help-drawer-panel {
display: none; display: none;
} }
.plotweaver-help-collapsed-strip { .plotline-help-collapsed-strip {
display: none; display: none;
} }
.plotweaver-help-layout.help-collapsed .plotweaver-help-collapsed-strip { .plotline-help-layout.help-collapsed .plotline-help-collapsed-strip {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@ -1739,7 +1739,7 @@ a:focus-visible {
cursor: pointer; cursor: pointer;
} }
.plotweaver-help-drawer-panel { .plotline-help-drawer-panel {
position: sticky; position: sticky;
top: 0; top: 0;
display: flex; display: flex;
@ -1747,7 +1747,7 @@ a:focus-visible {
max-height: calc(100vh - 1rem); max-height: calc(100vh - 1rem);
} }
.plotweaver-help-drawer-header { .plotline-help-drawer-header {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
gap: 0.75rem; gap: 0.75rem;
@ -1756,7 +1756,7 @@ a:focus-visible {
border-bottom: 1px solid rgba(107, 114, 128, 0.18); border-bottom: 1px solid rgba(107, 114, 128, 0.18);
} }
.plotweaver-help-drawer-content { .plotline-help-drawer-content {
min-height: 12rem; min-height: 12rem;
padding: 1rem; padding: 1rem;
overflow: auto; overflow: auto;
@ -1815,7 +1815,7 @@ a:focus-visible {
user-select: none; user-select: none;
} }
.plotweaver-help-icon { .plotline-help-icon {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@ -1833,60 +1833,60 @@ a:focus-visible {
vertical-align: text-top; vertical-align: text-top;
} }
.plotweaver-help-icon-wrapper { .plotline-help-icon-wrapper {
display: inline-flex; display: inline-flex;
vertical-align: text-top; vertical-align: text-top;
} }
.plotweaver-help-icon-wrapper-inline .plotweaver-help-icon { .plotline-help-icon-wrapper-inline .plotline-help-icon {
width: 1rem; width: 1rem;
height: 1rem; height: 1rem;
margin-left: 0.25rem; margin-left: 0.25rem;
font-size: 0.68rem; font-size: 0.68rem;
} }
.plotweaver-help-icon:hover, .plotline-help-icon:hover,
.plotweaver-help-icon:focus { .plotline-help-icon:focus {
color: #2f6f63; color: #2f6f63;
border-color: #2f6f63; border-color: #2f6f63;
outline: none; outline: none;
} }
.plotweaver-help-popover { .plotline-help-popover {
max-width: 350px; max-width: 350px;
} }
.plotweaver-help-popover .popover-header { .plotline-help-popover .popover-header {
font-weight: 800; font-weight: 800;
} }
.plotweaver-help-more { .plotline-help-more {
font-weight: 700; font-weight: 700;
text-decoration: none; text-decoration: none;
} }
[data-theme="dark"] .plotweaver-help-icon { [data-theme="dark"] .plotline-help-icon {
color: #d8d0c4; color: #d8d0c4;
border-color: rgba(216, 208, 196, 0.45); border-color: rgba(216, 208, 196, 0.45);
} }
[data-theme="dark"] .plotweaver-help-icon:hover, [data-theme="dark"] .plotline-help-icon:hover,
[data-theme="dark"] .plotweaver-help-icon:focus { [data-theme="dark"] .plotline-help-icon:focus {
color: #f1c38f; color: #f1c38f;
border-color: #f1c38f; border-color: #f1c38f;
} }
[data-theme="dark"] .plotweaver-help-layout.help-open .plotweaver-help-drawer { [data-theme="dark"] .plotline-help-layout.help-open .plotline-help-drawer {
border-left-color: rgba(255, 255, 255, 0.12); border-left-color: rgba(255, 255, 255, 0.12);
background: rgba(22, 22, 27, 0.97); background: rgba(22, 22, 27, 0.97);
} }
[data-theme="dark"] .plotweaver-help-drawer-header, [data-theme="dark"] .plotline-help-drawer-header,
[data-theme="dark"] .help-related-section { [data-theme="dark"] .help-related-section {
border-color: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.12);
} }
[data-theme="dark"] .plotweaver-help-collapsed-strip { [data-theme="dark"] .plotline-help-collapsed-strip {
color: #d8d0c4; color: #d8d0c4;
} }

View File

@ -188,7 +188,7 @@
placement: "auto", placement: "auto",
container: "body", container: "body",
html: true, html: true,
customClass: "plotweaver-help-popover", customClass: "plotline-help-popover",
content() { content() {
const wrapper = document.createElement("div"); const wrapper = document.createElement("div");
const summaryText = document.createElement("p"); const summaryText = document.createElement("p");
@ -198,12 +198,12 @@
const moreLink = document.createElement("a"); const moreLink = document.createElement("a");
moreLink.href = "#"; moreLink.href = "#";
moreLink.textContent = "More..."; moreLink.textContent = "More...";
moreLink.className = "plotweaver-help-more"; moreLink.className = "plotline-help-more";
moreLink.addEventListener("click", (event) => { moreLink.addEventListener("click", (event) => {
event.preventDefault(); event.preventDefault();
hideActivePopover(); hideActivePopover();
hideAllHelpTooltips(); hideAllHelpTooltips();
icon.dispatchEvent(new CustomEvent("plotweaver:help-more", { icon.dispatchEvent(new CustomEvent("plotline:help-more", {
bubbles: true, bubbles: true,
detail: { key: icon.dataset.helpKey || "" } detail: { key: icon.dataset.helpKey || "" }
})); }));
@ -216,7 +216,7 @@
popovers.set(icon, popover); popovers.set(icon, popover);
icon.addEventListener("click", (event) => { icon.addEventListener("click", (event) => {
if (!window.PlotWeaverHelpDrawer?.isActive?.()) { if (!window.PlotLineHelpDrawer?.isActive?.()) {
return; return;
} }
@ -224,11 +224,11 @@
event.stopPropagation(); event.stopPropagation();
hideActivePopover(); hideActivePopover();
hideTooltip(icon); hideTooltip(icon);
window.PlotWeaverHelpPopovers?.hideAll(); window.PlotLineHelpPopovers?.hideAll();
window.PlotWeaverHelpDrawer.open(icon.dataset.helpKey || ""); window.PlotLineHelpDrawer.open(icon.dataset.helpKey || "");
}); });
icon.addEventListener("show.bs.popover", (event) => { icon.addEventListener("show.bs.popover", (event) => {
if (window.PlotWeaverHelpDrawer?.isActive?.()) { if (window.PlotLineHelpDrawer?.isActive?.()) {
event.preventDefault(); event.preventDefault();
return; return;
} }
@ -271,7 +271,7 @@
} }
}); });
window.PlotWeaverHelpPopovers = { window.PlotLineHelpPopovers = {
hideAll() { hideAll() {
popovers.forEach((popover) => popover.hide()); popovers.forEach((popover) => popover.hide());
hideAllHelpTooltips(); hideAllHelpTooltips();
@ -295,10 +295,10 @@
} }
const storage = { const storage = {
width: "plotweaver.helpDrawer.width", width: "plotline.helpDrawer.width",
pinned: "plotweaver.helpDrawer.pinned", pinned: "plotline.helpDrawer.pinned",
key: "plotweaver.helpDrawer.key", key: "plotline.helpDrawer.key",
collapsed: "plotweaver.helpDrawer.collapsed" collapsed: "plotline.helpDrawer.collapsed"
}; };
const clamp = (value, min, max) => Math.min(max, Math.max(min, value)); const clamp = (value, min, max) => Math.min(max, Math.max(min, value));
@ -374,7 +374,7 @@
setPinned(false); setPinned(false);
}; };
window.PlotWeaverHelpDrawer = { window.PlotLineHelpDrawer = {
isActive() { isActive() {
return layout.classList.contains("help-open"); return layout.classList.contains("help-open");
}, },
@ -387,9 +387,9 @@
setPinned(readBool(storage.pinned)); setPinned(readBool(storage.pinned));
setCollapsed(readBool(storage.collapsed)); setCollapsed(readBool(storage.collapsed));
document.addEventListener("plotweaver:help-more", (event) => { document.addEventListener("plotline:help-more", (event) => {
const key = event.detail?.key || event.target?.dataset?.helpKey || ""; const key = event.detail?.key || event.target?.dataset?.helpKey || "";
window.PlotWeaverHelpPopovers?.hideAll(); window.PlotLineHelpPopovers?.hideAll();
openDrawer(key); openDrawer(key);
}); });
@ -400,7 +400,7 @@
} }
event.preventDefault(); event.preventDefault();
window.PlotWeaverHelpPopovers?.hideAll(); window.PlotLineHelpPopovers?.hideAll();
openDrawer(opener.dataset.helpOpen || ""); openDrawer(opener.dataset.helpOpen || "");
}); });