Sigil-Ebook / Sigil

Sigil is a multi-platform EPUB ebook editor
GNU General Public License v3.0
5.84k stars 572 forks source link

[Bug]: Position of error message in Preview screen #753

Closed chbarnes3 closed 4 months ago

chbarnes3 commented 4 months ago

Bug Description

Not a real bug just a bit annoying. When editing html in the main screen you can view results in the Preview on the right docker. Current errors show up in a pinkish box listing the line location of the error at the top of the screen. It would really be nice if it would show up at the bottom of the screen, closer to the error itself. Some of my and I'm sure other folks pages are long and you have scroll down to see the error location. Also Is there a way to keep preview screen in sync with the main screen being edited?

Platform (OS)

Windows (Default)

OS Version / Specifics

Windows 10

What version of Sigil are you using?

2.1.0

Any backtraces or crash reports

New user and so far so good. The only crash was when I tried to use the Spell checker.
dougmassay commented 4 months ago

Why would the bottom of the screen be more convenient in long files where an error is near the top? Seems to me that would just be trading one annoyance for another.

And unless there's some major issues with the xhtml, Preview and CodeView should always stay in sync. Regardless of which you click in. That's the behavior I see. There's never going to be an exact horizontal lineup between Preview and CodeView (images and such won't allow it), but they're always pretty close in my usage.

dougmassay commented 4 months ago

Also could you provide any more details concerning the spellchecker crash you mentioned? We don't like crashes and try to get them stomped out pretty quickly. Steps to recreate it would be greatly appreciated.

BeckyDTP commented 4 months ago

Partial solution (moving the message to the bottom of the preview window)

Just create/edit a custom_preview_style.css file in the Sigil configuration folder (you can easily go there by clicking the "Open Preferences Location" button in the lower-left corner of the Preferences window).

Add/Edit:

html parsererror {position: absolute; bottom: 0; width: 84%;}

html parsererror h3, html parsererror div {white-space: normal;}

This will move the pink message to the bottom of the preview window, and additionally 'fix' the hiding of some of the messages outside the frame.

EDIT: I've done quite a few tests and it's not ideal, though, because the errors vary. Sometimes the message obscures the most important information.

It doesn't hurt to add either: html {position: relative;} however, this does not fully solve the problem.

chbarnes3 commented 4 months ago

I'm not surprised by the response from dougmassey. "I should be happy and not complain since I did not pay for it." As for synching, you said Preview and CodeView is the behavior you see. Can you even conceive that's not the case for me?

As for the spell check crash it surprised me. Didn't do anything special. Just thought after a 1000+ lines I'd try it.. Clicked on the Spell Check button and it crashed. Glad I had saved what I was doing. I will try to recreate it.

Thanks you to BeckyDTP. I was a programmer for the Air Force for twenty years before retiring. I used to respond to application users almost daily and never minded their questions and ideas. Many times it improved my work and sometimes it just wasn't possible. I appreciate you're giving me a possible way of getting an improvement in the way I am using Sigil. I tried your method and like you said it's not ideal. Guess I'll just live with it. After all it was just a question, not a game stopper.

By the way, I'm using Sigil for a series of family genealogy books that I can send to any one in the family interested with my 30 years of research.

dougmassay commented 4 months ago

"I should be happy and not complain since I did not pay for it."

Pretty sure I neither said nor implied any such thing. But you do you. Sorry I couldn't give the experience you were looking for. Feel free to reopen this issue, or create a new one, if you're able to recreate the crash consistently.

kevinhendricks commented 4 months ago

@chbarnes3, I 100% agree with @DiapDealer. That was not said or implied, but instead a bias you came in with.

Since the best position of the error message is subjective at best. Something like that is not a bug and should have been brought up in our Mobileread user forum (as explained in the README) and not here.

So we were more concerned with the crash when spellchecking and the loss of sync between CodeView and Preview. Clicking on shared text (not images) in one should sync the other to that text if there are no parser errors that prevent its display in Preview.

You provided no reproducible steps to help track down either.