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

feat(files): add default action support and expose router #37824

Merged
merged 2 commits into from
Apr 20, 2023

Conversation

skjnldsv
Copy link
Member

@skjnldsv skjnldsv commented Apr 19, 2023

Adds default action support

This means any default action not being bound to the file name click will be shown in the actions menu (so far there is none). But that means we could have Open in Viewer as default and Open in Collabora... etc in the menu 🚀
Reference: nextcloud/viewer#2393

Expose vue router to allow external apps to change the route

Example:

OCP.Files.Router.goTo('/trashbin?dir=/Unsplash.d1680193199')
OCP.Files.Router.goToRoute('fileslist', { view: 'files' }, { dir: '/Folders/Group folder' })

Required for nextcloud/groupfolders#2326

@skjnldsv skjnldsv self-assigned this Apr 19, 2023
@skjnldsv skjnldsv added this to the Nextcloud 27 milestone Apr 19, 2023
apps/files/src/components/FilesListHeaderActions.vue Outdated Show resolved Hide resolved
apps/files/src/main.js Outdated Show resolved Hide resolved
@ChristophWurst
Copy link
Member

I'd highly prefer a simple wrapper around the Vue router. It potentially makes upgrades and the migration away from the Vue router easier. Todays fancy tech will be legacy one day.

@skjnldsv skjnldsv added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Apr 20, 2023
@skjnldsv
Copy link
Member Author

Done, the router is implemented, see first comment

Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

Docs needed for the new OCP.Files.Router API

@ChristophWurst ChristophWurst added the pending documentation This pull request needs an associated documentation update label Apr 20, 2023
@skjnldsv skjnldsv added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Apr 20, 2023
@skjnldsv skjnldsv merged commit 7a704b8 into master Apr 20, 2023
@skjnldsv skjnldsv deleted the feat/groupfolders branch April 20, 2023 08:53
@skjnldsv skjnldsv removed the pending documentation This pull request needs an associated documentation update label May 23, 2023
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 feature: files
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants