Skip to content

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

Open
cristianscheid wants to merge 2 commits into
masterfrom
fix/58645/background-file-picker
Open

fix: adjust file picker for background image to allow folder navigation#61688
cristianscheid wants to merge 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

@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

Signed-off-by: Cristian Scheid <cristianscheid@gmail.com>
@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.

…ile picker

Signed-off-by: Cristian Scheid <cristianscheid@gmail.com>
@cristianscheid cristianscheid force-pushed the fix/58645/background-file-picker branch from 2763885 to 07cdbe2 Compare July 2, 2026 20:25
await expect.poll(async () => (await getBodyThemingSnapshot(page)).backgroundImage).toBe('none')
})

test('User can pick a custom background from their files', async ({ page, user }) => {

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.

Looks good but maybe annotate this regression test:

Suggested change
test('User can pick a custom background from their files', async ({ page, user }) => {
test('User can pick a custom background from their files', {
annotation: { type: 'issue', description: 'https://github.com/nextcloud/server/issues/58645' },
}, async ({ page, user }) => {

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

Status: No status

Development

Successfully merging this pull request may close these issues.

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

4 participants