Repository navigation
fix(upload): remember image quality and share permission choices - #19919
DevKaurav-14 wants to merge 1 commit into
Conversation
Antreesy
left a comment
There was a problem hiding this comment.
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
| watch(skipCompression, (value) => { | ||
| BrowserStorage.setItem('skipCompression', value.toString()) | ||
| }) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Thanks for the review! I would like to do the polishing myself.
I'll push the update shortly.
There was a problem hiding this comment.
Thanks, I've updated the PR:
- Replaced the
watchwithupdateSkipCompression()and used it inNewMessageUploadEditor.vue - Did the same for
allowUpdatewithupdateAllowUpdate(). It's now remembered across uploads too, soresetCurrentUpload()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.
Signed-off-by: Dev Kaurav <devkaurav2025@gmail.com> Assisted-by: ClaudeCode:claude-opus-5-5
3b77920 to
6c08cc3
Compare
|
Thanks, looks good now!
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. I'll get in touch soon once we decide on it! |
☑️ Resolves
AI (if applicable)
🖌️ UI Checklist
🖼️ Screenshots / Screencasts
Tested with only unit tests and had no running instance.
🚧 Tasks
resetCurrentUpload()no longer resets the choice.🏁 Checklist