Skip to content
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

Better error page design #6

Closed
rstacruz opened this issue Dec 9, 2012 · 36 comments
Closed

Better error page design #6

rstacruz opened this issue Dec 9, 2012 · 36 comments

Comments

@rstacruz
Copy link
Collaborator

rstacruz commented Dec 9, 2012

Would you like a better one? I can hack a nice-looking error page in a quick jiff.

Love your work on this gem by the way!

@haileys
Copy link
Collaborator

haileys commented Dec 9, 2012

As you can probably tell, I'm not much of a designer!

If you'd like to try and spiffy up the better_errors error page, I'd really appreciate it.

However, please keep all styles and javascript inline. Please try and avoid images, but if you must use them, please inline them with base64.

Cheers.

@rstacruz
Copy link
Collaborator Author

rstacruz commented Dec 9, 2012

Sure! let me see what I can do.

@andrew
Copy link

andrew commented Dec 9, 2012

👍

@rstacruz
Copy link
Collaborator Author

rstacruz commented Dec 9, 2012

I'm trying to figure out a better layout. Right now, here's where I'm at—not exactly pretty yet, but I'm more of trying to get the "wireframe" properly layed out right first. Thinking of making the backtrace section have their own scrollbars—saves you effort in scrolling back and forth!

Changes to the markup are pretty minimal.

errors-1.png

@haileys
Copy link
Collaborator

haileys commented Dec 9, 2012

Looks pretty nice! The layout is fluid right?

@neilmiddleton
Copy link

Works for me, although I would left align the error at the top rather than center as that's where the eye immediately looks.

@deanpcmad
Copy link

That looks great @rstacruz 😄

@jeromegn
Copy link

jeromegn commented Dec 9, 2012

@rstacruz Here are my 2 cents: Looks awesome :) ... but, this page should first and foremost be giving out the details efficiently. Your design is visually pleasing but it takes up too much space. Sometimes the window might be small and it would be painful not to see much of the stack because of the huge amount of whitespace around the error description up top.

I don't know that we need the padding around the content either. If we do (for looks) then maybe shrink it a bit?

In any case, great work :)

@shuma
Copy link

shuma commented Dec 9, 2012

That looks great, when are you going to implement that? =)

@excid3
Copy link

excid3 commented Dec 9, 2012

👍

@rstacruz
Copy link
Collaborator Author

rstacruz commented Dec 9, 2012

@shuma You can see it on my fork of better_errors. You may have to go back a few commits though: I've made a lot of changes since.

Looks like I'll need to go back to the drawing board on this one though :\

@rstacruz
Copy link
Collaborator Author

rstacruz commented Dec 9, 2012

Hm, I think I want to go with a more minimal approach like this.

To accomplish this:

  1. Stack traces will be hidden by default to give way to the most important thing here: the code and the REPL shell.
  2. the default code shown will be the first application trace (currently, better_errors picks the first trace, whether it be an application trace or gem/framework trace).
  3. there will be a mini-stack trace preview showing the application stack trace (not shown yet). clicking it will show the full stack trace in a sidebar.

skitched-20121210-015603.png

