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

[Markdown] Consecutive lines are broken by line separators #180576

Closed
sakurai-youhei opened this issue Apr 11, 2024 · 5 comments · Fixed by #182635
Closed

[Markdown] Consecutive lines are broken by line separators #180576

sakurai-youhei opened this issue Apr 11, 2024 · 5 comments · Fixed by #182635
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Markdown Markdown visualization feature Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience)

Comments

@sakurai-youhei
Copy link
Member

Kibana version: 8.13.0+

Elasticsearch version: 8.13.0+

Server OS version: n/a (Elastic Cloud)

Browser version: Chrome Version 123.0.6312.106 (Official Build) (64-bit)

Browser OS version: Windows 11 10.0.22621 N/A Build 22621

Original install method: n/a (Elastic Cloud)

Describe the bug: Consecutive lines are broken by line separators even though there are no two training spaces.

Steps to reproduce:

  1. Go to Kibana > Visualize library.
  2. Click Create visualization > Text.
  3. Put the following content and click Update
line1
line2
line3

Expected behavior (taken on 8.12.2):
image

Wrong behavior (taken on 8.13.2):
image

Any additional context:

The problem is that there's no way to opt out line-breaks plugin at this moment. So, I will open a PR to make it excludable in EUI, and then open a PR to fix this issue in Kibana. An alternative would be to filter out the plugin like the code below, but it requires adding remark-breaks to Kibana's package.json.

const _parsingPlugins = validateLinks
? parsingPlugins
: // @ts-expect-error
parsingPlugins.filter(([plugin]) => {
return plugin !== euiMarkdownLinkValidator;
});

@sakurai-youhei sakurai-youhei added bug Fixes for quality problems that affect the customer experience Feature:Markdown Markdown visualization feature labels Apr 11, 2024
@botelastic botelastic bot added the needs-team Issues missing a team label label Apr 11, 2024
@dmlemeshko dmlemeshko added the Team:Visualizations Visualization editors, elastic-charts and infrastructure label Apr 12, 2024
@botelastic botelastic bot removed the needs-team Issues missing a team label label Apr 12, 2024
@elasticmachine
Copy link
Contributor

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

@markov00 markov00 added Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas and removed Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Apr 12, 2024
@elasticmachine
Copy link
Contributor

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

@markov00 markov00 added the Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) label Apr 12, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/appex-sharedux (Team:SharedUX)

@sakurai-youhei
Copy link
Member Author

sakurai-youhei commented Apr 13, 2024

eokoneyo added a commit that referenced this issue Apr 18, 2024
)

## Summary

This PR reverts the change to the shared UX markdown component that
happened here #176478. The
aforementioned PR introduced couple of visual issues that were uncaught
during the migration.

The known issues that have been brought up that informed the decision to
revert this change, are itemised below;

- #180576
- #180452
- elastic/sdh-kibana#4608


### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios


### For maintainers

- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Apr 18, 2024
…tic#180906)

## Summary

This PR reverts the change to the shared UX markdown component that
happened here elastic#176478. The
aforementioned PR introduced couple of visual issues that were uncaught
during the migration.

The known issues that have been brought up that informed the decision to
revert this change, are itemised below;

- elastic#180576
- elastic#180452
- elastic/sdh-kibana#4608

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

### For maintainers

- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 4127163)
kibanamachine added a commit that referenced this issue Apr 18, 2024
#180906) (#181140)

# Backport

