Skip to content

feat(dialog): experimental sharing dialog for the unified sharing API#239

Draft
skjnldsv wants to merge 4 commits into
mainfrom
feature/vite-lib-build
Draft

feat(dialog): experimental sharing dialog for the unified sharing API#239
skjnldsv wants to merge 4 commits into
mainfrom
feature/vite-lib-build

Conversation

@skjnldsv

Copy link
Copy Markdown
Contributor

WIP

skjnldsv added 2 commits July 17, 2026 16:12
Switch the build from plain tsc to @nextcloud/vite-config createLibConfig
so the package can ship Vue SFCs in upcoming subpath exports. The three
existing entry points (., ./public, ./ui) are preserved; only the dist
file names change (.js -> .mjs, ui/index.js -> ui.mjs). Declarations are
generated by vite-plugin-dts and rolled up in production mode.

Also fixes the stale lib/publicShare.ts reference in build:doc.

Assisted-by: ClaudeCode:claude-fable-5
… API

Add a new ./dialog entry point shipping the sharing dialog built for the
unified sharing API (Nextcloud >= 35):

- openSharingDialog(node) spawns the dialog, gated on the sharing
  capability being present
- SharingDialog component export for embedding
- typed API client (createShare, addShareRecipient,
  selectSharePermissionPreset, ...) and response types
- own gettext domain, translations bundled at build time

The dialog is marked experimental: the server API is new and the module
API may change in any minor release.

Assisted-by: ClaudeCode:claude-fable-5
@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 76.10619% with 27 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.51%. Comparing base (7162b64) to head (d23a668).
⚠️ Report is 80 commits behind head on main.

Files with missing lines Patch % Lines
lib/dialog/utils/api.ts 19.04% 11 Missing and 6 partials ⚠️
lib/dialog/components/PropertyField.vue 87.50% 8 Missing ⚠️
lib/dialog/types/api.ts 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #239       +/-   ##
===========================================
- Coverage   95.65%   83.51%   -12.14%     
===========================================
  Files           4       11        +7     
  Lines          69      182      +113     
  Branches       25       69       +44     
===========================================
+ Hits           66      152       +86     
- Misses          3       24       +21     
- Partials        0        6        +6     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

skjnldsv added 2 commits July 17, 2026 17:13
Declaration rollup only ran in production mode, so dev/watch builds
emitted nested d.ts files that did not match the flat paths in the
exports map. Drop the rollup and point exports at the nested output,
identical in both modes.

Assisted-by: ClaudeCode:claude-fable-5
The unified sharing API replaced the view/edit preset enum with
registered preset classes carrying translated display names:

- capabilities now expose sharing.permission_presets with
  {class, display_name, hint}, so the hardcoded preset label map is
  gone and the dropdown is fully backend-driven
- permission.presets and permission_preset carry preset class strings
- the preset endpoint parameter was renamed to permissionPresetClass

Assisted-by: ClaudeCode:claude-fable-5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant