Skip to content

fix: admin content form and settings improvements#356

Merged
lane711 merged 5 commits into
mainfrom
fix-admin-content-form
Dec 3, 2025
Merged

fix: admin content form and settings improvements#356
lane711 merged 5 commits into
mainfrom
fix-admin-content-form

Conversation

@lane711

@lane711 lane711 commented Dec 2, 2025

Copy link
Copy Markdown
Collaborator

Summary

  • Fix nested script tags in admin content form template (fixes Admin Content Form issues #351)
  • Move save button into each settings tab
  • Add auto-install for workspace symlinks in worktrees
  • Add npm run workspace command for fresh setup

Changes

1. Fix nested script tags (fixes #351)

Remove incorrectly nested <script> tags wrapping TinyMCE and MDXEditor initialization scripts. These were already inside an existing <script> block, causing:

  • SyntaxError: Unexpected token '<' when adding new content
  • [Quill] Found 0 editor containers - cascading effect
  • previewContent is not defined - cascading effect

2. Settings page improvements

  • Remove "Reset to Defaults" button from header
  • Remove global "Save All Changes" button from header
  • Add Save button to each tab:
    • General tab: Functional Save button
    • WIP tabs (Appearance, Security, Notifications, Storage): Disabled Save button
    • Migrations & Database Tools: No Save button (action-based tabs)

3. Workspace setup fixes

  • Add predev script that auto-runs npm install if workspace symlinks are missing
  • Add npm run workspace command that runs npm install && npm run db:reset

Test plan

  • Create new content item - should not show syntax errors
  • Verify Preview Content button works
  • Verify Save button appears in each settings tab
  • Verify npm run workspace works in fresh worktree

Fixes #351

🤖 Generated with Claude Code

lane711 and others added 4 commits December 2, 2025 10:49
Remove the incorrectly nested <script> tags wrapping TinyMCE and
MDXEditor initialization scripts. These were already inside an
existing <script> block (starting at line 427), causing:

- SyntaxError: Unexpected token '<' when adding new content
- "[Quill] Found 0 editor containers" - cascading effect
- "previewContent is not defined" - cascading effect

Fixes #351

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Remove "Reset to Defaults" button from header
- Remove global "Save All Changes" button from header
- Add Save button to General settings tab (functional)
- Add disabled Save button to WIP tabs (Appearance, Security,
  Notifications, Storage) with visual indication
- Migrations and Database Tools tabs retain their existing
  action buttons (not settings forms)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Add predev script that checks if node_modules/@sonicjs-cms exists
and runs npm install if not. This fixes issues when working in
git worktrees where workspace symlinks aren't automatically set up.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Adds `npm run workspace` that runs npm install and db:reset,
useful for initializing a new worktree environment.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@lane711 lane711 changed the title fix: remove nested script tags in admin content form template fix: admin content form and settings improvements Dec 2, 2025
Resolve conflict in admin-settings.template.ts by keeping our
per-tab save button approach instead of main's saveAllSettings
with tab validation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@lane711 lane711 merged commit a3f01cf into main Dec 3, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Admin Content Form issues

1 participant