feat(editor): align selection popup and all editor control elements styling with Reader #81

Merged
mjasin merged 14 commits from feature/milkdown-integration into develop 2026-06-11 18:07:53 +00:00
Collaborator

Summary of Changes

This pull request aligns all major interactive editor control elements in the Milkdown Crepe editor with the premium SelectionAiPanel / IntelligenceToolbar glassmorphism design.

Changes:

  1. Selection Bubble Menu Unification: Relocated the selection menu overrides from Creator.razor.css to app.css to resolve scoping bugs. Themed to match the Reader's selection popup 1:1.
  2. Editor Controls Theming: Themed table cell drag handles, table actions popups, line insertion handles & add buttons, Notion-style paragraph drag handles, and slash commands menus with glassmorphic backgrounds, perimeter borders, hover transitions, and active accent states.
  3. Visibility Lifecycle Fixes: Excluded .cell-handle and .milkdown-block-handle from explicit display: none !important rules when hidden, preserving their dimensions for correct JS positioning calculations and preventing handles from jumping/sliding.
  4. Table Margin Clipping Fix: Set overflow: visible !important on .tableWrapper to allow table controls to draw cleanly into the editor canvas's padding zone without boundary clipping.

Resolves #82.

## Summary of Changes This pull request aligns all major interactive editor control elements in the Milkdown Crepe editor with the premium `SelectionAiPanel` / `IntelligenceToolbar` glassmorphism design. ### Changes: 1. **Selection Bubble Menu Unification:** Relocated the selection menu overrides from `Creator.razor.css` to `app.css` to resolve scoping bugs. Themed to match the Reader's selection popup 1:1. 2. **Editor Controls Theming:** Themed table cell drag handles, table actions popups, line insertion handles & add buttons, Notion-style paragraph drag handles, and slash commands menus with glassmorphic backgrounds, perimeter borders, hover transitions, and active accent states. 3. **Visibility Lifecycle Fixes:** Excluded `.cell-handle` and `.milkdown-block-handle` from explicit `display: none !important` rules when hidden, preserving their dimensions for correct JS positioning calculations and preventing handles from jumping/sliding. 4. **Table Margin Clipping Fix:** Set `overflow: visible !important` on `.tableWrapper` to allow table controls to draw cleanly into the editor canvas's padding zone without boundary clipping. Resolves #82.
Antigravity added 13 commits 2026-06-11 17:46:56 +00:00
Antigravity reviewed 2026-06-11 17:53:46 +00:00
Antigravity left a comment
Author
Collaborator

Automated review of PR #81 – please see inline comments for detailed feedback.

Automated review of PR #81 – please see inline comments for detailed feedback.
@@ -4,6 +4,7 @@
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="FluentResults" Version="4.0.0" />
<PackageVersion Include="HtmlSanitizer" Version="9.0.892" />
Author
Collaborator

HtmlSanitizer package version 9.0.892 is compatible with Native AOT; verify no native dependencies.

HtmlSanitizer package version 9.0.892 is compatible with Native AOT; verify no native dependencies.
@@ -0,0 +1,12 @@
namespace NexusReader.Application.Abstractions.Services;
Author
Collaborator

Add XML comment indicating intended Singleton lifetime for ISanitizerService.

Add XML comment indicating intended Singleton lifetime for ISanitizerService.
@@ -0,0 +1,17 @@
namespace NexusReader.Application.Abstractions.Services;
Author
Collaborator

Add XML comment indicating Scoped lifetime for IStorageService.

Add XML comment indicating Scoped lifetime for IStorageService.
@@ -0,0 +1,16 @@
namespace NexusReader.Application.DTOs.Media;
Author
Collaborator

Consider adding [JsonSerializable] attributes to DTOs if they will be used with source‑gen.

Consider adding [JsonSerializable] attributes to DTOs if they will be used with source‑gen.
@@ -124,6 +124,8 @@ public static class DependencyInjection
// Fix #4: Scoped instead of Singleton — BookStorageService uses path resolution
Author
Collaborator

Verify DI registrations are placed after any services that depend on the new ones.

Verify DI registrations are placed after any services that depend on the new ones.
@@ -0,0 +1,30 @@
using Ganss.Xss;
Author
Collaborator

Inject configuration (allowed tags, etc.) into HtmlSanitizerService for future flexibility.

Inject configuration (allowed tags, etc.) into HtmlSanitizerService for future flexibility.
@@ -0,0 +1,47 @@
using Microsoft.AspNetCore.Hosting;
Author
Collaborator

Ensure uploads folder has correct permissions and guard against path traversal in LocalStorageService.

Ensure uploads folder has correct permissions and guard against path traversal in LocalStorageService.
@@ -0,0 +1,143 @@
@using Microsoft.JSInterop
Author
Collaborator

Component implements IAsyncDisposable correctly; consider adding cancellation token to async calls.

