Closed eleanorkonik closed 2 years ago
No, that would definitely be a bug in PanWriter. Which version are you using? Please make sure it's the latest one.
I had literally just downloaded it off of github for the first time yesterday, so I'm pretty sure it was the latest, but I'll double check the actual version number when I'm back at my desk. I'm on windows, if it matters.
I confirmed I'm on panwriter 0.8.1 with a fresh download from yesterday. I confirmed the behavior happened to me again when I went to add a font to it. I pasted original content of the file back over the weird YAML thing.
I went to make a gif and it worked fine 🤦
So I was like "that's weird" and opened up a new file, clicked the left mouseover button that lets you change fonts and stuff, didn't change the font and went back to the file itself. It was suddenly empty.
Based on this behavior it seems like it only happens if you go to that menu if you haven't changed anything in that file yet? Maybe panwriter thinks the file is empty because I haven't interacted with the contents yet to have them loaded?
Thanks for the excellent bug report! You were spot-on. I've pushed a commit that should fix this.
Some more testing before I make a release never hurts though... are you able/willing to try it? if so, see https://github.com/mb21/panwriter#develop
Oh gosh 😅 Yarn (?) and actually using git are over my head I'm sorry 🙈
no problem, I did a pre-release: https://github.com/mb21/panwriter/releases/tag/v0.8.2-rc.1 but I didn't have time to test at all yet...
I installed the pre-release but maybe I did it wrong because I can't get a carrot and I can't "x" out of the file anymore (or close from the bottom menu). I'm on Windows 10 for what it's worth.
Oops, yes. I'll try to take a look next week...
okay, pushed rc.2 which seems to work for me after a quick test: https://github.com/mb21/panwriter/releases/tag/v0.8.2-rc.2
rc.2 lets me change the font / yaml fine and loads now, but when I try to click the print/PDF button nothing happened until I clickd around a bunch — for some reason, once I tried out all the views, clicing print/PDF worked again. I was able to repro this by closing panwriter, opening it again, trying to print (nothing happened) then changing view from edit to split, tried to print again, and I correctly got the dialog.
hm.... can you describe the exact steps where clicking on the print button doesn't do anything? for me the following works for example:
is it reproducable? or only when you do it quickly or something?
It's consistently reproducable.
nothing happens.
I get the modal.
Being required to click split view before being able to print a file seems unintuitive to me, but maybe it's intended?
ah, of course. File -> Print
doesn't work until the preview is shown, because what it actually does it print the preview... and PanWriter isn't rendering the preview unless it's shown. So we could either:
File -> Print preview
and grey it out until preview is shown.So currently tending towards 2.)
Greying it out if it can't work makes the most sense I think!
I remember now why I didn't grey it out previously – because the information whether a preview is shown or not is not readily available in that part of the code where the menu is rendered. But I added a warning now, so that when you click it, it will at least tell you why it's not working:
To print, please open a preview view first (e.g. View -> Show Split View)
Unless there are other bugs, I'll try to make a release shortly...
I opened up a markdown file with panwriter, tried to assign a font using the file menu, and then when I went back to the file, its only content was what looked like a yaml header — my actual file content was gone.
Did I do something wrong?