-
Notifications
You must be signed in to change notification settings - Fork 169
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
Move common app logic to useAppDefaults composable #6156
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
All fine for me :) Can we apply the same logic to the |
I will look into it, my goal is certainly to unify URL handling accross all apps. For now I want to port apps shipped inside oC Web, in the long run this should become sort of a universal toolkit also for apps implemented externally. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice unification! Didn't look into every detail, but the approach and direction this is going are nice and helpful. 👍
Naming: About the other functions and apis: The composable can (and should) be split into more granular pieces but that can be done at a later point as well. My linter is going bonkers and doesn't work for the whole project for me right now, so there are few pieces to fix here and there. Not only but also not using Function as type guard :) |
17d58f1
to
2f58534
Compare
Results for oC10SharingAccept https://drone.owncloud.com/owncloud/web/21637/15/1
|
Results for oC10IntegrationApp1 https://drone.owncloud.com/owncloud/web/21637/68/1 |
I looked at it briefly, but not having a working wopi setup or something like that it's a bit hard for me to test and would likely bloat up this PR. In the long run we should definitely look to streamline this... |
Okay, drone is green - sonarcloud probably fails because of the |
From my POV this is good to go! |
packages/web-pkg/src/composables/useAppDefaults/useAppFileLoading.ts
Outdated
Show resolved
Hide resolved
packages/web-pkg/src/composables/useAppDefaults/useAppFileLoading.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😍
SonarCloud Quality Gate failed. |
Description
This extracts some file and folder loading/saving from mediaviewer and drawio apps and finally moves them into a central place.
Functions
getFileInfo
,putFileContents
andgetFileContents
are based on 68b7332 by @diocasThanks and kudos for that!
I wanted to solve the routing a bit differently and it was easier for me to just copy the relevant parts instead of revoking parts of your commit. I hope this is fine for you, if you prefer I can probably mark the commit as being authored by us two or cherry pick and revoke the routing part. Just let me know, thanks!
Names are not great, typescript types are basically not there, the big composable file can possibly be split into more modules, etc....
This is a PoC and just lays a ground for dicussion.
Related Issue
Motivation and Context
Creating an app needs deep knowledge of the possible views in oC Web (public, private, shared, ...) and knowledge about the structure of the store. Also app code should be rather resilient against structural changes in oC Web (as much as reasonably possible at least). That is why we should provide apps a stable-ish API to run against.
This PR adds a composable providing a bunch of helper functions/properties/... usually needed to write applications handling files.
Do we need to/can we/should we consider namespace handling, too?
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist:
Open tasks:
web-pkg
onweb-app-files
(?)