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

Data loss if more than one line entered in a field #747

Closed
AlisterH opened this issue Jan 13, 2023 · 6 comments
Closed

Data loss if more than one line entered in a field #747

AlisterH opened this issue Jan 13, 2023 · 6 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@AlisterH
Copy link

Playing around with editing an OBS project using autographa on Windows, I found that it is easy to cause problems (loss of unsynced data, and great confusion) by pressing ENTER in any of the edit fields, or by pasting in more than one line of text. Obviously the intention is for each field to only allow a single line of text, but the implementation really should be more foolproof.

To reproduce:

  1. edit an OBS project
  2. enter more than one line of text in any of the fields except the last "A Bible story from..." one
  3. press the back button to go back to the projects list
  4. if you inspect the markdown file you will see that the multiple lines of text were saved, but
  5. click on the project to edit it again and see that only the first line of text is loaded into the edit field
  6. press the back button to go back to the projects list
  7. if you inspect the markdown file you will see that the extra lines are now gone

Now, for a much more serious problem:

  1. edit any story in an OBS project except for the first story
  2. enter more than one line of text in the last "A Bible story from..." field
  3. press the back button to go back to the projects list
  4. click on the project to edit it again and see that the entire story has been replaced by a copy of the first story

If you select the first story instead and enter multiple lines in the "A Bible story from..." field, the first story will now be empty.

I note that the "A Bible story from..." field is probably the place where people are most likely to inadvertently enter multiple lines, because the first bit of text is the same for each chapter and will probably be copied and pasted. Someone could easily end up with a trailing line break without noticing it, and lose all their work on a story.

@joelthe1
Copy link
Contributor

@AlisterH, thanks for reporting this issue. We just released v2.30 which should resolve it. Could you check and update/close this issue?

@AlisterH
Copy link
Author

It's certainly a big improvement, but the way you're handling the title field (just preventing the user from typing multiple lines) still isn't ideal - if for some reason someone copies and pastes into it they can still input multiple lines and there is still a possibility of data loss (but only of the title).

  1. Copy and paste two or more lines of text into the title field
  2. press the back button to go back to the projects list
  3. click on the project to edit it again and see that the first line is in the title field, and the second line is in a new field labelled "0".
  4. hopefully if this happens the user will then correctly copy the contents of field "0" into the title field, and not lose any data.
  5. but if there is something actually in the title field (i.e. the first line of the original text pasted in wasn't empty), and the user tries to edit it before copying the contents of field "0", then field "0" disappears (so we have data loss).

@vipinpaul vipinpaul added the documentation Improvements or additions to documentation label Jan 24, 2023
@joelthe1
Copy link
Contributor

That is true and we'll work on adding the capability. However, do you have such a use-case needing multi-line support for both text and title?

@AlisterH
Copy link
Author

AlisterH commented Jan 24, 2023

No. I didn't file the ticket to request multi-line support, I just wanted to point out that someone could paste in multiple lines without realising it, and it would result in confusion and data loss.

But for the record, it is similar to what I wanted to do. I was looking for the best way to create a reformatted and bilingual (one language above the other, on the same page) version of OBS, so I installed autographa just to see if PDFs were usually published directly from it. It looks like autographa is only used for translating and another tool is used for publishing. I will probably just use command line tools to merge the markdown files together.
Hypothetically if I was actually doing translation and was either working on a small screen or wanted an end product in two writing systems or two languages (potentially for language teaching or literacy or circulating a hard copy for review of the translation) then I can imagine it being convenient to just translate on a new line below the source language. When I was finished it would be easy to split the markdown files into separate files for each language using command line tools.

@joelthe1
Copy link
Contributor

I appreciate you trying the Autographa and raising these issues. Using the CLI is probably an easier way to achieve what you are trying to do.

When translating, we tackle the need of seeing the source text close to the translation by using the resource pane. You could add a source-language OBS file in the resource pane (to the left of the editing pane) and type in your translations while referring to it conveniently on the editing pane. Of course, this is not the only way to do it but for most parts this serves the needs of those using the application. For review, the encouragement would be to use the application itself though a combined printed version maybe desirable.

@vipinpaul
Copy link
Contributor

closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants