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

Custom file action labels in oCIS extensions #5369

Closed
anastr0 opened this issue Jun 25, 2021 · 2 comments
Closed

Custom file action labels in oCIS extensions #5369

anastr0 opened this issue Jun 25, 2021 · 2 comments

Comments

@anastr0
Copy link
Contributor

anastr0 commented Jun 25, 2021

Currently, file actions from out of the box extensions can only have labels "Open in extension-name". I'm building an extension to provide some jupyter notebook features. The usecase requires adding 2 file actions to the filetype .ipynb. Is there a way to provide support for custom labels? Atleast the text after "Open in" will suffice.

Further note: There are usecases where a file (Eg. .doc) can be opened with Collabora or office 365 with ocis-wopiserver where this support might be helpful.

Steps to reproduce

  • Add 2 file actions to the appInfo object to the same extension. Like so -
const appInfo = {
  name: 'extension-name',
  id: 'extension-id',
  icon: 'icon-label',
  isFileEditor: false,
  extensions: [
    {
      extension: 'ipynb',
      newFileMenu: {
        menuTitle($gettext) {
          return $gettext('Random file action 0')
        }
      },
    },
    {
      extension: 'ipynb',
      newFileMenu: {
        menuTitle($gettext) {
          return $gettext('Random file action 1')
        }
      },
    }
  ]
}

Expected behaviour

ocis-jupyter-file-actions-expectation

Actual behaviour

actual-ocis-jupyter

@glpatcern
Copy link

+1!

A related discussion takes place in cs3org/reva#1779 - eventually, we'd like the web to query for the list of possible handlers (or AppProviders in Reva's parlance) of a given file and show a menu item for each of them, plus registering one of them as "default" for the response to the direct click.

@pascalwengerter
Copy link
Contributor

Has long been fixed here with the App Provider, at least from my understanding

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants