Skip to content

Use <pre> tag for error messages in showErrorMessage dialog #1410

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 1 commit into from
Jun 6, 2025

Conversation

ctcjab
Copy link
Contributor

@ctcjab ctcjab commented Jun 4, 2025

...to preserve line breaks and use a monospace font so e.g. pre-commit errors are readable.

Partially addresses #1407.

Screenshot 2025-06-03 at 9 07 38 PM

Copy link

github-actions bot commented Jun 4, 2025

Binder 👈 Launch a Binder on branch ctcjab/jupyterlab-git/issue-1407

@ctcjab
Copy link
Contributor Author

ctcjab commented Jun 6, 2025

Could a maintainer please approve running the required workflows for this PR?

showErrorMessage(
trans.__('Error'),
{
message: React.createElement(
Copy link
Member

Choose a reason for hiding this comment

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

Could you rename the file to notifications.tsx, add import * as React from 'react'; import and then use jsx syntax in here? I think no other file in this repo uses createElement.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for reviewing. Done in the latest revision. All CI checks have passed. Can this be merged now?

Thanks again!

...to preserve line breaks and use a monospace font so e.g. pre-commit
errors are readable.

Partially addresses jupyterlab#1407.
Copy link
Member

@krassowski krassowski left a comment

Choose a reason for hiding this comment

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

Yes, looks better than before, thank you @ctcjab!

@krassowski krassowski changed the title Use <pre> tag for error messages in showErrorMessage dialog Use <pre> tag for error messages in showErrorMessage dialog Jun 6, 2025
@krassowski krassowski merged commit 999d41b into jupyterlab:main Jun 6, 2025
9 checks passed
@ctcjab ctcjab deleted the issue-1407 branch June 8, 2025 17:19
@ctcjab
Copy link
Contributor Author

ctcjab commented Jun 8, 2025

Thanks for merging @krassowski! Would it be possible to cut a new patch release with this improvement? Looks like main is currently in a releasable state.

@krassowski
Copy link
Member

I was thinking that if #1408 becomes ready to merge soon, we could release these together (I see there is an active discussion in comments). If it does not settle in a week or so, I can cut a patch release as-is.

@jiridanek
Copy link

I believe #1408 would benefit from a 3rd opinion. I'm for whatever gets the job done. If my suggestions are getting in a way of having good solution merged, then I'm ready to take them back.

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

Successfully merging this pull request may close these issues.

3 participants