Skip to content

feat: cutomize file picker icon size - #2580

Open
kristian-zendato wants to merge 1 commit into
mainfrom
feat/file-picker-custom-icon-size
Open

feat: cutomize file picker icon size#2580
kristian-zendato wants to merge 1 commit into
mainfrom
feat/file-picker-custom-icon-size

Conversation

@kristian-zendato

@kristian-zendato kristian-zendato commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Fixes: https://github.com/nextcloud-gmbh/customer-feature-requests/issues/1876

Summary

Make the FilePicker list thumbnails configurable via the CSS custom property --file-picker-preview-size (default: 32px), so instances can change size through theming without a public API.

🤖 AI (if applicable)

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

@codecov

codecov Bot commented Aug 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.38%. Comparing base (40d0492) to head (7f75f7c).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
lib/composables/preview.ts 83.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2580      +/-   ##
==========================================
+ Coverage   59.86%   60.38%   +0.51%     
==========================================
  Files          15       15              
  Lines         461      472      +11     
  Branches       96       99       +3     
==========================================
+ Hits          276      285       +9     
- Misses        164      166       +2     
  Partials       21       21              

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

Comment thread README.md Outdated
Comment on lines +95 to +107
#### Customizing thumbnail size

The file list thumbnail size defaults to `32px`. It is controlled by the CSS custom property
`--file-picker-preview-size` (layout and preview request resolution stay in sync).

To change it instance-wide (e.g. via theming / custom CSS), without exposing a public FilePicker API:

```css
:root {
--file-picker-preview-size: 64px;
}
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is nothing we want to be used, I would not document this here.
For consistency every app in Nextcloud should use the default.

// workaround for vue2.7 bug, can be removed with vue3
const fileListIconStyles = ref(fileListIconStylesModule)

const previewSize = getFilePickerPreviewSize()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I do not think this is needed, all of this can be done with pure CSS without the need to get the value from CSS -> JS -> CSS.

@kristian-zendato
kristian-zendato force-pushed the feat/file-picker-custom-icon-size branch from a0443ec to e3b37d1 Compare August 26, 2026 09:11
Signed-off-by: kristian-zendato <kristian.zendato@nextcloud.com>
@kristian-zendato
kristian-zendato force-pushed the feat/file-picker-custom-icon-size branch from e3b37d1 to 7f75f7c Compare August 26, 2026 09:12
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.

2 participants