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

[Papercut] Fix KQL parsing error text styling #199985

Conversation

kowalczyk-krzysztof
Copy link
Member

@kowalczyk-krzysztof kowalczyk-krzysztof commented Nov 13, 2024

Summary

This PR fixes styling for KQL parsing error text on various elements on Maps and Dashboard to have the invalid syntax and ASCII arrow on new line.

Closes: #49377

dashboard1
dashboard2
dashboard3
maps

@kowalczyk-krzysztof kowalczyk-krzysztof added bug Fixes for quality problems that affect the customer experience Feature:Dashboard Dashboard related features release_note:skip Skip the PR/issue when compiling release notes backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) Feature:Maps labels Nov 13, 2024
@kowalczyk-krzysztof kowalczyk-krzysztof self-assigned this Nov 13, 2024
@kowalczyk-krzysztof kowalczyk-krzysztof requested review from a team as code owners November 13, 2024 11:51
@kibanamachine kibanamachine added the Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas label Nov 13, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@kowalczyk-krzysztof kowalczyk-krzysztof added impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Nov 13, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-visualizations (Team:Visualizations)

Copy link
Contributor

@mbondyra mbondyra left a comment

Choose a reason for hiding this comment

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

Visualizations changes look good to me (as it's only added styles changes for us I didn't test)

@nreese nreese self-requested a review November 13, 2024 14:27
@@ -16,13 +17,19 @@ interface Props {
}

