-
-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(forum): add 'Preview' support #1683
feat(forum): add 'Preview' support #1683
Conversation
There's something about this post (http://localhost/editpost.php?comment=145736) that's causing a problem in the preview. The spoiler contents aren't inside the spoiler. |
@Jamiras Want to make sure we're seeing the same thing, when I preview editing this post I am seeing content inside the spoiler. If you do Brave.Browser.mp4 |
Seems to be working fine with a production build of the frontend assets: Edit: nevermind - seems there's still an issue with how the preview renders it 🤔 The post seems to be cut off? All the shortcode/post body is sent from what i can tell but the response is not complete. |
Yes, I'm still seeing it after running luchaos has also pointed out that it is occurring on the preview site:
I'm seeing the same thing in both places. The post does appear to be truncated: |
I've made the suggested changes; I'm able to repro the issue now with the input "M&M's are great!". I'll work now to resolve. |
body: `body=${encodeURIComponent(postContent)}`, This may be the solution, with this change I'm able to see a preview of "M&M's are great!". The ampersand was a good idea, I bet it was being treated as a delimiter before. |
This PR adds preview functionality to the site forum for creating new posts, editing existing posts, and posting new replies.
Technical Implementation
loadPostPreview()
, is called which makes the new API request. This function also enables visibility of a loading indicator and guards against accidental duplicate preview submissions.Currently, this is implemented only for the forum. It is not implemented for user private messages. I was afraid of blowing up the scope of this PR any further; private messages can come next.
Forum.Post.Preview.mp4