johannesjo / super-productivity

Super Productivity is an advanced todo list app with integrated Timeboxing and time tracking capabilities. It also comes with integrations for Jira, Gitlab, GitHub and Open Project.
http://super-productivity.com
MIT License
8.68k stars 753 forks source link

Quit Confirmation is unreadable #3034

Open rzelnik opened 4 months ago

rzelnik commented 4 months ago

Your Environment

Expected Behavior

Quit Confirmation modal window text should be readable.

Current Behavior

I see some strange squares instead of text.

Steps to Reproduce (for bugs)

  1. Click "window close" button
  2. Quit Confirmation dialog appears

Can you reproduce this reliably?

The broken confirmation modal appears every time I quit the app and with any language in language settings.

Error Log (Desktop only)

I didn't find any fresh log entries, just some old ones in ~/snap/superproductivity/current/.config/superProductivity/log/main.log

[2023-11-18 12:23:49.672] [info] close, isQuiting: undefined [2023-11-18 12:23:49.674] [info] Actions to wait for [ 'FINISH_DAY_BEFORE_CLOSE_EFFECT' ] [2023-11-18 12:23:49.675] [info] BEFORE_CLOSE_DONE FINISH_DAY_BEFORE_CLOSE_EFFECT [] [2023-11-18 12:23:49.676] [info] close, isQuiting: undefined [2023-11-18 12:23:49.677] [info] close, isQuiting: true [2023-11-18 12:23:49.686] [info] Quit after all windows being closed

Screenshot

screenshot

github-actions[bot] commented 4 months ago

Thank you very much for opening up this issue! I am currently a bit overwhelmed by the many requests that arrive each week, so please forgive me, if I fail to respond personally. I am still very likely to at least skim read your request and I'll probably try to fix all (real) bugs if possible and I will likely review every single PR being made (please, give me a heads up if you intent to do so) and I will try to work on popular requests (please upvote via thumbs up on the original issue) whenever possible, but trying to respond to every single issue over the last years has been kind of draining and I need to adjust my approach for this project to remain fun for me and to make any progress with actually coding new stuff. Thanks for your understanding!

github-actions[bot] commented 4 months ago

Hello there rzelnik! πŸ‘‹

Thank you and congratulations πŸŽ‰ for opening your very first issue in this project! πŸ’–

In case you want to claim this issue, please comment down below! We will try to get back to you as soon as we can. πŸ‘€

For more open ended discussions and/or specific questions, please visit the discussions page. πŸ’–

johannesjo commented 4 months ago

I am unable to reproduce this unfortunately.

rzelnik commented 4 months ago

Ok, I will try to debug this locally.

johannesjo commented 4 months ago

Thank you! If there is a way to fix this on our end, it's likely related to electron.

rzelnik commented 4 months ago

I already have local dev environment running. Is there any way how to activate the quit confirmation modal window? I have "Confirm before exiting the app without finishing day first" turned on, I have unfinished tasks in today's list, but the confirmation modal doesn't appear. Sorry for dumb questions, but I am not skilled in node.js/electron development. I just discovered that the app quits in electron/main-window.ts line 252: _quitApp(); (with ids.length == 0).

johannesjo commented 4 months ago

Thank you very much for digging into this! You're right! Currently this doesn't seem to work properly. It's a bit complicated, but to me it seems that the dialog is triggered (unreliably) from the browser frontend via the beforeunload event: src/app/app.component.ts

(sorry haven't read the code in a long while :))

A better and more reliable way to do this might be using electrons BrowserWindow's close event (https://stackoverflow.com/questions/45827709/confirm-beforeunload-in-electron). It's a bit complicated by the translations, since we usually do those in the browser thread and not the electron thread, but we could use the approach and then communicate over the IPC channels to notify the frontend to display a confirmation dialog and then communicate back via IPC.SHUTDOWN_NOW.

droumanet commented 3 months ago

Thanks for the great job, I was thinking my Linux system wasn't configured correctly. Hope this could be corrected in the future.