Skip to content

refactor: drop the unreachable standalone editor page and dead fields - #127

Merged
erseco merged 1 commit into
fix/editor-ctrl-sfrom
refactor/remove-dead-code
Sep 26, 2026
Merged

erseco merged 1 commit into
fix/editor-ctrl-sfrom
refactor/remove-dead-code

Conversation

@erseco

@erseco erseco commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Stack 4/5, based on #126.

What

Nothing links to /apps/exelearning/editor any more: file actions and the New menu open /view?mode=editor.

  • /editor route: EditorController::index becomes a redirect to /view?mode=editor that keeps fileId/path, so old links still work.
  • Deleted: templates/editor.php, src/editor/editor-page.ts and its Vite entry. That page also had a SAVE_FILE handler that ignored requestId and re-requested a save on every reply.
  • Deleted: src/viewer/ViewerToolbar.vue (never imported).
  • Dropped unused data:
    • ViewController's editorIframeUrl initial state (the client builds it from the live webroot) and its now-unused IURLGenerator
    • PackageShape.{hasContentXml,hasScreenshot,hintCount}
    • LoadedElpx.contentLength
    • LoadElpxOptions.signal

Behavior change: /apps/exelearning/editor now returns a 303 instead of rendering its own page.

Verification

composer install                 exit 0
npm install                      exit 0
npm run typecheck                exit 0
npm test                         Tests 123 passed (123)
npm run lint                     exit 0
npm run build                    ✓ built
make architecture-check          Architecture records OK — 3 records, 0 changes.
make -n download-editor … typecheck   exit 0
vendor/bin/phpunit               OK (115 tests, 311 assertions)
composer cs:check                Found 0 of 32 files that can be fixed
git diff --check                 clean

Nothing in the UI links to /apps/exelearning/editor any more; file
actions and the New menu open /view?mode=editor. Keep the route as a
redirect there so old links still work, and delete the page's template,
its editor-page.ts entry (which also carried an unfiltered SAVE_FILE
handler that re-requested saves on every reply) and its initial state.

Also remove ViewerToolbar.vue (never imported), the view page's unused
editorIframeUrl initial state (the client builds it with the live
webroot), and PackageShape/LoadedElpx fields nothing reads.
@github-actions

Copy link
Copy Markdown
Contributor

Preview this PR in the Nextcloud Playground

Open this PR in the Nextcloud Playground

A fresh Nextcloud boots in your browser with this branch's exelearning app installed and enabled (log in as admin / admin). Two sample .elpx are seeded under exelearning-samples/ in Files — click one to open the viewer.

eXeLearning editor: v4.0.5 (overlaid at boot from the upstream release).

@erseco
erseco added this pull request to stack #130 September 26, 2026 06:14
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.37%. Comparing base (afc90bf) to head (90a25be).

Additional details and impacted files
@@                   Coverage Diff                   @@
##             fix/editor-ctrl-s     #127      +/-   ##
=======================================================
- Coverage                93.79%   93.37%   -0.43%     
+ Complexity                 152      149       -3     
=======================================================
  Files                       22       22              
  Lines                      661      619      -42     
  Branches                    54       53       -1     
=======================================================
- Hits                       620      578      -42     
  Misses                      34       34              
  Partials                     7        7              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@erseco
erseco merged commit ec0363b into main Sep 26, 2026
16 checks passed
@erseco
erseco deleted the refactor/remove-dead-code branch September 26, 2026 06:44
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.

2 participants