Skip to content

Implement Deck board creation in team quick-create panel #5357

@pringelmann

Description

@pringelmann

Summary

The "Deck board" entry in the team quick-create panel (Contacts -> team details) opens the input popover but doesn't actually create a board. Submitting always shows "Deck app is not installed", even though the button only renders when Deck is installed. The stub was shipped alongside the other quick-create resources in #4846.

Refiled from nextcloud/deck#7608; the code lives in this repo.

Steps to reproduce

  1. Open a team in Contacts.
  2. Click "Deck board" in the Create section, enter a name, submit.
  3. Toast says "Deck app is not installed. Please install it to create team boards."

No board is created. No share is added.

Expected

Board gets created, shared with the team (edit + share, no manage), and shows up in the team's resource list.

Where the bug is

src/components/CircleDetails.vue#L558-L561:

case 'deck': {
    showError(t('contacts', 'Deck app is not installed. Please install it to create team boards.'))
    return
}

Every other resource type has a real implementation in handleResourceCreation and shareResourceWithTeam. This one was shipped as a placeholder.

Plan

  1. In handleResourceCreation, POST /apps/deck/boards with { title: name, color }. Read id from response.data.id.
  2. In shareResourceWithTeam, add a deck case that does POST /apps/deck/boards/{boardId}/acl with type: 7 (Acl::PERMISSION_TYPE_CIRCLE, see deck Acl.php), participant: this.circle.id, permissionEdit: true, permissionShare: true, permissionManage: false.
  3. On success: clear input, close popover, call fetchTeamResources(), show success toast.
  4. On failure: show the error from response.data. If create succeeded but the ACL call failed, say so in the toast so the user knows there's an orphan board to clean up. Also fix the lying "Deck app is not installed" string while we're at it.

Open questions

  • Default board color. #0082c9 to match the calendar branch is fine; otherwise pick from a small hardcoded palette.
  • Whether to mirror calendar's "Show in Deck" success button (deep-links to /apps/deck/board/{id}), or just toast + refresh like Talk/Collective. The deep-link is cheap, probably worth it.

Acceptance

  • Submitting the form creates a board in Deck and shares it with the team.
  • Team members can open and edit cards. Non-creators can't rename/delete (no manage) but can reshare it onward.
  • Board appears in the team's resource list after creation.
  • Failures show one accurate toast; orphan board case is flagged to the user.
  • Talk / Calendar / Collective / Folder flows still work.

Out of scope

Color picker, button row restyling, any change to Deck itself.

Estimate

~0.5 day. One file, two API calls, popover and input already wired via TeamResourceButton.

Metadata

Metadata

Assignees

No one assigned
    No fields configured for Enhancement.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions