Skip to content

Improve the style for developer exception page #55042

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

Merged
merged 4 commits into from
Apr 13, 2024

Conversation

ElderJames
Copy link
Contributor

@ElderJames ElderJames commented Apr 10, 2024

Improve the style for developer exception page

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.

Summary of the changes (Less than 80 chars)

Just changed the word breaking style and font size to 10% larger.

Description

before:
image

after:
image

Fixes #54894 Fixes #54896

@ghost ghost added the area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlewares label Apr 10, 2024
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Apr 10, 2024
Copy link
Member

@amcasey amcasey left a comment

Choose a reason for hiding this comment

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

Thanks, @ElderJames! LGTM, but let's give @JamesNK a chance to comment, since he filed the issues.

@JamesNK
Copy link
Member

JamesNK commented Apr 12, 2024

I tested it out and pushed some changes to your branch.

  • I didn't notice any change in font size from 1em. As far as I know it shouldn't have any impact as it's not making a change to the current font size. I don't know why you saw a difference. All the generated ASP.NET Core pages have font-size: .813em; on the body. It scales everything on the page. I'm not sure why that value was chosen. If we change something, it should probably be that value. I say lets leave font size alone for now.
  • I changed word break from break-all to break-word. This prevents from breaking inside a word while still forcing a break if required to avoid horizontal scroll bar. IMO this is a bit better as real worlds won't wrap halfway through. Base64 cookie values are uneven though, but I don't think we can get everything.
  • I added a min-width on the first column while playing around. This makes content appear a bit more evenly and stops the name column becoming very small if there is a large value and names all have hyphens.
  • The Razor compile needs to be run to get the updated CSS into the pages. I did that. How were you testing locally?

@ElderJames What do you think?

@JamesNK
Copy link
Member

JamesNK commented Apr 12, 2024

After:

image

image

@ElderJames
Copy link
Contributor Author

ElderJames commented Apr 12, 2024

@JamesNK It looks better. You reminded me that I should change the font size of td to 1.1 em.

Copy link
Member

@amcasey amcasey left a comment

Choose a reason for hiding this comment

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

I'm fine either way.

@JamesNK
Copy link
Member

JamesNK commented Apr 13, 2024

As I said before, just changing the css file isn't enough. The css file is embedded in the developer exception page by the Razor compiler, and that happens at dev time. For future reference: https://github.com/dotnet/aspnetcore/tree/main/src/Middleware/Diagnostics/src#aspnet-core-diagnostics

I made some more changes:

  • Increased font-size to 1.1em for all of the table (td and th) as well as some other UI
  • Improved wrapping on the stacktrace page
  • Ran Razor compiler

developer-exception-page

I think this is good to merge.

@JamesNK JamesNK added the blog-candidate Consider mentioning this in the release blog post label Apr 13, 2024
@ElderJames
Copy link
Contributor Author

@JamesNK Thank you for figure out the razor compilation, I didn't know it before.

@JamesNK JamesNK enabled auto-merge (squash) April 13, 2024 03:27
@JamesNK JamesNK merged commit bccb0db into dotnet:main Apr 13, 2024
@dotnet-policy-service dotnet-policy-service bot added this to the 9.0-preview4 milestone Apr 13, 2024
@JamesNK
Copy link
Member

JamesNK commented Apr 13, 2024

Merged. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlewares blog-candidate Consider mentioning this in the release blog post community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Embiggen ASP.NET Core development exception page text Improve wrapping of values on ASP.NET Core development exception page
4 participants