feat(dialog): multiple recipients with per-recipient permissions - #258
Draft
skjnldsv wants to merge 10 commits into
Draft
feat(dialog): multiple recipients with per-recipient permissions#258skjnldsv wants to merge 10 commits into
skjnldsv wants to merge 10 commits into
Conversation
The dialog now accepts multiple recipients: the search field is an add-only picker and selected recipients render as a list, each with its own permission preset selector and fine-grained toggles. The share-level permission acts as the maximum and the default for newly added recipients. A recipient's available presets and toggles are capped at the permissions the share grants; toggles beyond the maximum are disabled. The backend enforces the real cap (the sharer's own permissions on a reshare, or the admin default). Adds per-recipient permission methods to the Share class and API client, and extends SharingRecipient with permission_preset + permissions. Assisted-by: ClaudeCode:claude-opus-4-8 Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #258 +/- ##
==========================================
+ Coverage 73.93% 75.00% +1.06%
==========================================
Files 23 27 +4
Lines 564 656 +92
Branches 168 188 +20
==========================================
+ Hits 417 492 +75
- Misses 126 141 +15
- Partials 21 23 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Rework the per-recipient row to match the sidebar: avatar + name + a compact preset dropdown, and a three-dot menu that opens a small modal for full permission editing (preset + custom toggles) plus removal. Extract the preset selector and fine-grained toggles into a reusable PermissionEditor component, used both for the share-level default/maximum and inside the per-recipient modal. The editor shows an info notice when some permissions are capped: a reshare names the owner and the permissions granted, otherwise it states the share's maximum. Toggles above the maximum are disabled. A reshare is detected per recipient (its initiator differs from the share owner). Assisted-by: ClaudeCode:claude-opus-4-8 Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
…ient row
- Guard recipient.permissions (the backend does not yet return per-recipient
permissions), which previously threw on an undefined .map().
- Recipient row: drop the inline preset select; show a static preset label
("Can view" / "Custom permissions"), and move preset shortcuts + custom
permissions (opens the modal) + remove into the three-dot menu.
- Hide the Invited/Anyone tab bar once a recipient (or the link) exists.
- Constrain the "Add people" field width.
Assisted-by: ClaudeCode:claude-opus-4-8
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Set up Playwright component testing (@playwright/experimental-ct-vue) and cover the recipient/permission UI in a real browser: - PermissionEditor: notice visibility, per-permission toggles, over-cap toggles disabled, toggles hidden outside custom mode. - RecipientRow (via an in-browser fixture, since a Share with methods cannot be passed as a serialized prop): preset subtitle, remove from the menu, and the custom-permissions modal opening. - RecipientList: one row per recipient, excluding the link (token). Specs are named *.ct.ts so Vitest (which globs *.spec/*.test) ignores them. Assisted-by: ClaudeCode:claude-opus-4-8 Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
- Move the Playwright component tests to tests/ct/ so they are outside the library's rootDir (they import fixtures outside lib, which broke the build and ts:check). - Add Share.setRecipientPermission / selectRecipientPreset unit tests. - Add SharePanel tab-bar tests (hidden once a recipient exists). - Rename the recipient remove action to "Remove participant" and add left padding to the recipient list. Assisted-by: ClaudeCode:claude-opus-4-8 Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
…m Vitest Follow the repo convention (*.spec.ts) for the Playwright component tests and exclude tests/ct/ from Vitest so the two runners do not collide. Assisted-by: ClaudeCode:claude-opus-4-8 Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
NcSelectUsers defaults to min-width: 260px and its focus box-shadow can spill past the dialog padding, making the "Add people" control wider than the dialog. Pin it to the container width (min-width: 0, max-width: 100%, border-box) like the preset select. Assisted-by: ClaudeCode:claude-opus-4-8 Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
@nextcloud/vue's multiple select (.select.vs--multiple) renders ~2px too wide and overflows its container. Inset it by 1px on each side as a workaround until it is fixed upstream in @nextcloud/vue. Assisted-by: ClaudeCode:claude-opus-4-8 Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
The multiple-select width is now fixed at the source in @nextcloud/vue (NcSelect), so the local margin-inline workaround is no longer needed. Assisted-by: ClaudeCode:claude-opus-4-8 Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
9.11.0 includes the NcSelect multiple-variant width fix, so the recipient picker no longer overflows the dialog. Assisted-by: ClaudeCode:claude-opus-4-8 Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WIP