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

[8.x] Open links in new tabs from pages in Fleet integrations (#199468) #199526

Merged
merged 1 commit into from
Nov 8, 2024

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

## Summary

Closes elastic/security-team#10987.

Fleet integrations render pages whose source content is written in
Markdown format. Links in markdown were being converted into regular
`<a>` tags rather than in `<EuiLink>` components that include styling
for external links and open in new tabs.

Also, the "API Reference" page rendered a "Learn more" link using a
`<EuiLink>` component with external styling but missed
`target="_blank"`, so it wasn't acting as an external link and didn't
open in a new tab either.

### Bug origin

This bug has dragged for the last 3 years since `react-markdown`
upgraded to `v6.0` and introduced a [breaking
change](https://github.com/remarkjs/react-markdown/blob/main/changelog.md#600---2021-04-15)
in custom renderers

### Screenshots

<details><summary>Overview page</summary>
<img width="1406" alt="Screenshot 2024-11-08 at 13 35 43"
src="https://github.com/user-attachments/assets/b11262f1-0b1e-45e5-baa9-d69727643b08">
</details>

<details><summary>API Reference page</summary>
<img width="2021" alt="Screenshot 2024-11-08 at 13 35 07"
src="https://github.com/user-attachments/assets/7e073df2-0451-4e9d-b80c-878cfcdd6c58">
</details>

### Checklist

Delete any items that are not applicable to this PR.

- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit 763410c)
@kibanamachine kibanamachine enabled auto-merge (squash) November 8, 2024 17:39
@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Nov 8, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@kibanamachine kibanamachine merged commit 1965f92 into elastic:8.x Nov 8, 2024
28 checks passed
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

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

id before after diff
fleet 1.8MB 1.8MB +13.0B

cc @albertoblaz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Team:Fleet Team label for Observability Data Collection Fleet team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants