Skip to content

feat: added TeamAppProviderRegistry, to to shift the creation and vie… - #3089

Open
hiobjan wants to merge 1 commit into
masterfrom
feat/app-registry-for-teams
Open

hiobjan wants to merge 1 commit into
masterfrom
feat/app-registry-for-teams

Conversation

@hiobjan

@hiobjan hiobjan commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

…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.

Image

When adding a resource, a prompt with an input can be used to e.g. define the name of the resource:

Image If there are resources, that arent part of the navigation the owner or admin cann add these resource to the navigation: Image

Or remove existing resources from the navigation:

Image

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 openMode of the navigationEntry, the resource opens as a link in a new tab or the TeamAppView.vue renders it as NcReferenceList using the referenceUrl from the navigationEntry
This is how the view via NcRefernceList for deck looks:
image

Implementations

TODO

  • Migrate existing resources
  • Add a property to the NcReferenceList in nextcloud/vue to stretch the NcReferenceList to use the full page and use it in circles
  • Test the migration of the navigation (items and order)

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@codecov

codecov Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@hiobjan
hiobjan force-pushed the feat/app-registry-for-teams branch 3 times, most recently from 42c9c55 to fed00ea Compare October 27, 2026 12:39
@github-project-automation github-project-automation Bot moved this to Backlog in 👥 Teams Oct 28, 2026
@artonge artonge moved this from Backlog to In review in 👥 Teams Oct 28, 2026
@hiobjan
hiobjan force-pushed the feat/app-registry-for-teams branch 2 times, most recently from 2735162 to 704a7b2 Compare November 2, 2026 11:46
@hiobjan
hiobjan force-pushed the feat/app-registry-for-teams branch 4 times, most recently from 025081f to 058671b Compare November 10, 2026 08:23
@github-actions

Copy link
Copy Markdown
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

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.)

@hiobjan
hiobjan force-pushed the feat/app-registry-for-teams branch 2 times, most recently from 0a050c4 to 41d4e07 Compare November 10, 2026 10:26
@hiobjan hiobjan added this to the Nextcloud 36 milestone Nov 10, 2026
@hiobjan
hiobjan force-pushed the feat/app-registry-for-teams branch 5 times, most recently from 11ea9af to 52e2c84 Compare November 10, 2026 13:05
@hiobjan
hiobjan marked this pull request as ready for review November 10, 2026 13:16
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>
@hiobjan
hiobjan force-pushed the feat/app-registry-for-teams branch from 52e2c84 to ca82076 Compare November 10, 2026 13:39
$settings = $this->circleSettings($circleId);
$navigationEntryIds = $this->getSavedNavigationEntryIds($settings, $providerId);
$provider = $this->providers->getProviders()[$providerId];
$navigation = $this->applySavedNavigationSelection($provider->getNavigation($circleId, $userId, $isAdmin, $folder), $navigationEntryIds);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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 {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we could rename like this for clarity?

Suggested change
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) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

maybe we could add a const for this?

Suggested change
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);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

This branch has not been deployed

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

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

Create a general solution to embed team-resources (apps) into the teams UI Embedded resources (apps) in teams

2 participants