{"action":"created","issue":{"url":"https://api.github.com/repos/nextcloud/server/issues/5065","repository_url":"https://api.github.com/repos/nextcloud/server","labels_url":"https://api.github.com/repos/nextcloud/server/issues/5065/labels{/name}","comments_url":"https://api.github.com/repos/nextcloud/server/issues/5065/comments","events_url":"https://api.github.com/repos/nextcloud/server/issues/5065/events","html_url":"https://github.com/nextcloud/server/issues/5065","id":230669008,"number":5065,"title":"Allow file actions priorization","user":{"login":"nickvergessen","id":213943,"avatar_url":"https://avatars0.githubusercontent.com/u/213943?v=3","gravatar_id":"","url":"https://api.github.com/users/nickvergessen","html_url":"https://github.com/nickvergessen","followers_url":"https://api.github.com/users/nickvergessen/followers","following_url":"https://api.github.com/users/nickvergessen/following{/other_user}","gists_url":"https://api.github.com/users/nickvergessen/gists{/gist_id}","starred_url":"https://api.github.com/users/nickvergessen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickvergessen/subscriptions","organizations_url":"https://api.github.com/users/nickvergessen/orgs","repos_url":"https://api.github.com/users/nickvergessen/repos","events_url":"https://api.github.com/users/nickvergessen/events{/privacy}","received_events_url":"https://api.github.com/users/nickvergessen/received_events","type":"User","site_admin":false},"labels":[{"id":386379233,"url":"https://api.github.com/repos/nextcloud/server/labels/enhancement","name":"enhancement","color":"0e8a16","default":true},{"id":395506289,"url":"https://api.github.com/repos/nextcloud/server/labels/feature:%20files","name":"feature: files","color":"c2e0c6","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-05-23T11:03:50Z","updated_at":"2017-05-23T14:17:27Z","closed_at":null,"body":"### Steps to reproduce\r\n1. Enable richdocuments to have rich editing for odt files\r\n2. Enable files_texteditor because you want txt files to be simple\r\n3. Open an txt file: richdocuments starts\r\n\r\nI 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.\r\n\r\nProposal is to add something like priority to: https://github.com/nextcloud/server/blob/2b794902014264a3793daf42a2ecfa95a1a07342/apps/files/js/fileactions.js#L144-L144\r\n\r\nand then:\r\n```js\r\n\t\t\tif (!!this.actions[mime][name] && this.actions[mime][name].priority < actionSpec.priority) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n```\r\n\r\nThis 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.\r\n\r\nAlternate approach would be hacking into richdocuments to only register, when files_texteditor is not there.\r\n\r\ncc @MorrisJobke @LukasReschke \r\n\r\ncc @RealKelsar for reporting it in IRC"},"comment":{"url":"https://api.github.com/repos/nextcloud/server/issues/comments/303412620","html_url":"https://github.com/nextcloud/server/issues/5065#issuecomment-303412620","issue_url":"https://api.github.com/repos/nextcloud/server/issues/5065","id":303412620,"user":{"login":"MorrisJobke","id":245432,"avatar_url":"https://avatars0.githubusercontent.com/u/245432?v=3","gravatar_id":"","url":"https://api.github.com/users/MorrisJobke","html_url":"https://github.com/MorrisJobke","followers_url":"https://api.github.com/users/MorrisJobke/followers","following_url":"https://api.github.com/users/MorrisJobke/following{/other_user}","gists_url":"https://api.github.com/users/MorrisJobke/gists{/gist_id}","starred_url":"https://api.github.com/users/MorrisJobke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MorrisJobke/subscriptions","organizations_url":"https://api.github.com/users/MorrisJobke/orgs","repos_url":"https://api.github.com/users/MorrisJobke/repos","events_url":"https://api.github.com/users/MorrisJobke/events{/privacy}","received_events_url":"https://api.github.com/users/MorrisJobke/received_events","type":"User","site_admin":false},"created_at":"2017-05-23T14:17:27Z","updated_at":"2017-05-23T14:17:27Z","body":"> 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.\r\n\r\nI like that approach more. The cleaner hack. But still feels like a hack."}}
{"actor":{"display_login":"MorrisJobke"}}