-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Papercut] Fix KQL parsing error text styling #199985
Conversation
Pinging @elastic/kibana-presentation (Team:Presentation) |
Pinging @elastic/kibana-visualizations (Team:Visualizations) |
There was a problem hiding this 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)
@@ -16,13 +17,19 @@ interface Props { | |||
} | |||
|
|||
export function LegendDetails({ inspectorAdapters, layer }: Props) { | |||
const { euiTheme } = useEuiTheme(); |
There was a problem hiding this comment.
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;
`;
}
There was a problem hiding this comment.
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.
737c046
to
043d333
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
packages/kbn-react-hooks/README.md
Outdated
``` | ||
|
||
### [useErrorTextStyle](./src/useErrorTextStyle) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
💚 Build Succeeded
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
History
|
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/11891635339 |
## 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)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
# 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]>
## 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]>
## 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]>
Summary
This PR fixes styling for
KQL parsing error
text on various elements onMaps
andDashboard
to have the invalid syntax and ASCII arrow on new line.Closes: #49377