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

Impress: Make master slides import from templates folder available for use in the sidebar #4276

Open
Rash419 opened this issue Nov 28, 2024 · 10 comments · May be fixed by #4300
Open

Impress: Make master slides import from templates folder available for use in the sidebar #4276

Rash419 opened this issue Nov 28, 2024 · 10 comments · May be fixed by #4300
Assignees
Labels
2. developing Work in progress enhancement New feature or request

Comments

@Rash419
Copy link
Contributor

Rash419 commented Nov 28, 2024

Is your feature request related to a problem? Please describe.
Import templates from nextcloud in "master slides" of Collabora Online's impress, similar to remote fonts
Image

Describe the solution you'd like

  • We are adding a new remote_asset_config.url config in COOL with PR Improve impress templates CollaboraOnline/online#10463. This will work similarly to remote_font_config

  • This will be upgrade a from remote_font_config.url which was only designed for fonts but remote_asset_config can take fonts, templates and can also be extended in the future if we want fetch other kind of assets.

  • from the richdocuments' side I expect a new endpoint which can serve json which can have both fonts and impress presentation templates.

  • json format would be

{
  "kind": "assetconfiguration",
  "server": "remoteserver",
  "templates": {
    "presentation": [
      {
        "uri": "http://localhost:8080/static/impress-template/template1.otp",
        "version": "1"
      },
      {
        "uri": "http://localhost:8080/static/impress-template/template2.otp",
        "version": "2"
      },
      {
        "uri": "http://localhost:8080/static/impress-template/template3.otp",
        "version": "3"
      }
    ]
  },
  "fonts": [
    {
      "uri": "http://localhost:8080/static/font/font1.ttf",
      "version": "1"
    },
    {
      "uri": "http://localhost:8080/static/font/font2.ttf",
      "version": "2"
    },
    {
      "uri": "http://localhost:8080/static/font/font3.ttf",
      "version": "3"
    }
  ]
}

Additional context

  • For backward compatibility we have kept remote_font_config.
  • I have created RemoteConfigServer for testing
@juliusknorr
Copy link
Member

Very nice proposal. Some quick feedback/questions:

  • stamp is quite unintuitive naming imo, maybe call it version or etag or mtime which are more common names from my perspective
  • It would just be regular odp files where the master slides are used then? Would otp files also be supported? How about pptx?

@juliusknorr
Copy link
Member

  • Implementing the endpoint should be straight forward based on the font list endpoint
    public function getFontList(array $fontFiles): array {
    $url = $this->url;
    $list = array_map(
    static fn (ISimpleFile $f) => [
    'uri' => $url->linkToRouteAbsolute(Application::APPNAME . '.settings.getFontFile', ['name' => $f->getName()]),
    'stamp' => $f->getETag(),
    ],
    $fontFiles
    );
    $instanceName = $this->config->getAppValue('theming', 'name');
    return [
    'kind' => 'fontconfiguration',
    'server' => $instanceName . ' (' . $this->url->getBaseUrl() . ')',
    'fonts' => $list,
    ];
    }
  • As collabora only has one global list of templates and not individual ones per user joining a document, we can only use admin provided templates here

@juliusknorr juliusknorr added 1. to develop Waiting for a developer enhancement New feature or request labels Nov 28, 2024
@github-project-automation github-project-automation bot moved this to 🧭 Planning evaluation (don't pick) in 📝 Office team Nov 28, 2024
@juliusknorr juliusknorr moved this from 🧭 Planning evaluation (don't pick) to 📄 To do (~10 entries) in 📝 Office team Nov 28, 2024
@jancborchardt jancborchardt moved this to 👓 Design review in 🖍 Design team Nov 28, 2024
@juliusknorr
Copy link
Member

@Rash419

"presnt"

is that a typo or any reason to not have "presentation" or something like that?

@Rash419
Copy link
Contributor Author

Rash419 commented Nov 28, 2024

@Rash419

"presnt"

is that a typo or any reason to not have "presentation" or something like that?

@juliusknorr Not a typo but we can use "presentation" or "impress" I guess

@Rash419
Copy link
Contributor Author

Rash419 commented Nov 28, 2024

Very nice proposal. Some quick feedback/questions:

Thanks

* stamp is quite unintuitive naming imo, maybe call it version or etag or mtime which are more common names from my perspective

sure. I can update it to use "version" .

* It would just be regular odp files where the master slides are used then? Would otp files also be supported? How about pptx?

I have tested only with "otp" files as of now because they are the template files for impress. I will check and get back to you : )

@Rash419
Copy link
Contributor Author

Rash419 commented Dec 2, 2024

  • stamp is quite unintuitive naming imo, maybe call it version or etag or mtime which are more common names from my perspective

Updated the JSON to use version

  • It would just be regular odp files where the master slides are used then? Would otp files also be supported? How about pptx?

OTP and ODP files are supported. PPTX is not supported

is that a typo or any reason to not have "presentation" or something like that?

Updated, we use "presentation" now : )

@juliusknorr
Copy link
Member

One follow up question, would it be fine for the version to be an alphanumeric string like an etag (e.g. 674dd5fddf389), that would be an actual identifier within Nextcloud that we can be sure to be updated once the file changes.

@Rash419
Copy link
Contributor Author

Rash419 commented Dec 2, 2024 via email

@juliusknorr
Copy link
Member

Great, did a first implementation at #4300, with some todo left but will try to finish the next days

@juliusknorr juliusknorr linked a pull request Dec 2, 2024 that will close this issue
7 tasks
@juliusknorr
Copy link
Member

One additional idea, we could actually consider exposing this endpoint as a .well-known url on the Nextcloud side. I wonder if we could make it easier for admins then if collabora could auto-discover the endpoint based on just an allowed wopi host.

@juliusknorr juliusknorr added 2. developing Work in progress and removed 1. to develop Waiting for a developer labels Dec 2, 2024
@juliusknorr juliusknorr self-assigned this Dec 2, 2024
@juliusknorr juliusknorr moved this from 📄 To do (~10 entries) to 🏗️ In progress in 📝 Office team Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Work in progress enhancement New feature or request
Projects
Status: 🏗️ In progress
Status: 👓 Design review
Development

Successfully merging a pull request may close this issue.

2 participants