export function LegendDetails({ inspectorAdapters, layer }: Props) {
const { euiTheme } = useEuiTheme();
Copy link
Contributor

Choose a reason for hiding this comment

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

How about moving errorTextStyle into a hook in packages/kbn-react-hooks so that it can be defined in a single location?

So define

export function useErrorTextStyle() {
  const { euiTheme } = useEuiTheme();
  return css`
    font-family: ${euiTheme.font.familyCode};
    white-space: break-spaces;
  `;
}

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the suggestion. Implemented.

@kowalczyk-krzysztof kowalczyk-krzysztof requested a review from a team as a code owner November 14, 2024 09:53
@kowalczyk-krzysztof kowalczyk-krzysztof force-pushed the fix/kql-error-parsing-style branch from 737c046 to 043d333 Compare November 14, 2024 09:58
Copy link
Contributor

@nreese nreese left a comment

Choose a reason for hiding this comment

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

LGTM

```

### [useErrorTextStyle](./src/useErrorTextStyle)
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe this will create a broken link in README. I guess the existing link for useBoolean is also broken.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for noticing this @awahab07

Fixed both links.

Copy link
Contributor

@awahab07 awahab07 left a comment

Choose a reason for hiding this comment

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

LGTM!

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
apm 1872 1874 +2
controls 357 363 +6
discover 977 979 +2
infra 1526 1528 +2
inventory 276 278 +2
logsShared 701 703 +2
maps 1244 1250 +6
observabilityLogsExplorer 208 210 +2
presentationPanel 105 111 +6
securitySolution 6202 6204 +2
visualizations 478 484 +6
total +38

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/react-hooks 7 8 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
controls 458.6KB 458.8KB +149.0B
maps 3.0MB 3.0MB +154.0B
visualizations 316.2KB 316.4KB +147.0B
total +450.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
presentationPanel 43.1KB 43.3KB +148.0B
Unknown metric groups

API count

id before after diff
@kbn/react-hooks 8 9 +1

History

cc @kowalczyk-krzysztof

@kowalczyk-krzysztof kowalczyk-krzysztof merged commit a8fc787 into elastic:main Nov 18, 2024
25 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/11891635339

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 18, 2024
## Summary

This PR fixes styling for `KQL parsing error` text on various elements
on `Maps` and `Dashboard` to have the invalid syntax and ASCII arrow on
new line.

Closes: elastic#49377

![dashboard1](https://github.com/user-attachments/assets/c607c0e0-24d8-4bd9-8106-d5c94fe1197d)

![dashboard2](https://github.com/user-attachments/assets/cb4b58af-6d8b-4609-9a4e-b948b1ec9340)

![dashboard3](https://github.com/user-attachments/assets/5a6c883e-76dc-4f9d-8db6-94c3e0bc359a)

![maps](https://github.com/user-attachments/assets/83d897a4-6856-4c47-8b14-18a1fff1de9d)

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit a8fc787)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Nov 18, 2024
# Backport

This will backport the following commits from `main` to `8.x`:
- [[Papercut] Fix KQL parsing error text styling
(#199985)](#199985)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Krzysztof
Kowalczyk","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-18T11:37:49Z","message":"[Papercut]
Fix KQL parsing error text styling (#199985)\n\n## Summary\r\n\r\nThis
PR fixes styling for `KQL parsing error` text on various elements\r\non
`Maps` and `Dashboard` to have the invalid syntax and ASCII arrow
on\r\nnew line.\r\n\r\nCloses:
#49377\r\n\r\n\r\n![dashboard1](https://github.com/user-attachments/assets/c607c0e0-24d8-4bd9-8106-d5c94fe1197d)\r\n\r\n![dashboard2](https://github.com/user-attachments/assets/cb4b58af-6d8b-4609-9a4e-b948b1ec9340)\r\n\r\n![dashboard3](https://github.com/user-attachments/assets/5a6c883e-76dc-4f9d-8db6-94c3e0bc359a)\r\n\r\n![maps](https://github.com/user-attachments/assets/83d897a4-6856-4c47-8b14-18a1fff1de9d)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"a8fc787cdbda54cd54e58a37e3c1163af62864dd","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","Feature:Dashboard","Team:Presentation","loe:small","Team:Visualizations","release_note:skip","impact:low","v9.0.0","backport:prev-minor","Feature:Maps"],"title":"[Papercut]
Fix KQL parsing error text
styling","number":199985,"url":"https://github.com/elastic/kibana/pull/199985","mergeCommit":{"message":"[Papercut]
Fix KQL parsing error text styling (#199985)\n\n## Summary\r\n\r\nThis
PR fixes styling for `KQL parsing error` text on various elements\r\non
`Maps` and `Dashboard` to have the invalid syntax and ASCII arrow
on\r\nnew line.\r\n\r\nCloses:
#49377\r\n\r\n\r\n![dashboard1](https://github.com/user-attachments/assets/c607c0e0-24d8-4bd9-8106-d5c94fe1197d)\r\n\r\n![dashboard2](https://github.com/user-attachments/assets/cb4b58af-6d8b-4609-9a4e-b948b1ec9340)\r\n\r\n![dashboard3](https://github.com/user-attachments/assets/5a6c883e-76dc-4f9d-8db6-94c3e0bc359a)\r\n\r\n![maps](https://github.com/user-attachments/assets/83d897a4-6856-4c47-8b14-18a1fff1de9d)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"a8fc787cdbda54cd54e58a37e3c1163af62864dd"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199985","number":199985,"mergeCommit":{"message":"[Papercut]
Fix KQL parsing error text styling (#199985)\n\n## Summary\r\n\r\nThis
PR fixes styling for `KQL parsing error` text on various elements\r\non
`Maps` and `Dashboard` to have the invalid syntax and ASCII arrow
on\r\nnew line.\r\n\r\nCloses:
#49377\r\n\r\n\r\n![dashboard1](https://github.com/user-attachments/assets/c607c0e0-24d8-4bd9-8106-d5c94fe1197d)\r\n\r\n![dashboard2](https://github.com/user-attachments/assets/cb4b58af-6d8b-4609-9a4e-b948b1ec9340)\r\n\r\n![dashboard3](https://github.com/user-attachments/assets/5a6c883e-76dc-4f9d-8db6-94c3e0bc359a)\r\n\r\n![maps](https://github.com/user-attachments/assets/83d897a4-6856-4c47-8b14-18a1fff1de9d)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"a8fc787cdbda54cd54e58a37e3c1163af62864dd"}}]}]
BACKPORT-->

Co-authored-by: Krzysztof Kowalczyk <[email protected]>
jesuswr pushed a commit to jesuswr/kibana that referenced this pull request Nov 18, 2024
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) bug Fixes for quality problems that affect the customer experience Feature:Dashboard Dashboard related features Feature:Maps impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort release_note:skip Skip the PR/issue when compiling release notes Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas Team:Visualizations Visualization editors, elastic-charts and infrastructure v8.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

KQL Parse error look incorrect due to text wrapping in toast notification
6 participants