Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
42c9c55 to
fed00ea
Compare
2735162 to
704a7b2
Compare
025081f to
058671b
Compare
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
0a050c4 to
41d4e07
Compare
11ea9af to
52e2c84
Compare
creation and view of apps from circles to the apps themselves Assisted-by: Copilot:GitHub Copilot Signed-off-by: Janina Hiob <janina.hiob@dataport.de>
52e2c84 to
ca82076
Compare
| $settings = $this->circleSettings($circleId); | ||
| $navigationEntryIds = $this->getSavedNavigationEntryIds($settings, $providerId); | ||
| $provider = $this->providers->getProviders()[$providerId]; | ||
| $navigation = $this->applySavedNavigationSelection($provider->getNavigation($circleId, $userId, $isAdmin, $folder), $navigationEntryIds); |
There was a problem hiding this comment.
maybe we should also handle getNavigation() errors with try catch here, like is done on setEntryNavigation() ?
| return 'teamsAppNavigation_' . $providerId; | ||
| } | ||
|
|
||
| private function validIds(array $ids): bool { |
There was a problem hiding this comment.
I think we could rename like this for clarity?
| private function validIds(array $ids): bool { | |
| private function isValidIds(array $ids): bool { |
| } | ||
|
|
||
| private function validIds(array $ids): bool { | ||
| if (!array_is_list($ids) || count($ids) > 100) { |
There was a problem hiding this comment.
maybe we could add a const for this?
| if (!array_is_list($ids) || count($ids) > 100) { | |
| if (!array_is_list($ids) || count($ids) > self::MAX_NAVIGATION_ENTRIES) { |
| throw new OCSNotFoundException('Teams app action not found'); | ||
| } | ||
| try { | ||
| $resourceId = $provider->addResource($circleId, $teamName, $userId, $isAdmin, $folder, $value); |
There was a problem hiding this comment.
before adding new resource I think we could check if limit was not already reached, like:
if (count($navigationEntryIds) >= self::MAX_NAVIGATION_ENTRIES) {
throw new OCSException('Navigation entry limit reached', Http::STATUS_BAD_REQUEST);
}const MAX_NAVIGATION_ENTRIES = 100; could be added and also used in validIds() for consistency
…w of apps from circles to the apps
Summary
With this approach the creation and view of the apps, that belong to a team is shifted from the circles app to the integrated app.
Admins ans Owners of a Team can add resources to a team and add or remove existing resources to the TeamNavigation.
When adding a resource, a prompt with an input can be used to e.g. define the name of the resource:
Or remove existing resources from the navigation:
How an app gets registered and viewed
1. Register the App
Each app registers its ITeamAppProvider implementation through:
$context->registerTeamAppProvider(TeamsProvider::class);The provider implements:
getId(): the owning app’s ID.getOrder(): default provider order.getNavigation(...): available entries and an optional creation action.addResource(...): creates a resource and returns its entry ID.TeamAppProviderRegistry in circles discovers enabled providers, checks their identity, and obtains their order.
Only apps enabled for the current user are discovered.
2. Load Team’s Navigation
Teams loads all providers through one authenticated navigation request. Each entry supplies a stable ID, label, optional icon, href, and optional referenceUrl and openMode.
The server combines available entries with the team’s saved selection. TeamNavigation.vue displays only selected entries, using saved team ordering when available.
3. Viewing the resource
Depending on the

openModeof the navigationEntry, the resource opens as a link in a new tab or theTeamAppView.vuerenders it asNcReferenceListusing thereferenceUrlfrom the navigationEntryThis is how the view via
NcRefernceListfor deck looks:Implementations
TODO
NcReferenceListin nextcloud/vue to stretch the NcReferenceList to use the full page and use it in circlesChecklist
3. to review, feature component)stable32)AI (if applicable)