Skip to content

fix(upload): remember image quality and share permission choices - #19919

Open
DevKaurav-14 wants to merge 1 commit into
nextcloud:mainfrom
DevKaurav-14:fix/19616/remember-image-quality
Open

DevKaurav-14 wants to merge 1 commit into
nextcloud:mainfrom
DevKaurav-14:fix/19616/remember-image-quality

Conversation

@DevKaurav-14

@DevKaurav-14 DevKaurav-14 commented Oct 19, 2026 •

Copy link
Copy Markdown

☑️ Resolves

AI (if applicable)

  • The content of this PR was partly or fully generated using AI
  • AI was responsible only for writing tests.

🖌️ UI Checklist

🖼️ Screenshots / Screencasts

Tested with only unit tests and had no running instance.

🚧 Tasks

  • The image-quality choice is loaded from browser storage
  • The choice is saved on every change.
  • resetCurrentUpload() no longer resets the choice.
  • Tests were added.

🏁 Checklist

  • 🌏 Tested with different browsers / clients:
    • Chromium (Chrome / Edge / Opera / Brave)
    • Firefox
    • Safari
    • Talk Desktop
    • Integrations with Files sidebar and other apps
    • Not risky to browser differences / client
  • 🖌️ Design was reviewed, approved or inspired by the design team
  • ⛑️ Tests are included or not possible
  • 📗 User documentation in https://github.com/nextcloud/documentation/tree/master/user_manual/talk has been updated or is not required

@DevKaurav-14
DevKaurav-14 marked this pull request as draft October 19, 2026 18:21
@DevKaurav-14
DevKaurav-14 marked this pull request as ready for review October 19, 2026 21:41

@Antreesy Antreesy left a comment

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

  • Even if AI was used for tests only, please disclose so with adding a git trailer to the commit: Assisted-by: MODEL:version; see examples in the commit history

Comment thread src/stores/upload.ts Outdated
Comment on lines +98 to +100
watch(skipCompression, (value) => {
BrowserStorage.setItem('skipCompression', value.toString())
})

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.

It's a bit hidden pattern, and there's only one consumer, with write operations. If you don't mind introducing a function, that would be great:

/**
 * Update the image quality choice and keep it in storage
 *
 * @param value new 'skipCompression' value
 */
function updateSkipCompression(value: boolean) {
	skipCompression.value = value
	BrowserStorage.setItem('skipCompression', value.toString())
}

And use it in src/components/NewMessage/NewMessageUploadEditor.vue

@Antreesy Antreesy Oct 21, 2026 •

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.

BTW same could be done for allowUpdate toggle next to it, since it's the same change in the same place
Let me know, if you're fine with doing the polishing of this PR, or we can take over and get it merged

@DevKaurav-14 DevKaurav-14 Oct 21, 2026 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thanks for the review! I would like to do the polishing myself.
I'll push the update shortly.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thanks, I've updated the PR:

  • Replaced the watch with updateSkipCompression() and used it in NewMessageUploadEditor.vue
  • Did the same for allowUpdate with updateAllowUpdate(). It's now remembered across uploads too, so resetCurrentUpload() no longer resets it
  • Added the Assisted-by: trailer to the commit
  • Updated the tests for both choices

One thing to check: since allowUpdate is now remembered, a user who picks "editable" once will keep granting edit permission on later uploads. Let me know if you'd prefer that one to stay per-upload and I'll revert that part.

@Antreesy Antreesy added enhancement feature: frontend 🖌️ "Web UI" client feature: upload & shares & voice 📤🎙️ Sharing files into a chat and audio recordings AI assisted This PR contains AI-assisted commits labels Oct 21, 2026
@Antreesy Antreesy added this to the ☃️ Next Major (36) milestone Oct 21, 2026
Signed-off-by: Dev Kaurav <devkaurav2025@gmail.com>
Assisted-by: ClaudeCode:claude-opus-5-5
@DevKaurav-14
DevKaurav-14 force-pushed the fix/19616/remember-image-quality branch from 3b77920 to 6c08cc3 Compare October 21, 2026 22:38
@DevKaurav-14 DevKaurav-14 changed the title fix(upload): remember image quality choice fix(upload): remember image quality and share permission choices Oct 21, 2026
@Antreesy

Copy link
Copy Markdown
Contributor

Thanks, looks good now!

a user who picks "editable" once will keep granting edit permission on later uploads

Yes, that's what we also had discussed internally yesterday, and have been indecisive about. Same for image quality - we see cases where it would also be unfavorable.
We'd like to speak about it in the team once again, so it might take longer to get it merged, if we'll agreed on that form. Alternative would be a server-stored preference, that is shared across all devices, incl. mobiles.. so implementation would grow larger than we'd like to.

I'll get in touch soon once we decide on it!

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

Labels

AI assisted This PR contains AI-assisted commits enhancement feature: frontend 🖌️ "Web UI" client feature: upload & shares & voice 📤🎙️ Sharing files into a chat and audio recordings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Option to set "Original image quality" as default setting

2 participants