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

[F2V] Files views API + navigation + base structure #30070

Closed
12 of 14 tasks
skjnldsv opened this issue Dec 3, 2021 · 0 comments
Closed
12 of 14 tasks

[F2V] Files views API + navigation + base structure #30070

skjnldsv opened this issue Dec 3, 2021 · 0 comments
Assignees
Labels
4. to release Ready to be released and/or waiting for tests to finish enhancement
Milestone

Comments

@skjnldsv
Copy link
Member

skjnldsv commented Dec 3, 2021

This ticket is part of the files to vue migration

Goal

Have the base files view and router

QA

  • No design changes (other than finally using existing vue components)
  • API for base: OCA.Files
  • API for views: OCA.Files.Views
  • Navigation
    • List registered views
    • Nested views
    • Use the same routes as before / redirect to the new routes
  • Main content should stay empty until the other FilesList module gets finalized

  • Settings [split: @skjnldsv]
    • In a Modal straight away like Talk
    • Hidden file toggle
    • Crop image preview toggle
    • API: Toggle settings (workspace, recommendations...)
    • Webdav + documentation link

Views API sample and discussion

  • Name and actions columns are hardcoded first ⚠️
  • Views can decide what columns to add/remove (after the actions column)
/**
 * Open a file on the files app (after init)
 *
 * @param {string} path the path to the file or folder
 * @param {string} [view = 'main'] the view to open the files into
 * @return {Promise}
 */
OCA.Files.open(path: string, view: string = 'main'): Promise

// Creates a new view, sanitize data, throw if invalid or missing prop
const view = new OCA.Files.View({...})

/**
 * Register a new view
 *
 * @param {View} view the view to register
 * @throw Exception if already registered under same id
 */
OCA.Files.Views.register(view)

/**
 * Return the list of registered valid views * @return {View[]}
 */
OCA.Files.Views.get(): View[]
{
	id: 'files',
	name: 'All files',
	getFiles([path = '/']): FileInfo[],
	icon: (VueComponent|string): 'icon-files',
	order: 1,
	columns: [
		{
			name: t('files', 'Size'),
			id: 'size',
			property: 'size',
			[sortFunction: (FileInfoA, FileInfoB) => integer],
			[summary: (FileInfo[]) => string],
			[tooltip: (FileInfo) => string],
		}
		// ... other columns
	],
	[emptyView: VueComponent], // Like an EmptyContent
	[parent: 'id'],
	[sticky: false],
}
@skjnldsv skjnldsv added enhancement 1. to develop Accepted and waiting to be taken care of labels Dec 3, 2021
@skjnldsv skjnldsv added this to the Nextcloud 24 milestone Dec 3, 2021
This was referenced Dec 7, 2021
@blizzz blizzz modified the milestones: Nextcloud 24, Nextcloud 25 Apr 21, 2022
@blizzz blizzz modified the milestones: Nextcloud 25, Nextcloud 26 Oct 19, 2022
@skjnldsv skjnldsv added 2. developing Work in progress and removed 1. to develop Accepted and waiting to be taken care of labels Feb 5, 2023
@blizzz blizzz modified the milestones: Nextcloud 26, Nextcloud 27 Mar 9, 2023
@skjnldsv skjnldsv added 4. to release Ready to be released and/or waiting for tests to finish and removed 2. developing Work in progress labels Apr 11, 2023
@skjnldsv skjnldsv moved this to Done in Files to vue Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish enhancement
Projects
Status: Done
Development

No branches or pull requests

3 participants