Skip to content

[RFC] Viewer 4.0 API #2395

Description

@skjnldsv

Let's discuss and plan the new Viewer handling.
cc @juliushaertl @susnux @R0Wi @ariselseng @artonge @max-nextcloud

Challenges

With the new Files app and the new Files/Folder/Node API, we finally have a proper and official way of dealing with files
It's time to re-draft the Viewer and clean the various issues we encountered over the last years

Requirements

Viewer

  • The Viewer is a component that can mount itself within a Modal to render a single or an array of Files
  • The Viewer can also be requested to be mounted within a specified div to render a single file only. In that case there would be no interaction possible (zooming, slideshow, editing, actions.... are disabled)
  • The Viewer can also be used to render two files next to each others, to compare them

Handlers

Apps can register their own views, called "Handlers"
A handler provide the following

  • A unique id
  • A display name
  • A render function to process the current file
  • A open function to change the node while keeping the handler mounted
  • A toggle function to show/hide the handler (for preloading, like videos or images)
    ❓ Is this still the right approach?
  • A condition to which the handler would work for the provided file (true/false)

Activity

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

Metadata

Metadata

Assignees

Labels

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions