Repository navigation
feat(readonly): keep only File and View tabs in read-only mode - #300
Merged
Merged
Conversation
…them The toolbar mask grayed out every tab, View included, so a readonly document lost its zoom and navigation along with the editing buttons. Keep only the File and View tabs, open on View, and hide the editing controls that live outside the tabs: paste, cut, format painter, macros, sheet views, freeze panes, slide master, Edit PDF and the header's edit-mode switch. Unlocking shows them again and returns to the tab that was open. The rule is CSS on the editor frame rather than vendor tab calls, because the vendor shows contextual tabs on its own as the selection moves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tons Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
chaxus
force-pushed
the
feat/readonly-hide-edit-tabs
branch
from
November 2, 2026 02:40
cd5caac to
788eab2
Compare
Deploying document with
|
| Latest commit: |
788eab2
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://ffbe808f.document-7hm.pages.dev |
| Branch Preview URL: | https://feat-readonly-hide-edit-tabs.document-7hm.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #299 for #298 (rebased onto main after #299 merged).
Problem
#299 masked the whole toolbar in read-only mode. The buttons were disabled but still visible, and the mask also covered the View tab, so zoom and navigation in the toolbar were grayed out as well. The issue asks for editing controls to be hidden or visibly disabled while viewing tools stay usable.
Change (
lib/onlyoffice/readonly.ts)setVisiblecall, because the vendor re-shows contextual tabs on its own when the selection moves.#slot-*ids):editing:disableno longer masks the toolbar. It still locks the right panel, context menu, review, comments preview, cell editor and header undo/redo.Verification
test/e2e/readonly-chrome.spec.tsruns once each for docx, xlsx, pptx and pdf:['file','view'], View is active, paste is hidden, search and zoom-in are usable;syncReadonlyTabscommented out, all 4 fail (extra home/ins/review… tabs);READONLY_HIDDEN_SLOTSemptied, all 4 fail (paste: true);Record:
docs/explorations/2026-11-02-readonly-hide-edit-tabs.md🤖 Generated with Claude Code