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
Fix Unable to Preview a Reply for a Comment Before Publishing it #20394
Fix Unable to Preview a Reply for a Comment Before Publishing it #20394
Conversation
Thank you for opening this PR! We appreciate you! For all pull requests coming from third-party forks we will need to A Forem Team member will review this contribution and get back to |
I do not know if this was the better approach because we lost a (simple) test |
Uffizzi Ephemeral Environment Deploying☁️ https://app.uffizzi.com/github.com/forem/forem/pull/20394 ⚙️ Updating now by workflow run 9031305757. What is Uffizzi? Learn more! |
…-comment-before-publishing-it-20389
…-comment-before-publishing-it-20389
…-comment-before-publishing-it-20389
…-comment-before-publishing-it-20389
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR. I think what you got here is too drastic of a change. The problem is that when we migrated legacy JS (JS within assets) off to bundler JS (app/java scripts), we lost the implied global function assignment. What I'm suggesting as a solution instead is to add
window.handleCommentPreview = handleCommentPreview;
onto line 67 of app/assets/javascripts/initializers/initializeCommentsPage.js.erb
That will resolve this issue with mininal change. what do you think?
I would say you @maestromac should open a PR with the simple change you request, mention this PR and see how things evolve. Asking someone who wrote things 6 months ago to change everything to only keep 1 line of code that is not his one sounds like strange to me. Because then, if it doesn't work, reviewer may come after him to request changes, while it would be consequence of following your guidance. My 2 cents, @joaoGabriel55 could do whatever he wants of course |
And yes, I would love this painful bug to be fixed! |
…-comment-before-publishing-it-20389
…-comment-before-publishing-it-20389
What type of PR is this? (check all applicable)
Description
I can't preview a comment that I wrote before publishing it. There is nothing happen when I click the button.
Related Tickets & Documents
QA Instructions, Screenshots, Recordings
UI accessibility checklist
If your PR includes UI changes, please utilize this checklist:
Critical
andSerious
issues?For more info, check out the
Forem Accessibility Docs.
Added/updated tests?
We encourage you to keep the code coverage percentage at 80% and above.
have not been included
[optional] Are there any post deployment tasks we need to perform?
[optional] What gif best describes this PR or how it makes you feel?