Open noi5e opened 3 years ago
I'm back!
Starting to add system tests ensure that basic functionality for React comments exists. See #9665, which tests posting comments, and comment replies.
An added benefit of system tests for React comments is that we can use test runtime as a rough measure of whether or not React comments are faster than the Rails comment system.
React:
Rails:
A difference of .707 seconds, or 3% faster!
This is awesome. Thanks @noi5e !!!
Opened PR for editing comments.
Here's the new speed breakdown for all 3 new tests:
React:
Rails:
10% speed difference this time! I guess it can vary a lot depending on many factors, including whether or not processes are slowing down Terminal on my computer.
The first phase of the React rewrite of the Comment/Legacy System was merged in #9176. Discussion in #9175. Yay! 🥳
To anyone who wants to see the React system in production, visit any research note, and add the following parameter to the end of the URL:
?react=true
I'm going to do a lot of follow-up work (in multiple PRs) in the next two weeks to try to get it as close to the fully functioning system as possible.
Including:
To-Do List
(last edited Moday April 18th)get_initial_react_props
method from the controller to theComment
modeldocument.load
a spinner; AJAX request afterward for initial propsREACT_COMMENTS.md
error doesn't occurDone
textAreaValues
andcommentFormsVisibility
/login
instead of the main comment form(This issue is part of the larger Comment Editor Overhaul Project with Outreachy. Refer to Planning Issue #9069 for more context)