NativeScript / android

NativeScript for Android using v8
https://docs.nativescript.org/guide/android-marshalling
Apache License 2.0
518 stars 136 forks source link

feat: redesigned error activity ui #1776

Closed ammarahm-ed closed 9 months ago

ammarahm-ed commented 12 months ago

A simple, clean and functional redesign of the error activity the ability to quickly restart the app without restarting the CLI. I also tried my best to prettify the stacktrace so it's more readable, any suggestions are welcome regarding it.

Most of the changes are related to layout xml files.

A screenshot of how the new ErrorActivity looks:

errorac

Compared to:

Screenshot 2023-07-13 at 7 38 27 PM

edusperoni commented 9 months ago

My only concern on this is for very long messages.

For example, if the message itself contains a lot of lines (and maybe even a stacktrace), wouldn't the top bar (red) eventually fill the whole screen?

ammarahm-ed commented 9 months ago

My only concern on this is for very long messages.

For example, if the message itself contains a lot of lines (and maybe even a stacktrace), wouldn't the top bar (red) eventually fill the whole screen?

That is possible but i think it would be rare that the message contains stack trace separately than the one that is already attached to it. The current stack trace is extracted from the long message itself. 🤔

edusperoni commented 9 months ago

Even if it is rare, we should probably consider it (maybe by limiting the top bar height and allowing scroll on it)

ammarahm-ed commented 9 months ago

Agreed, i will try adding something like that and make the top area scrollable.

ammarahm-ed commented 9 months ago

Here's what the activity looks like after latest changes:

https://github.com/NativeScript/android/assets/40239442/2ebdb40b-b23c-4e64-b66f-0fe5fd3f24ae