Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a setting to open files read-only by default #3923

Open
saierd opened this issue Mar 10, 2023 · 13 comments · May be fixed by #4902
Open

Add a setting to open files read-only by default #3923

saierd opened this issue Mar 10, 2023 · 13 comments · May be fixed by #4902
Labels
design Experience, interaction, interface, … enhancement New feature or request needs info needs triage: julius

Comments

@saierd
Copy link

saierd commented Mar 10, 2023

Is your feature request related to a problem? Please describe.

I want to store relatively static content in Markdown files edited with Text. These files are usually opened for reading only. At the moment the editor is always editable, which makes it easy to accidentally change the file.

This applies especially to the Readme.md file shown at the top of a folder. It is always visible and editable by default, but should not be changed accidentally.

Describe the solution you'd like

If I understand correctly, Text is already the editor used in Collectives, so it has a read-only mode, right? Would it be possible to provide a setting that

  • Opens Markdown files in read-only mode by default
  • Shows an edit button like in Collectives and only makes the file editable once that button is clicked

Describe alternatives you've considered

Using Collectives directly, but this stores the files in a special location and requires opening them in a separate app. I would like to keep files in the normal file structure and also get the additional security when files are accessed through the files app.

@saierd saierd added the enhancement New feature or request label Mar 10, 2023
@XueSheng-GIT
Copy link

XueSheng-GIT commented Apr 12, 2023

I'm using text to work in different teams. It happens quite often that team members do change text (markdown) files by mistake. Thus, I would also prefer to open markdown files read-only. This would at least prevent that such unintended changes are done.

@Yiannis128
Copy link

There are a lot of times that I view a file on the phone and text appears in edit mode. By mistake, making a small edit is very easy. If there was a floating button added (android) to enable edit mode for the editor, and a pencil icon in the header bar to enable it for the web app, it would be a great addition.

@juliushaertl
Copy link
Member

@nimishavijay @szaimen @jancborchardt Any thoughts about this? We don't have this in any other file editing options like Collabora or ONLYOFFICE. Collectives has this option but there it seems more common to just read in terms of being a knowledge base compared to regular files.

@juliushaertl juliushaertl added design Experience, interaction, interface, … needs info labels Jun 7, 2023
@rvjr
Copy link

rvjr commented Jun 8, 2023

I think making edit operations more explicit could also makes sense when it comes to versioning. These accidental changes can clutter the version history, and even push out more important changes from the change tracking. As you brought up it might even be useful for other formats to have read-only previews, also for office documents, which makes regular folders more usable for sharing information to people who don't need to edit them, or shouldn't even be allowed to edit.

But apart from these other use cases even for myself I would find it safer to only view a document and know that it's protected from accidental changes.

@szaimen
Copy link
Contributor

szaimen commented Jun 9, 2023

@nimishavijay @szaimen @jancborchardt Any thoughts about this? We don't have this in any other file editing options like Collabora or ONLYOFFICE. Collectives has this option but there it seems more common to just read in terms of being a knowledge base compared to regular files.

I don't know how much effort that be but porting the logic from collecctives over to text to be able to open files read-only sounds like a good idea to me in general since I can understand the need for it. The most important think would be to make it really visible that a files is read-only then by showing a big edit button on top in that case like it is done in collectives. WDYT @nimishavijay @jancborchardt ?

@juliushaertl
Copy link
Member

I'd also like to hear @jancborchardt opinion here since we decided in the past with Collabora to not introduce this.

@nimishavijay
Copy link
Member

This seems like an issue frequented on mobile and not on desktop. On most web based editors like google docs and notion, shared files are opened in edit mode by default (even on Nextcloud, Collabora shows shared files in edit mode on desktop and read-only mode on mobile). Besides, there is always the option to share a file in read-only mode which makes sure that the sharee can't make any changes. So what do you think about implementing half of the the solution by @Yiannis128, so just showing a floating edit button on mobile?

@rvjr
Copy link

rvjr commented Aug 3, 2023

Maybe a setting would be nice, like:

Initial .md editor mode

  • start in edit mode (default)
  • start read-only, always
  • start read-only, on mobile only

@benthie benthie linked a pull request Oct 26, 2023 that will close this issue
7 tasks
@rvjr
Copy link

rvjr commented Nov 11, 2023

@Yiannis128, @XueSheng-GIT, any comment on the PR of @benthie? For us it would be very useful in this form... Is this how it would work for your use cases as well?

@Yiannis128
Copy link

Hi, I checked the PR and it looks good. Now it's a matter of making it available it in apps that use the text editor.

@XueSheng-GIT
Copy link

I didn't test the PR, but would appreciate if this (read only) option would be available. Mardown files are changed unintentionally from time to time. This option could prevent this.

@simonschmeisser
Copy link

The use case envisioned here is to use folders with markdown files as a replacement for Confluence (and Mediawiki previously). In both they distinguish between a passive read-only mode and then you click a link or press a shortcut to do actual edits. But most often you don't as such texts (company guidelines, meeting notes, ... ) are read much more often than actually edited.

Sharing as read-only is another puzzle piece to restrict unqualified or malicious edits (if ever ...) but we actually worry more about accidental edits by non tech savvy parts of e.g. administration

@rvjr
Copy link

rvjr commented Jan 8, 2024

@juliushaertl is there any chance to get some feedback here? I would greatly appreciate if @benthie would finalize this feature, but apparently he would need a basic ok from your side first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design Experience, interaction, interface, … enhancement New feature or request needs info needs triage: julius
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants