-
Notifications
You must be signed in to change notification settings - Fork 519
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
GTK: crash reports notice #4387
base: main
Are you sure you want to change the base?
GTK: crash reports notice #4387
Conversation
682c088
to
fc24bcb
Compare
This looks pretty good to me. I'd like @jcollie or @tristan957 to review this. We're now disabling Sentry by default on Linux because its not providing useful information yet, but having this in for when its enabled would be good. |
I don't like that we seem to be controlling the line break. I'd rather let GTK/Pango handle that, so the text can just flow as needed. |
I tried that out and it doesn't look very good, plus it takes up a lot more vertical space because it's not packed very well. Unless we get fancier with the layout I think it's a good compromise. |
Fwiw on the macOS we manually control line breaking all over to be more aesthetically pleasing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code also needs to have zig fmt
run against it. I've made a few comments, but otherwise is looking good. prettier
also needs to be run to format the .css
files.
src/apprt/gtk/Window.zig
Outdated
self.app.core_app.alloc, | ||
\\ There are existing crash reports located at <a href="file://{s}">{s}</a>. | ||
\\ If possible, <a href="https://github.com/ghostty-org/ghostty?tab=readme-ov-file#crash-reports">report them to the developers</a> to help improve the application. | ||
, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's wonderful that clicking the links takes you someplace useful. I was thinking that we'd immediately be inundated with requests to get some kind of GUI to manage crash reports (and we may still need that eventually) but clicking the link brings up Gnome's file manager with the crash reports directory so it's pretty easy for users to manage their crash reports.
- extract the banner code into separate function - introduce a global variable used to check if the banner was dismissed - format code
b0ba5ab
to
d58458a
Compare
Hey @jcollie, just following up on this PR - I've addressed the requested changes and resolved the conflicts, I would appreciate a re-review. |
This pr implements the GUI notice informing about existing crash reports in the GTK application, and partially resolves #2183.
As proposed in #2183 (comment) I implemented a banner similiar to the debug mode notice.
The message embeds clickable links leading to the reports directory and reporting instructions.
gtk-adwaita=true
:gtk-adwaita=false
: