Skip to content

web: use build error formatting for other errors too#1670

Merged
landism merged 1 commit into
masterfrom
matt/web_errors_as_code
May 21, 2019
Merged

web: use build error formatting for other errors too#1670
landism merged 1 commit into
masterfrom
matt/web_errors_as_code

Conversation

@landism

@landism landism commented May 21, 2019

Copy link
Copy Markdown
Member

The styling for errors in ErrorPane.scss applies to <code> elements.
For most of the types of error items we can show in ErrorPanes, we put them in <p> elements and not <code> elements!
It turns out that <code> elements are generated by the AnsiLine splitting we do for build errors.
This means we get all kinds of fun things, like if a pod crashes with two log lines, we display them both and ignore the newline, so they're concatenated horizontally.

Since build errors have been styled (i.e., we actually define styles for them in the scss) and the other types haven't, I'm assuming we should make everything else match build error styling.

Note this also means I'm dropping the "Last log line" copy, because:

  1. we don't have it for build errors, and it's fine
  2. it's a lie - we don't truncate to the last line
  3. I tried changing it to "Log tail" but it felt weird to have it there with the same styling as the log itself. Given that its absence seemed fine for build errors, I figured it wasn't worth keeping.

image

@landism
landism requested review from hyu and maiamcc May 21, 2019 18:01

@maiamcc maiamcc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, tho may I see a screenshot?

Comment thread web/src/__snapshots__/ErrorPane.test.tsx.snap
@landism

landism commented May 21, 2019

Copy link
Copy Markdown
Member Author

lgtm, tho may I see a screenshot?

added to description, though really it's just exactly how build errors look already

@landism
landism merged commit 10d4798 into master May 21, 2019
@landism
landism deleted the matt/web_errors_as_code branch May 21, 2019 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants