post_status_form: enable sync flush for watcher #414
No reviewers
Labels
No labels
a11y
Bug
Bug fix
Critical Priority
Documentation
Feature
Feature request
Held for next release cycle
High Priority
Low Priority
Medium Priority
Minor change
Translation/Locale
WIP
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: AkkomaGang/akkoma-fe#414
Loading…
Reference in a new issue
No description provided.
Delete branch "novenary/akkoma-fe:sticky-drafts"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This fixes drafts not clearing after posting a reply.
Vue 3.3.11 changed watchers to stop firing after component unmount.
After posting a reply, the post form is removed, now causing the queued event to be discarded.
Synchronous flush causes the handler to be called immediately when changes happen, solving the problem.
See: https://github.com/vuejs/core/pull/7181
See:
80e2128d52
Fixes:
a7dea2f70f
Fixes: #413
Can confirm the issue and that this fix works.
Vue doc’s warning about perf implications warrants some attention though. Iirc you already tested individual keystrokes never got batched to begin with off-site, but how does
flush: "sync"
affect performance of pasted text compared to before the dep upgrade? Is there still only one update for the watcher to process, did it already trigger one update per character before, or does the event count explode with this? If all is fine, ideally document the findings in the commit messageAs far as I can tell, pasting is atomic (produces a single event) which makes intuitive sense to me.
13383982bc
toef242a1ddd
Updated the commit message accordingly. I think it wouldn't be a bad idea to add debouncing.
seems all good then; thanks for tracking this down!
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.