This will backport the following commits from `main` to `8.14`:
- [revert change to shared UX markdown component for dashboard vis
(#180906)](#180906)

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

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

<!--BACKPORT [{"author":{"name":"Eyo O.
Eyo","email":"7893459+eokoneyo@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-04-18T12:01:18Z","message":"revert
change to shared UX markdown component for dashboard vis (#180906)\n\n##
Summary\r\n\r\nThis PR reverts the change to the shared UX markdown
component that\r\nhappened here
#176478. The\r\naforementioned PR
introduced couple of visual issues that were uncaught\r\nduring the
migration.\r\n\r\nThe known issues that have been brought up that
informed the decision to\r\nrevert this change, are itemised
below;\r\n\r\n- #180576
#180452
elastic/sdh-kibana#4608
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n\r\n\r\n### For
maintainers\r\n\r\n- [x] This was checked for breaking API changes and
was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"4127163bd913dccfbd17badbb9ce1a7a5b2afadc","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:SharedUX","backport:all-open","v8.14.0","v8.15.0"],"title":"revert
change to shared UX markdown component for dashboard
vis","number":180906,"url":"#180906
change to shared UX markdown component for dashboard vis (#180906)\n\n##
Summary\r\n\r\nThis PR reverts the change to the shared UX markdown
component that\r\nhappened here
#176478. The\r\naforementioned PR
introduced couple of visual issues that were uncaught\r\nduring the
migration.\r\n\r\nThe known issues that have been brought up that
informed the decision to\r\nrevert this change, are itemised
below;\r\n\r\n- #180576
#180452
elastic/sdh-kibana#4608
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n\r\n\r\n### For
maintainers\r\n\r\n- [x] This was checked for breaking API changes and
was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"4127163bd913dccfbd17badbb9ce1a7a5b2afadc"}},"sourceBranch":"main","suggestedTargetBranches":["8.14"],"targetPullRequestStates":[{"branch":"8.14","label":"v8.14.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.15.0","branchLabelMappingKey":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"#180906
change to shared UX markdown component for dashboard vis (#180906)\n\n##
Summary\r\n\r\nThis PR reverts the change to the shared UX markdown
component that\r\nhappened here
#176478. The\r\naforementioned PR
introduced couple of visual issues that were uncaught\r\nduring the
migration.\r\n\r\nThe known issues that have been brought up that
informed the decision to\r\nrevert this change, are itemised
below;\r\n\r\n- #180576
#180452
elastic/sdh-kibana#4608
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n\r\n\r\n### For
maintainers\r\n\r\n- [x] This was checked for breaking API changes and
was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"4127163bd913dccfbd17badbb9ce1a7a5b2afadc"}}]}]
BACKPORT-->

Co-authored-by: Eyo O. Eyo <7893459+eokoneyo@users.noreply.github.com>
@nickpeihl nickpeihl removed the Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas label Apr 18, 2024
eokoneyo added a commit to eokoneyo/kibana that referenced this issue Apr 24, 2024
…tic#180906)

## Summary

This PR reverts the change to the shared UX markdown component that
happened here elastic#176478. The
aforementioned PR introduced couple of visual issues that were uncaught
during the migration.

The known issues that have been brought up that informed the decision to
revert this change, are itemised below;

- elastic#180576
- elastic#180452
- elastic/sdh-kibana#4608

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

### For maintainers

- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 4127163)
eokoneyo added a commit that referenced this issue Apr 24, 2024
#180906) (#181517)

# Backport

This will backport the following commits from `main` to `8.13`:
- [revert change to shared UX markdown component for dashboard vis
(#180906)](#180906)

<!--- Backport version: 8.9.8 -->

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

<!--BACKPORT [{"author":{"name":"Eyo O.
Eyo","email":"7893459+eokoneyo@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-04-18T12:01:18Z","message":"revert
change to shared UX markdown component for dashboard vis (#180906)\n\n##
Summary\r\n\r\nThis PR reverts the change to the shared UX markdown
component that\r\nhappened here
#176478. The\r\naforementioned PR
introduced couple of visual issues that were uncaught\r\nduring the
migration.\r\n\r\nThe known issues that have been brought up that
informed the decision to\r\nrevert this change, are itemised
below;\r\n\r\n- #180576
#180452
elastic/sdh-kibana#4608
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n\r\n\r\n### For
maintainers\r\n\r\n- [x] This was checked for breaking API changes and
was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"4127163bd913dccfbd17badbb9ce1a7a5b2afadc","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:SharedUX","backport:all-open","v8.14.0","v8.15.0"],"number":180906,"url":"#180906
change to shared UX markdown component for dashboard vis (#180906)\n\n##
Summary\r\n\r\nThis PR reverts the change to the shared UX markdown
component that\r\nhappened here
#176478. The\r\naforementioned PR
introduced couple of visual issues that were uncaught\r\nduring the
migration.\r\n\r\nThe known issues that have been brought up that
informed the decision to\r\nrevert this change, are itemised
below;\r\n\r\n- #180576
#180452
elastic/sdh-kibana#4608
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n\r\n\r\n### For
maintainers\r\n\r\n- [x] This was checked for breaking API changes and
was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"4127163bd913dccfbd17badbb9ce1a7a5b2afadc"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"8.14","label":"v8.14.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"#181140
revert change to shared UX markdown component for dashboard vis
(#180906) (#181140)\n\n# Backport\n\nThis will backport the following
commits from `main` to `8.14`:\n- [revert change to shared UX markdown
component for dashboard
vis\n(#180906)](https://github.com/elastic/kibana/pull/180906)\n\n<!---
Backport version: 9.4.3 -->\n\n### Questions ?\nPlease refer to the
[Backport
tool\ndocumentation](https://github.com/sqren/backport)\n\n<!--BACKPORT
[{\"author\":{\"name\":\"Eyo
O.\nEyo\",\"email\":\"7893459+eokoneyo@users.noreply.github.com\"},\"sourceCommit\":{\"committedDate\":\"2024-04-18T12:01:18Z\",\"message\":\"revert\nchange
to shared UX markdown component for dashboard vis
(#180906)\\n\\n##\nSummary\\r\\n\\r\\nThis PR reverts the change to the
shared UX markdown\ncomponent that\\r\\nhappened
here\nhttps://github.com//pull/176478.
The\\r\\naforementioned PR\nintroduced couple of visual issues that were
uncaught\\r\\nduring the\nmigration.\\r\\n\\r\\nThe known issues that
have been brought up that\ninformed the decision to\\r\\nrevert this
change, are itemised\nbelow;\\r\\n\\r\\n-
#180576
[x] [Unit
or\nfunctional\\r\\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\\r\\nwere\nupdated
or added to match the most common scenarios\\r\\n\\r\\n\\r\\n###
For\nmaintainers\\r\\n\\r\\n- [x] This was checked for breaking API
changes
and\nwas\n[labeled\\r\\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\\r\\n\\r\\n---------\\r\\n\\r\\nCo-authored-by:\nkibanamachine\n<42973632+kibanamachine@users.noreply.github.com>\",\"sha\":\"4127163bd913dccfbd17badbb9ce1a7a5b2afadc\",\"branchLabelMapping\":{\"^v8.15.0$\":\"main\",\"^v(\\\\d+).(\\\\d+).\\\\d+$\":\"$1.$2\"}},\"sourcePullRequest\":{\"labels\":[\"release_note:fix\",\"Team:SharedUX\",\"backport:all-open\",\"v8.14.0\",\"v8.15.0\"],\"title\":\"revert\nchange
to shared UX markdown component for
dashboard\nvis\",\"number\":180906,\"url\":\"#180906
to shared UX markdown component for dashboard vis
(#180906)\\n\\n##\nSummary\\r\\n\\r\\nThis PR reverts the change to the
shared UX markdown\ncomponent that\\r\\nhappened
here\nhttps://github.com//pull/176478.
The\\r\\naforementioned PR\nintroduced couple of visual issues that were
uncaught\\r\\nduring the\nmigration.\\r\\n\\r\\nThe known issues that
have been brought up that\ninformed the decision to\\r\\nrevert this
change, are itemised\nbelow;\\r\\n\\r\\n-
#180576
[x] [Unit
or\nfunctional\\r\\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\\r\\nwere\nupdated
or added to match the most common scenarios\\r\\n\\r\\n\\r\\n###
For\nmaintainers\\r\\n\\r\\n- [x] This was checked for breaking API
changes
and\nwas\n[labeled\\r\\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\\r\\n\\r\\n---------\\r\\n\\r\\nCo-authored-by:\nkibanamachine\n<42973632+kibanamachine@users.noreply.github.com>\",\"sha\":\"4127163bd913dccfbd17badbb9ce1a7a5b2afadc\"}},\"sourceBranch\":\"main\",\"suggestedTargetBranches\":[\"8.14\"],\"targetPullRequestStates\":[{\"branch\":\"8.14\",\"label\":\"v8.14.0\",\"branchLabelMappingKey\":\"^v(\\\\d+).(\\\\d+).\\\\d+$\",\"isSourceBranch\":false,\"state\":\"NOT_CREATED\"},{\"branch\":\"main\",\"label\":\"v8.15.0\",\"branchLabelMappingKey\":\"^v8.15.0$\",\"isSourceBranch\":true,\"state\":\"MERGED\",\"url\":\"https://github.com/elastic/kibana/pull/180906\",\"number\":180906,\"mergeCommit\":{\"message\":\"revert\nchange
to shared UX markdown component for dashboard vis
(#180906)\\n\\n##\nSummary\\r\\n\\r\\nThis PR reverts the change to the
shared UX markdown\ncomponent that\\r\\nhappened
here\nhttps://github.com//pull/176478.
The\\r\\naforementioned PR\nintroduced couple of visual issues that were
uncaught\\r\\nduring the\nmigration.\\r\\n\\r\\nThe known issues that
have been brought up that\ninformed the decision to\\r\\nrevert this
change, are itemised\nbelow;\\r\\n\\r\\n-
#180576
[x] [Unit
or\nfunctional\\r\\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\\r\\nwere\nupdated
or added to match the most common scenarios\\r\\n\\r\\n\\r\\n###
For\nmaintainers\\r\\n\\r\\n- [x] This was checked for breaking API
changes
and\nwas\n[labeled\\r\\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\\r\\n\\r\\n---------\\r\\n\\r\\nCo-authored-by:\nkibanamachine\n<42973632+kibanamachine@users.noreply.github.com>\",\"sha\":\"4127163bd913dccfbd17badbb9ce1a7a5b2afadc\"}}]}]\nBACKPORT-->\n\nCo-authored-by:
Eyo O. Eyo
<7893459+eokoneyo@users.noreply.github.com>"}},{"branch":"main","label":"v8.15.0","labelRegex":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"#180906
change to shared UX markdown component for dashboard vis (#180906)\n\n##
Summary\r\n\r\nThis PR reverts the change to the shared UX markdown
component that\r\nhappened here
#176478. The\r\naforementioned PR
introduced couple of visual issues that were uncaught\r\nduring the
migration.\r\n\r\nThe known issues that have been brought up that
informed the decision to\r\nrevert this change, are itemised
below;\r\n\r\n- #180576
#180452
elastic/sdh-kibana#4608
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n\r\n\r\n### For
maintainers\r\n\r\n- [x] This was checked for breaking API changes and
was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"4127163bd913dccfbd17badbb9ce1a7a5b2afadc"}}]}]
BACKPORT-->
@markov00
Copy link
Member

markov00 commented May 9, 2024

Fixed by reverted changes #180906

@markov00 markov00 closed this as completed May 9, 2024
sakurai-youhei added a commit that referenced this issue May 13, 2024
## Summary

This PR adds an enableSoftLineBreaks parameter to the `<Markdown>`
component in shared-ux, which enables it to fill the gap in line
breaking between the legacy React `<Markdown>` component.


![enableSoftLineBreaks](https://github.com/elastic/kibana/assets/721858/f7b9b97a-e327-480b-aab9-f54419607669)

The parameter defaults to `false` not to change the current behavior in
existing use cases. Furthermore, there is currently no case where the
parameter is set to `true` because of
#180906.

Closes #180576

### Checklist

- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

### For maintainers

- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Markdown Markdown visualization feature Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants