Skip to content

Added option to disable Edit Locally menu option - #41582

Closed
Koc wants to merge 2 commits into
nextcloud:masterfrom
Koc:feature/disable-edit-locally
Closed

Added option to disable Edit Locally menu option#41582
Koc wants to merge 2 commits into
nextcloud:masterfrom
Koc:feature/disable-edit-locally

Conversation

@Koc

@KocKoc commented Nov 17, 2023

Copy link
Copy Markdown
Contributor

Summary

Many of our users has no installed software for edit file locally. This leads to struggling with mentioned menu option. For me this option also does nothing for any file format. So as an option - we can add a way to disable it completely.

by default:
image

with option

# config/config.php<?php$CONFIG = array (
// ...'disable_edit_locally' => true,
);

image

Checklist

@Koc
Kocforce-pushed the feature/disable-edit-locally branch from 156b160 to a683aebCompareNovember 17, 2023 17:06
@AndyScherzingerAndyScherzinger added the 3. to review Waiting for reviews label Nov 17, 2023
Comment threadapps/files/lib/Controller/ViewController.php Outdated
@Koc
Kocforce-pushed the feature/disable-edit-locally branch 6 times, most recently from 8fb985e to e2a35cfCompareNovember 20, 2023 23:04
@solracsfsolracsf added this to the Nextcloud 28 milestone Nov 21, 2023
@Koc

Koc commented Nov 21, 2023

Copy link
Copy Markdown
ContributorAuthor

Test failures looks unrelated

@blizzzblizzz mentioned this pull request Nov 22, 2023
5 tasks
@blizzzblizzz modified the milestones: Nextcloud 28, Nextcloud 29Nov 23, 2023
@Koc
Kocforce-pushed the feature/disable-edit-locally branch 2 times, most recently from 00248c4 to 944aadcCompareNovember 28, 2023 12:06
@Koc

Koc commented Dec 4, 2023

Copy link
Copy Markdown
ContributorAuthor

@blizzz@solracsf@AndyScherzinger hey mates, any chance to review this small PR? 🙏

@solracsf

Copy link
Copy Markdown
Member

config.php option should also be documented.

@AndyScherzingerAndyScherzinger added the pending documentation This pull request needs an associated documentation update label Dec 5, 2023
@AndyScherzinger
AndyScherzinger requested review from jancborchardt and removed request for PVince81December 5, 2023 17:01

@PytalPytal left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should move away from PHP template params and use provideInitialState on backend + loadState from @nextcloud/initial-state on frontend

@Koc
Kocforce-pushed the feature/disable-edit-locally branch from 4e3623e to 8d42af0CompareDecember 7, 2023 16:41
@Koc

Koc commented Dec 7, 2023

Copy link
Copy Markdown
ContributorAuthor

@solracsf good catch, added notes in config.sample.php

@Pytal oh, I wasnt aware about that but I like it more than jQuery val() 😄 . Fixed + manually re-tested

Comment threadapps/files/src/actions/editLocallyAction.ts

@jancborchardtjancborchardt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than having a switch to disable this altogether, wouldn’t the proper approach here be that the desktop client communicates if a relevant desktop app can be handled? And if the desktop client is not available or installed for the account, then we can disable the entry too (not sure if we already do this).

@tobiasKaminsky@mgallien is this possible?

I understand this is probably more complicated to code, but then there is 0 additional configuration.

@jancborchardt

Copy link
Copy Markdown
Member

For me this option also does nothing for any file format.

@Koc not even for file formats where you have a handler installed, and you have the Nextcloud desktop client installed? This is a real issue we should fix then for everyone. Simply allowing some people to disable the feature altogether does not fix the original issue unfortunately. :)

@mgallien

mgallien commented Dec 20, 2023

Copy link
Copy Markdown
Contributor

Rather than having a switch to disable this altogether, wouldn’t the proper approach here be that the desktop client communicates if a relevant desktop app can be handled? And if the desktop client is not available or installed for the account, then we can disable the entry too (not sure if we already do this).

@tobiasKaminsky@mgallien is this possible?

I understand this is probably more complicated to code, but then there is 0 additional configuration.

technically would require (as far as I understand) to have an extension in your browser (like KeePassXC integration or plasma desktop integration) that would be able to communicate with the desktop client (or other software) and check for their presence
feasible and we would know what to do but still a significant effort

Signed-off-by: Konstantin Myakshin <molodchick@gmail.com>
Signed-off-by: Konstantin Myakshin <molodchick@gmail.com>
@Koc
Kocforce-pushed the feature/disable-edit-locally branch from 823e58e to fef09bcCompareDecember 20, 2023 23:17
@jancborchardt

Copy link
Copy Markdown
Member

@mgallien ok, no, requiring a browser extension would not be feasible. I thought we could know whether the browser currently in use and the desktop client are on the same system for example, as they are connected by the server.

Then @sorbaugh@AndyScherzinger cc regarding that off-switch for this feature, seems fine if it is only a config.php setting?

This was referenced Mar 12, 2024
This was referenced Mar 20, 2024
@skjnldsvskjnldsv mentioned this pull request Mar 28, 2024
81 tasks
@skjnldsvskjnldsv added 2. developing Work in progress stale Ticket or PR with no recent activity and removed 3. to review Waiting for reviews labels Jul 27, 2024
This was referenced Jul 30, 2024
@skjnldsvskjnldsv closed this Aug 3, 2024
@skjnldsvskjnldsv removed this from the Nextcloud 30 milestone Aug 14, 2024
@skjnldsvskjnldsv removed the pending documentation This pull request needs an associated documentation update label Mar 27, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2. developingWork in progressstaleTicket or PR with no recent activity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants

@Koc@solracsf@jancborchardt@mgallien@Pytal@github-advanced-security@AndyScherzinger@blizzz@skjnldsv