Skip to content

Conversation

@susnux
Copy link
Contributor

@susnux susnux commented Jun 26, 2025

☑️ Resolves

This can be used e.g. to upload files, for example in the forms app but also for the files or photos app.
It is more universal than the upload picker from nc-upload as it is not bound to webdav uploader.

Just to clarify: This is NOT the uploader.
The idea here is that this is just a plain file picker (styled and enhanced input[type=file].
The use case are apps which have their own way of handling uploads - like forms - or if you directly process files in the browser.

There will be a follow up with NcUploader or NcUploadPicker (?) which will be the migrated component from @nextcloud/upload and will be based on this component.

🏁 Checklist

  • ⛑️ Tests are included or are not applicable
  • 📘 Component documentation has been extended, updated or is not applicable
  • 2️⃣ Backport to stable8 for maintained Vue 2 version or not applicable

@susnux susnux requested review from Antreesy and ShGKme June 26, 2025 10:56
@susnux susnux added enhancement New feature or request 3. to review Waiting for reviews labels Jun 26, 2025
@susnux susnux force-pushed the feat/nc-file-picker branch from b222280 to 4d458d1 Compare June 26, 2025 11:29
@susnux susnux marked this pull request as ready for review June 26, 2025 11:46
@susnux susnux force-pushed the feat/nc-file-picker branch from b9da927 to 7ba4e9e Compare June 26, 2025 16:19
@susnux susnux force-pushed the feat/nc-file-picker branch from b6f04d0 to d11a3ab Compare July 8, 2025 15:27
@susnux susnux requested a review from ShGKme July 8, 2025 15:27
@susnux susnux force-pushed the feat/nc-file-picker branch from d11a3ab to f7320bd Compare July 8, 2025 15:40
@susnux susnux requested a review from ShGKme July 8, 2025 15:40
@ShGKme
Copy link
Contributor

ShGKme commented Oct 1, 2025

@susnux is there anything you want to change here? I think you mentioned it at a meeting.

@susnux
Copy link
Contributor Author

susnux commented Nov 4, 2025

is there anything you want to change here? I think you mentioned it at a meeting.

Yes will work on it

@susnux susnux force-pushed the feat/nc-file-picker branch from f7320bd to b0e30d9 Compare November 14, 2025 16:11
@codecov
Copy link

codecov bot commented Nov 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.11%. Comparing base (8f99087) to head (be16ff5).
⚠️ Report is 26 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7097      +/-   ##
==========================================
+ Coverage   51.78%   52.11%   +0.33%     
==========================================
  Files          98      100       +2     
  Lines        3171     3170       -1     
  Branches      874      873       -1     
==========================================
+ Hits         1642     1652      +10     
+ Misses       1279     1271       -8     
+ Partials      250      247       -3     

☔ View full report in Codecov by Sentry.
📢 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.

@susnux
Copy link
Contributor Author

susnux commented Nov 14, 2025

Just to clarify: This is NOT the uploader.
The idea here is that this is just a plain file picker (styled and enhanced input[type=file].
The use case are apps which have their own way of handling uploads - like forms - or if you directly process files in the browser.

There will be a follow up with NcUploader or NcUploadPicker (?) which will be the migrated component from @nextcloud/upload and will be based on this component.

Current state of this PR is: I will add proper tests for this new component.
As soon as that is done I will set the state to "3. to review" and mark it as "ready for review".

@susnux susnux added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Nov 14, 2025
@susnux susnux marked this pull request as draft November 14, 2025 16:21
@susnux susnux force-pushed the feat/nc-file-picker branch 4 times, most recently from 2a9ae0e to a660dd5 Compare November 16, 2025 15:34
@susnux susnux added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Nov 17, 2025
@susnux susnux marked this pull request as ready for review November 17, 2025 14:35
This can be used e.g. to upload files, for example in the forms app but
also for the files or photos app.

Signed-off-by: Ferdinand Thiessen <[email protected]>
Comment on lines +206 to +207
<!-- App defined upload actions -->
<slot name="actions" />
Copy link
Contributor

Choose a reason for hiding this comment

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

How much custom are the actions?

Would it be possible to replace the #actions slot with some props with menu lists:

  • createNewOptions
  • additionalOptions

where every option is a description:

  • icon
  • label
  • callback

To avoid coupling on NcActions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See #7882

Do you mean like I did there?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes

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

Labels

3. to review Waiting for reviews enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants