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

Improve log modal styles, a11y, error message wording #1369

Merged
merged 3 commits into from May 16, 2024

Conversation

ironnysh
Copy link
Collaborator

@ironnysh ironnysh commented May 8, 2024

What is this PR doing?

  • Removes the tabs from log messages
  • Adds a separation line between log messages
  • Modifies the CORS log message (copy polishes)
  • Replaces the title attribute with an aria-label (accessibility)

What problem is it solving?

  • Remove the tabs from those and other log messages in Playground
  • Add a grey line between log messages to make it easier to distinguish between different entries

See #1356

Fixes the inaccessible Search field.

How is the problem addressed?

  • Updated the styles in the CSS file.
  • Edited the error message in resources.ts
  • Updated the component code in index.tsx

To-do

  • Maybe add a slight red background for severity error

@bgrgicak, How are severity levels determined?

Copy link
Collaborator

@bgrgicak bgrgicak left a comment

Choose a reason for hiding this comment

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

Thank you! This looks much better.

@bgrgicak
Copy link
Collaborator

bgrgicak commented May 9, 2024

@bgrgicak, How are severity levels determined?

It's all stored as raw strings in the logger. We initially wanted to use objects, but because PHP logs were raw strings we decided to not parse PHP logs into our format and keep everything raw. Longterm it would be nice to use the OpenTelemetry standard.

The easiest way to get the severity level would be by using a regex to determine the level. A variation of this regex could work here.
Here is how the messages are constructed.

@ironnysh
Copy link
Collaborator Author

Thanks for the explanation and the references, @bgrgicak!

I've put together a much less sophisticated solution here :-) What do you think?

Feel free to reject it, of course

As @bgrgicak mentioned, “PHP errors start with Fatal, so it would be nice to include it as an option.”

Co-authored-by: Bero <berislav.grgicak@gmail.com>
@bgrgicak
Copy link
Collaborator

Thank you for working on this @ironnysh!

@bgrgicak bgrgicak merged commit d72387c into trunk May 16, 2024
5 checks passed
@bgrgicak bgrgicak deleted the improve-log-modal branch May 16, 2024 04:25
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.

None yet

2 participants