Skip to content

fix: adjust file picker for background image to allow folder navigation#61688

Merged
cristianscheid merged 2 commits into
masterfrom
fix/58645/background-file-picker
Jul 3, 2026
Merged

fix: adjust file picker for background image to allow folder navigation#61688
cristianscheid merged 2 commits into
masterfrom
fix/58645/background-file-picker

Conversation

@cristianscheid

@cristianscheid cristianscheid commented Jul 1, 2026

Copy link
Copy Markdown
Member

Summary

Currently, the file picker to change user background (under settings/user/theming) does not allow to navigate folders when searching for a file. Instead, it only shows files from root directory on "All files" tab.

This happens because of setFilter((node) => node.mime.startsWith('image/')), which causes folders to be filtered out from results. This PR changes this line to use setMimeTypeFilter(['image/*']), which allows to navigate folders while mantaining the filter to only allow image selection.

Screenshots

Before After
Screenshot from 2026-07-01 07-44-10 Screenshot from 2026-07-01 07-45-57
Screenshot from 2026-07-01 07-46-06

Checklist

AI (if applicable)

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

@cristianscheid cristianscheid self-assigned this Jul 1, 2026
@cristianscheid cristianscheid requested a review from a team as a code owner July 1, 2026 10:53
@cristianscheid cristianscheid added bug 3. to review Waiting for reviews labels Jul 1, 2026
@cristianscheid cristianscheid requested review from nfebe, sorbaugh and susnux and removed request for a team July 1, 2026 10:53
@susnux

susnux commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

If possible it would be really great to have a small PlayWright test for this

@cristianscheid cristianscheid force-pushed the fix/58645/background-file-picker branch from 3fdc544 to 2763885 Compare July 2, 2026 20:14
@cristianscheid

Copy link
Copy Markdown
Member Author

@susnux @pringelmann small test added. This is the first Playwright test I wrote, would appreciate some feedback.

@cristianscheid cristianscheid force-pushed the fix/58645/background-file-picker branch from 2763885 to 07cdbe2 Compare July 2, 2026 20:25
Comment thread tests/playwright/e2e/theming/user-settings-background.spec.ts Outdated
Signed-off-by: Cristian Scheid <cristianscheid@gmail.com>
@cristianscheid cristianscheid force-pushed the fix/58645/background-file-picker branch from 07cdbe2 to 44dfb36 Compare July 3, 2026 12:01
@cristianscheid

Copy link
Copy Markdown
Member Author

/compile amend/

…ile picker

Signed-off-by: Cristian Scheid <cristianscheid@gmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@nextcloud-command nextcloud-command force-pushed the fix/58645/background-file-picker branch from 44dfb36 to 1f1928d Compare July 3, 2026 14:57
@cristianscheid cristianscheid merged commit d596553 into master Jul 3, 2026
215 of 226 checks passed
@cristianscheid cristianscheid deleted the fix/58645/background-file-picker branch July 3, 2026 16:43
@cristianscheid

Copy link
Copy Markdown
Member Author

@susnux should we backport this down to stable32?

@susnux

susnux commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

/backport to stable34

@susnux

susnux commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

/backport to stable33

@susnux

susnux commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

/backport to stable32

@backportbot

backportbot Bot commented Jul 7, 2026

Copy link
Copy Markdown

The backport to stable32 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable32
git pull origin stable32

# Create the new backport branch
git checkout -b backport/61688/stable32

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 15c336f4 1f1928df

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/61688/stable32

Error: Failed to check for changes with origin/stable32: No changes found in backport branch


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@cristianscheid

Copy link
Copy Markdown
Member Author

The backport to stable32 failed. Please do this backport manually.

backport to stable32 is not needed, as setMimeTypeFilter() was already being used:
https://github.com/nextcloud/server/blob/stable32/apps/theming/src/components/BackgroundSettings.vue#L242

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 bug

Projects

Development

Successfully merging this pull request may close these issues.

[Bug]: Can't put custom wallpaper / background from personal space

4 participants