-
Notifications
You must be signed in to change notification settings - Fork 553
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
Remove print state and call print directly #1872
Remove print state and call print directly #1872
Conversation
Actually we need not overcomplicate this: in testing in if ('printNote' === command.action) {
return window.print();
} |
In my testing the behavior is the same before and after. It's possible that the same timing issues we ran into in this PR were already present in |
I think removing the functionality and giving the user more choice is better all around! |
The code that is being removed by this PR tried to switch the mode to markdown before printing. That code is broken. This PR removes it. |
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.
Sweet - less code and no loss and one race condition eliminated!
This PR calls the print function directly from app.tsx rather than setting up state. By not having to set editor/preview mode we decrease the complexity of this functionality while giving the user the option to print the editor view OR the markdown styled mode. Before this change, the print function was intended to only print the formatted markdown mode but the functionality is broken. This PR removes the broken code.
Remove print state and call print directly (#1872) This PR calls the print function directly from app.tsx rather than setting up state. By not having to set editor/preview mode we decrease the complexity of this functionality while giving the user the option to print the editor view OR the markdown styled mode. Before this change, the print function was intended to only print the formatted markdown mode but the functionality is broken. This PR removes the broken code.
Remove print state and call print directly (#1872) This PR calls the print function directly from app.tsx rather than setting up state. By not having to set editor/preview mode we decrease the complexity of this functionality while giving the user the option to print the editor view OR the markdown styled mode. Before this change, the print function was intended to only print the formatted markdown mode but the functionality is broken. This PR removes the broken code.
Fix
This PR calls the print function directly from app.tsx rather than setting up state. By not having to set editor/preview mode we decrease the complexity of this functionality while giving the user the option to print the editor view OR the markdown styled mode.
Before this change, the print function was intended to only print the formatted markdown mode but the functionality is broken. This PR removes the broken code.
Test
Review
Only one developer is required to review these changes, but anyone can perform the review.