Skip to content
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

Display message when no edits take place #1510

Merged
merged 1 commit into from Jun 25, 2022

Conversation

apainintheneck
Copy link
Contributor

Checklist

  • I have read the contributing doc.
  • I have included a link to the relevant issue number.
  • I have checked to ensure there aren't other open pull requests
    for the same issue.
  • I have written new tests for these changes, as needed.

This displays an error message when no edits take place after launching the editor with the jrnl --edit command.
Screen Shot 2022-06-13 at 11 36 46 AM
I tried to model the message after MsgText.NoTextReceived.

Fixes #1501

@apainintheneck
Copy link
Contributor Author

Would it be better to make this a warning instead of an error?

@micahellison
Copy link
Member

Would it be better to make this a warning instead of an error?

I think normal would actually be best -- it's basically the same level of message as "1 entry modified" is when you successfully edit an entry.

@apainintheneck
Copy link
Contributor Author

apainintheneck commented Jun 18, 2022

If that's the case, I think the no text received message should also be normal since they are similar messages. This can happen normally when submitting an empty journal entry so it's not always an error.

Currently it looks like this:
Screen Shot 2022-06-18 at 1 14 43 PM

But they both could look like this:
Screen Shot 2022-06-18 at 1 21 57 PM

Copy link
Member

@micahellison micahellison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for these changes, and for making it more consistent.

@micahellison micahellison added the bug Something isn't working label Jun 25, 2022
@micahellison micahellison merged commit ed4f8ea into jrnl-org:develop Jun 25, 2022
@apainintheneck apainintheneck deleted the no-edits-msg branch June 28, 2022 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Blank box displays when not making any changes in --edit
2 participants