Not sure on this approach, but after using the prototypes of the previous designs for a while, they did infact feel cumbersome (hi @jeromegn! you're totally right!), I find myself always wanting the top application stacktrace anyway so I figured it'd be best to showcase that better.

Personally, I love the combined box of a code preview + REPL + line location—very convenient since 80% of the time, it's what I'll be digging for anyway.

@rstacruz
Copy link
Collaborator Author

rstacruz commented Dec 9, 2012

Here are other prototypes I've tried. I've tried a lot (heh), but haven't been able to take enough screenshots along the progress:

  • Another early iteration
  • Boxed content area — the previous designs felt too heavy and I tried to figure out ways to make them feel lighter.
  • 'Lighter' feel without boxes — I figured that the box around the content area just feels like clutter, and it's much more compact without it.
  • Full-sized sidebar — this is where I realized that showing stack traces will always feel 'heavy', no matter what. I tried smaller variations, they felt even sillier.

@shuma
Copy link

shuma commented Dec 9, 2012

@rstacruz I really like the one with two boxes. It feels simpler. Great job mate!

@gabrielecirulli
Copy link

I love it! Awesome work so far!
Just a suggestion, have you thought about a horizontal stack trace?

Here's a quick mockup of what I had in mind:

Horizontal stack trace

The red dot is the selected stack frame (which by default would be the first of the application, like yours). If you hover your mouse over the other dots the text slides around and changes to the information of the other stack frames.
I think it would require less space and if you made it possible to scroll around horizontally it could give you quick access to stack frame without really taking up much space.

Just my 2 cents, let me know what you think 😄

@haileys
Copy link
Collaborator

haileys commented Dec 9, 2012

@rstacruz I like the most recent iteration, but I do feel that the stack trace should remain prominent.

@jeremyw
Copy link

jeremyw commented Dec 10, 2012

I agree @charliesome -- I think the stack trace is much more important than the variables.

@negativetwelve
Copy link

I was just going to fix the lack of word-wrapping in the variables area but it looks like that is irrelevant if you guys are planning on redoing the whole design.

@rstacruz
Copy link
Collaborator Author

@gabrielecirulli I think it's too simplistic. A common use case I run into is scanning through the stack trace and seeing which ones are from controllers, and that is pretty inconvenient to do with something like that.

@negativetwelve Go ahead! There's no guarantee this will be completed properly or accepted in the end, this is still just a proposal; at least, it's going to be!

@rebyn
Copy link

rebyn commented Dec 10, 2012

This is pure awesome. +1

@rstacruz
Copy link
Collaborator Author

Just curious: how would you guys feel about a single-column mode?

(it should be possible to make a 1column/2column toggle later on.)

skitched-20121210-152438.png

@9mm
Copy link

9mm commented Dec 10, 2012

my .02 cents:

  1. I use the params hash a lot, it would be sweet to have that not buried at the bottom (at the top wouldnt be necessary, but just not last?
  2. I noticed the page would sometimes break for every long lines, and there's no way to scroll. Perhaps set some word-wrap

@9mm
Copy link

9mm commented Dec 10, 2012

And I definitely would say 2 columns > 1, that way if you don't need one column you can get to the other without scrolling.

@ream88
Copy link

ream88 commented Dec 10, 2012

What about a responsive layout? On my 13" screen a 1 column layout would be super nice, but on my 27" lots of space is wasted I think.

And yes, show me the params hash! Definitely!

@fredwu
Copy link
Contributor

fredwu commented Dec 10, 2012

These are top notch designs, awesome work @rstacruz! I agree with @jeromegn though - white spaces need to be reduced for more condensed content - especially the stack traces. A "busy" layout in this case would work since we care much more about the actual content than the containers and their visual. :) But yeah, I love the overall feel of the designs.

@rstacruz
Copy link
Collaborator Author

What's up? Here's what I've settled into for now: This is a responsive (:smile_cat:!) layout I've put together. I pretty much like it a lot: it has the application-by-default thing I was talking about, the REPL+code+location is still quite prominent and in charge, and it can do both single- and double-column modes. Not to mention that it doesn't look too shabby.

skitched-20121211-013252.png

The threshold is at 1100px browser width, so it's enough to look okay on a 13" laptop maximized, but it reflows once it's a little skinnier.

skitched-20121211-013332.png

Application frames in the backtrace are highlighted, so you can easily glance to see which one's from the framework and which one's your own code:

skitched-20121210-235412.png

This thing is solid -- it wordwraps at the right places and is quite optimized to the best I can right now.

I'd love to work more on the styling though, I'm not convinced all that black is the way to go... but as far as layout, this is pretty much the culmination of everthing I learned from all those iterations I prototyped.

Check it out for now with:

gem "better_errors", github: "rstacruz/better_errors", branch: "redesign"

@deanpcmad
Copy link

This looks great! Maybe Rails 4 could merge this plugin :)

On 10 Dec 2012, at 15:50, "Rico Sta. Cruz" notifications@github.com wrote:

What's up? Here's what I've settled into for now: This is a responsive (!) layout I've put together. I pretty much like it a lot: it has the application-by-default thing I was talking about, and it can do both single- and double-column modes. Not to mention that it doesn't look too shabby.

This thing is solid -- it wordwraps at the right places and is quite optimized to the best I can right now.

I'd love to work more on the styling though, I'm not convinced all that black is the way to go... but as far as layout, this is pretty much the culmination of everthing I learned from all those iterations I prototyped.

Check it out for now with:

gem "better_errors", github: "rstacruz/better_errors", branch: "redesign"

Reply to this email directly or view it on GitHub.

@neilmiddleton
Copy link

👍

@rstacruz
Copy link
Collaborator Author

Please don't mind the "referenced this issue" messages—I'm syncing from upstream, so when I pull-rebase from upstream, that shows up... grr.

@charliesome You may take note that indentation isn't taken care off properly in the HTML, this is intentional: I've stayed away from re-indenting existing code so you can study the diffs better.

Also, I think .repl should have a click handler that does $('.repl input').focus() so you can click anywhere in the REPL area to start typing. :)

@rking
Copy link
Contributor

rking commented Dec 10, 2012

@rstacruz - Redesign looks interesting, but a) it's not rendering quite right for me on Firefox (the left and right columns overlap), but b) I want to strongly add my support for a 1-column design

Each frame should just have an expandable section that shows locals and the REPL. Side-by-side is an utter waste of space IMO

@rstacruz
Copy link
Collaborator Author

@rking Try again (bundle install), I've just pushed some Gecko compatibility fixes.

Expandable accordion-style stack traces seem like a good idea, but (1) it requires a big refactor of the JavaScript, and (2) I predict that it will become very cumbersome quickly.

@rstacruz rstacruz mentioned this issue Dec 10, 2012
@rking
Copy link
Contributor

rking commented Dec 11, 2012

@rstacruz - Just checked it out. It definitely renders better, but there's a usability issue with large var dumps. Before, it was a big side-scrolley occasion, but there was a scrollbar. Now you just see truncated text and the only way (on Webkit and Gecko) to get to the information is to highlight and drag.

@rstacruz
Copy link
Collaborator Author

Hmm. This is how unreasonably-large vardumps are supposed to look like: notice how it wraps nicely (it should also respect newlines, too). How does it look like on your end?

image

rstacruz added a commit to rstacruz/better_errors that referenced this issue Dec 11, 2012
@rking
Copy link
Contributor

rking commented Dec 11, 2012

@rstacruz - Yep, the large dumps are usable in the latest master here at charliesome/better_errors

@shime
Copy link
Contributor

shime commented Dec 14, 2012

Great work, @rstacruz. Thanks man!

@kossnocorp
Copy link

@rstacruz thanks for that! Btw is it possible to override layout?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests