-
Notifications
You must be signed in to change notification settings - Fork 19
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
make the log output faster, and add colors too #832
Conversation
253cc41
to
c1dbaef
Compare
c1dbaef
to
66a89ef
Compare
demo.movSounds good. I spruced up the style a little more:
|
The code changes seem pretty uncontroversial. Will let @yezr accept. |
That was the cause of the GUI lag that has existed outside of this PR, but wasn't as noticeable until the new GUI's loading bar. @tarheel there is a small final commit on this PR that fixes it -- it's important to get this right to avoid race conditions where the log output never updates. It's the first and only use of a |
import java.util.Date; | ||
import java.util.List; | ||
import java.util.concurrent.BlockingDeque; |
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.
unused? otherwise this seems fine to me!
nit: can we make the highlight apply only to the text instead of the entire line? In that example video when all of the visible lines have a background there is no contrast with the regular background so it maybe looks like the background is usually that color? Everything else looks great! The quality of life stuff like right click copy is 🔥 |
Happy to make that change! Just want to flag something first: That's how it used to look here, but in almost all cases with an error, the error is only one In light of this reasoning, can you let me know if you still prefer it with only the text background highlighted? Happy to share side-by-side screenshots, it's only one line of code difference between the two options. |
Thanks for the context Armin. Let's keep the full line highlighting. |
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.
looks good to me!
* make the log output faster, and add colors too * spruce up the style * Issue 830: prevent lagging * remove unused import * re-enable and fix word wrap * better warning color --------- Co-authored-by: Armin Samii <[email protected]>
* new GUI modal: tabulation confirmation page * open in finder after tabulation; handle new file creation * handle edge casess: trim CSV ranking, handle moved config file * handle tabulation success/failure/in-progress states * lint * exclude spotbugs error * UI updates * three-step gui tabulation * don't allow change in ballot stats between loading and tabulating * gui improvements / timing * style updates * make the log output faster, and add colors too (#832) * make the log output faster, and add colors too * spruce up the style * Issue 830: prevent lagging * remove unused import * re-enable and fix word wrap * better warning color --------- Co-authored-by: Armin Samii <[email protected]> * comma-separate large number of ballots * Fixes unreliable usage of `.isEmpty()` for Strings in favor of `.isBlank()`; removes "please" from user comms per Google style; addresses nits, minor refactoring, and other clean-up. * address PR comments * only pop up tabulate window if validation passes * Update error message, other PR comments * Fixes bug with `buttonOpenResultsClicked` not opening window to correct location in Windows; fit and finish. * address PR comments * delete temp file on Tabulate Window close * Nits. * PR updates --------- Co-authored-by: Armin Samii <[email protected]> Co-authored-by: HEdingfield <[email protected]>
Closes #831
Closes #830
The issue was that appending to the textarea used string concatenation, which required reading the entire log string and recreating it each time a new log message was added. That made each subsequent GUI run slower, and also explains why we didn't see this in the unit tests: it's only a GUI issue. It also caused the GUI to hang for a short bit of time each time a log message was added.
I replaced the TextArea with a ListView. This makes it trivial to do something that I've wanted for a while: colors for log levels. I can change the foreground or background color. I would appreciate feedback on how this looks:
Screenshot: