Darshan Upadhyay
Think about the last ten documents you opened. How many of them did you actually change? For most people the honest answer is one or two. The rest were contracts to check, reports to read, minutes to skim, slides to glance over before a meeting. Yet an online office suite has traditionally treated every open as the start of an editing session: full toolbars, a blinking cursor, and a lock on the file.
Collabora Online now makes reading a first-class activity. Every document has two explicit modes, Viewing and Editing, and a switcher in the top bar lets you flip between them in one click, without reloading the document.
The switcher in context
The document mode switcher sits at the top right of the notebookbar, next to the collapse and Share buttons, exactly where your eyes already are when you open a file. The button always shows the current mode.
Click it and a small menu offers the two modes, with the active one highlighted:
Switch to Viewing and the editing furniture gets out of the way. The notebookbar folds into a slim menu bar, the sidebar disappears, and the document takes the full width of the window. What remains is a clean, distraction-free reading view:
Who sees what
The dropdown appears only for people who can actually edit. A user who has write access but is currently just reading sees the Editing / Viewing dropdown and can change modes at any time. A user who genuinely has no write access instead sees a static Read-only indicator in the same spot, with no menu to open:
That distinction matters. The mode switcher is not a permission system; it is a convenience on top of one. Your integration’s WOPI permissions still decide who may write. The switcher only lets a write-capable user choose not to edit right now.
Open in view mode by default
Since most opens are reads, documents can now be made to start in Viewing mode. A new server setting in coolwsd.xml lists the file formats that should open read-only:
<view_mode desc="View mode settings">
<!-- File formats that start read-only -->
<file_extensions type="string" default="">docx|xlsx|pptx</file_extensions>
</view_mode>Every listed format then lands in the clean reading view first. Anyone with write rights is one click away from editing; everyone else simply gets a better reading experience. Starting read-only also avoids the side effects of an accidental editing session: unwanted file locks, spurious “user X is editing” notifications, and the odd stray keystroke saved into a contract.
What the switch actually does
The mode is a property of your view, not of the document. When you leave Editing mode, your changes are saved first, and the browser then tells the document engine that this view no longer accepts edits. The per-comment edit controls and the redline accept and reject controls hide; re-entering Editing mode restores them. Other collaborators who are in Editing mode keep working normally, and you watch their changes arrive live while you read.
Enforcement lives in the document engine on the server, not in the browser. A view in Viewing mode has its document-changing commands refused at the engine, so hiding the buttons is a courtesy, not the mechanism.
A true read-only view, not a half-disabled editor
The tricky part of this feature was not the dropdown. It was making Viewing mode behave like a real reading view rather than an editor with some buttons removed, and that took a batch of supporting fixes across all three applications:
- Impress: the slide order stays fixed; the slide sorter no longer allows reordering in view mode.
- Calc: cells can no longer be moved while viewing.
- Page Up and Page Down scroll the document in view mode, as readers expect.
- Find, Select All and Copy stay enabled, because reading includes searching and quoting.
- Stability: fixed a crash when switching a password-protected document from Viewing to Editing.
Each of these sounds small. Together they are the difference between “the editor, but greyed out” and a reading view you would actually choose.
Try it in the current Collabora Online development builds, and tell us what you think. If you run your own server, add your most-read formats to the view_mode setting and watch the accidental-edit support tickets disappear.