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

Allow prioritizing default file actions for a mime type (per user) #5065

Open
nickvergessen opened this issue May 23, 2017 · 4 comments
Open
Labels
1. to develop Accepted and waiting to be taken care of enhancement feature: files

Comments

@nickvergessen
Copy link
Member

Steps to reproduce

  1. Enable richdocuments to have rich editing for odt files
  2. Enable files_texteditor because you want txt files to be simple
  3. Open an txt file: richdocuments starts

I think it would be nice to have something like a priority of the actions. Currently the last one wins, and since richdocuments is after files_texteditor in the alphabet, files_texteditor has no way to ever win this.

Proposal is to add something like priority to:

var actionSpec = {

and then:

			if (!!this.actions[mime][name] && this.actions[mime][name].priority < actionSpec.priority) {
				return;
			}

This would allow the files_texteditor to register for text files, while richdocuments can also, so in case files_texteditor is not there, you can still edit them.

Alternate approach would be hacking into richdocuments to only register, when files_texteditor is not there.

cc @MorrisJobke @LukasReschke

cc @RealKelsar for reporting it in IRC

@MorrisJobke
Copy link
Member

This would allow the files_texteditor to register for text files, while richdocuments can also, so in case files_texteditor is not there, you can still edit them.

I like that approach more. The cleaner hack. But still feels like a hack.

@LukasReschke
Copy link
Member

I'd rather prefer a "Open with" dialogue but yay, JavaScript 😉

@nextcloud-bot nextcloud-bot added the stale Ticket or PR with no recent activity label Jun 20, 2018
@skjnldsv skjnldsv added the 1. to develop Accepted and waiting to be taken care of label Jun 12, 2019
@ghost ghost removed the stale Ticket or PR with no recent activity label Jun 12, 2019
@skjnldsv skjnldsv mentioned this issue Jul 14, 2020
4 tasks
@szaimen

This comment was marked as resolved.

@skjnldsv skjnldsv moved this to Enhancements in Files to vue Aug 7, 2024
@susnux
Copy link
Contributor

susnux commented Aug 7, 2024

There are priorities for file actions now, but we still have two problems:

  1. Actions that register as default actions -> if there are multiple we use the most important one without letting the user choose.
  2. multiple handlers on the viewer (e.g. richdocuments and text both use the viewer)

1 is a server issue (this on) and 2 is a viewer issue and handled here: nextcloud/viewer#2393

@susnux susnux changed the title Allow file actions priorization Allow priotizing default file actions for a mime type (per user) Aug 7, 2024
@susnux susnux changed the title Allow priotizing default file actions for a mime type (per user) Allow prioritizing default file actions for a mime type (per user) Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of enhancement feature: files
Projects
Status: Enhancements
Development

No branches or pull requests

7 participants