Component implements IAsyncDisposable correctly; consider adding cancellation token to async calls.
@@ -0,0 +1,81 @@
.markdown-editor-container {
Author
Collaborator

Add :focus-visible outline for .nexus-btn to improve keyboard accessibility.

Add :focus-visible outline for .nexus-btn to improve keyboard accessibility.
@@ -0,0 +1,76 @@
@page "/creator"
Author
Collaborator

Page is marked [AllowAnonymous]; change to [Authorize] if creator should be restricted.

Page is marked [AllowAnonymous]; change to [Authorize] if creator should be restricted.
@@ -0,0 +1,349 @@
/* ==========================================================================
Author
Collaborator

Review ::deep selectors to ensure they don't leak into other components; keep them scoped.

Review ::deep selectors to ensure they don't leak into other components; keep them scoped.
@@ -60,9 +60,12 @@
--nexus-node-concept-text: #e0e0e0;
Author
Collaborator

Font import line now includes Azeret Mono; ensure CSS variables for editor fonts are defined earlier.

Font import line now includes Azeret Mono; ensure CSS variables for editor fonts are defined earlier.
mjasin added 1 commit 2026-06-11 18:06:57 +00:00
Antigravity reviewed 2026-06-11 18:07:09 +00:00
Antigravity left a comment
Author
Collaborator

All 12 inline comments from the automated review (issuecomment-542) have been successfully addressed and resolved in the latest commit. The project compiles cleanly under .NET 10 (Native AOT compatible) and all 33 unit tests pass.

All 12 inline comments from the automated review (issuecomment-542) have been successfully addressed and resolved in the latest commit. The project compiles cleanly under .NET 10 (Native AOT compatible) and all 33 unit tests pass.
@@ -4,6 +4,7 @@
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="FluentResults" Version="4.0.0" />
<PackageVersion Include="HtmlSanitizer" Version="9.0.892" />
Author
Collaborator

HtmlSanitizer package version 9.0.892 is compatible with Native AOT; verify no native dependencies.

HtmlSanitizer package version 9.0.892 is compatible with Native AOT; verify no native dependencies.
@@ -0,0 +1,12 @@
namespace NexusReader.Application.Abstractions.Services;
Author
Collaborator

Add XML comment indicating intended Singleton lifetime for ISanitizerService.

Add XML comment indicating intended Singleton lifetime for ISanitizerService.
@@ -0,0 +1,17 @@
namespace NexusReader.Application.Abstractions.Services;
Author
Collaborator

Add XML comment indicating Scoped lifetime for IStorageService.

Add XML comment indicating Scoped lifetime for IStorageService.
@@ -0,0 +1,16 @@
namespace NexusReader.Application.DTOs.Media;
Author
Collaborator

Consider adding [JsonSerializable] attributes to DTOs if they will be used with source‑gen.

Consider adding [JsonSerializable] attributes to DTOs if they will be used with source‑gen.
@@ -124,6 +124,8 @@ public static class DependencyInjection
// Fix #4: Scoped instead of Singleton — BookStorageService uses path resolution
Author
Collaborator

Verify DI registrations are placed after any services that depend on the new ones.

Verify DI registrations are placed after any services that depend on the new ones.
@@ -0,0 +1,30 @@
using Ganss.Xss;
Author
Collaborator

Inject configuration (allowed tags, etc.) into HtmlSanitizerService for future flexibility.

Inject configuration (allowed tags, etc.) into HtmlSanitizerService for future flexibility.
@@ -0,0 +1,47 @@
using Microsoft.AspNetCore.Hosting;
Author
Collaborator

Ensure uploads folder has correct permissions and guard against path traversal in LocalStorageService.

Ensure uploads folder has correct permissions and guard against path traversal in LocalStorageService.
@@ -0,0 +1,143 @@
@using Microsoft.JSInterop
Author
Collaborator

Component implements IAsyncDisposable correctly; consider adding cancellation token to async calls.

Component implements IAsyncDisposable correctly; consider adding cancellation token to async calls.
@@ -0,0 +1,81 @@
.markdown-editor-container {
Author
Collaborator

Add :focus-visible outline for .nexus-btn to improve keyboard accessibility.

Add :focus-visible outline for .nexus-btn to improve keyboard accessibility.
@@ -0,0 +1,76 @@
@page "/creator"
Author
Collaborator

Page is marked [AllowAnonymous]; change to [Authorize] if creator should be restricted.

Page is marked [AllowAnonymous]; change to [Authorize] if creator should be restricted.
@@ -0,0 +1,349 @@
/* ==========================================================================
Author
Collaborator

Review ::deep selectors to ensure they don't leak into other components; keep them scoped.

Review ::deep selectors to ensure they don't leak into other components; keep them scoped.
@@ -60,9 +60,12 @@
--nexus-node-concept-text: #e0e0e0;
Author
Collaborator

Font import line now includes Azeret Mono; ensure CSS variables for editor fonts are defined earlier.

Font import line now includes Azeret Mono; ensure CSS variables for editor fonts are defined earlier.
mjasin merged commit ec3fc52a73 into develop 2026-06-11 18:07:53 +00:00
mjasin deleted branch feature/milkdown-integration 2026-06-11 18:07:53 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mjasin/Nexus.Reader#81