You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's a fair cop. The current design is, when a user submits an edit, the
server sends the newly rendered updated post content to the user who just
made the edit, and then the controls around it are manually updated if
necessary by frontend JavaScript, except there are a couple of things that
that misses at the moment. Modifying the post controls with frontend code
is messy and liable to break upon small changes to said post controls, so
my proposed solution would be to factor code out of the /showposts route in
viewingSweet.js to create a renderPostAndContainerHtml function, then use
that function to render the whole post, controls and all, both in the
/showposts route where that code is currently and in the /saveedits route
in postingToSweet.js, to send to the editing client after the edit is saved.
Yeah, barring a rewrite with a pure-functional render framework (such as React/Redux, though I personally am a Vue advocate), which is Too Big to be Justified at this point, heavier use of a partials-pattern, like you describe, is the best route, I think.
Specifically, the "boost" button remains hidden/shown per the previous visibility.
Perhaps related to #24?
The text was updated successfully, but these errors were encountered: