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

Fix share modal copy embed code #204584

Merged
merged 1 commit into from
Dec 17, 2024
Merged

Conversation

eokoneyo
Copy link
Contributor

@eokoneyo eokoneyo commented Dec 17, 2024

Summary

Closes #204312

This PR removes an unnecessary function, that causes an infinite render loop for visualisations.

After

Screen.Recording.2024-12-17.at.14.51.36.mov

How to test

  • From the left side nav, click the Visualize Library menu item, attempt to create a legacy visualisation, any one of choice and attempt sharing said created visualisation clicking the copy embed code should not result in any error but rather copy the embed code with the visual feedback.

@eokoneyo eokoneyo added release_note:skip Skip the PR/issue when compiling release notes Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) backport:prev-major Backport to (8.x, 8.17, 8.16) the previous major branch and other branches in development labels Dec 17, 2024
@eokoneyo eokoneyo self-assigned this Dec 17, 2024
@eokoneyo eokoneyo requested a review from a team as a code owner December 17, 2024 14:57
@elasticmachine
Copy link
Contributor

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

Comment on lines -70 to -73
useEffect(() => {
if (objectType !== 'dashboard') setIsNotSaved();
}, [url, setIsNotSaved, objectType]);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We remove this function because the resulting value from the computation is not used.

Comment on lines -23 to -38
const embedTabReducer: IEmbedTab['reducer'] = (state = { url: '', isNotSaved: false }, action) => {
switch (action.type) {
case EMBED_TAB_ACTIONS.SET_IS_NOT_SAVED:
return {
...state,
isNotSaved: action.payload,
};
case EMBED_TAB_ACTIONS.SET_IS_NOT_SAVED:
return {
...state,
isNotSaved: action.payload,
};
default:
return state;
}
};
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This result from this reducer is not used.

Comment on lines -65 to -66
isNotSaved: state?.isNotSaved,
setIsNotSaved,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The isNotSaved is not used at all.

@eokoneyo eokoneyo changed the title remove unnecessary function invocation Fix share modal copy embed code Dec 17, 2024
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Page load bundle

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

id before after diff
share 58.5KB 58.2KB -361.0B

History

cc @eokoneyo

@bhavyarm bhavyarm self-requested a review December 17, 2024 16:56
Copy link
Contributor

@bhavyarm bhavyarm left a comment

Choose a reason for hiding this comment

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

LGTM. Tested on latest main. The error in the bug is not seen!
Screenshot 2024-12-17 at 12 10 28 PM

@eokoneyo eokoneyo merged commit effd84d into elastic:main Dec 17, 2024
8 checks passed
@eokoneyo eokoneyo deleted the fix/resolve-204312 branch December 17, 2024 17:13
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.16, 8.17, 8.x

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

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

Closes elastic#204312

This PR removes an unnecessary function, that causes an infinite render
loop for visualisations.

## After

https://github.com/user-attachments/assets/259d238b-c1cf-4d74-bfca-1a6440d0f5cd

## How to test
- From the left side nav, click the `Visualize Library` menu item,
attempt to create a legacy visualisation, any one of choice and attempt
sharing said created visualisation clicking the copy embed code should
not result in any error but rather copy the embed code with the visual
feedback.

<!--
### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

-->

(cherry picked from commit effd84d)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 17, 2024
## Summary

Closes elastic#204312

This PR removes an unnecessary function, that causes an infinite render
loop for visualisations.

## After

https://github.com/user-attachments/assets/259d238b-c1cf-4d74-bfca-1a6440d0f5cd

## How to test
- From the left side nav, click the `Visualize Library` menu item,
attempt to create a legacy visualisation, any one of choice and attempt
sharing said created visualisation clicking the copy embed code should
not result in any error but rather copy the embed code with the visual
feedback.

<!--
### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

-->

(cherry picked from commit effd84d)
@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
8.16 Backport failed because of merge conflicts
8.17
8.x

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

Manual backport

To create the backport manually run:

node scripts/backport --pr 204584

Questions ?

Please refer to the Backport tool documentation

stephmilovic pushed a commit that referenced this pull request Dec 17, 2024
# Backport

This will backport the following commits from `main` to `8.x`:
- [Fix share modal copy embed code
(#204584)](#204584)

<!--- 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":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-17T17:13:02Z","message":"Fix
share modal copy embed code (#204584)\n\n## Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/204312\r\n\r\nThis PR removes
an unnecessary function, that causes an infinite render\r\nloop for
visualisations.\r\n\r\n\r\n##
After\r\n\r\n\r\nhttps://github.com/user-attachments/assets/259d238b-c1cf-4d74-bfca-1a6440d0f5cd\r\n\r\n##
How to test\r\n- From the left side nav, click the `Visualize Library`
menu item,\r\nattempt to create a legacy visualisation, any one of
choice and attempt\r\nsharing said created visualisation clicking the
copy embed code should\r\nnot result in any error but rather copy the
embed code with the visual\r\nfeedback.\r\n\r\n<!--\r\n###
Checklist\r\n\r\nCheck the PR satisfies following conditions.
\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\r\n- [ ] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [ ] [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- [ ] If a plugin
configuration key changed, check if it needs to be\r\nallowlisted in the
cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\r\nchanges have been approved by the breaking-change committee.
The\r\n`release_note:breaking` label should be applied in these
situations.\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [ ] The PR description includes
the appropriate Release Notes section,\r\nand the correct
`release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n###
Identify risks\r\n\r\nDoes this PR introduce any risks? For example,
consider risks like hard\r\nto test bugs, performance regression,
potential of data loss.\r\n\r\nDescribe the risk, its severity, and
mitigation for each identified\r\nrisk. Invite stakeholders and evaluate
how to proceed before merging.\r\n\r\n- [ ] [See some
risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\r\n-
[ ]
...\r\n\r\n\r\n-->","sha":"effd84dc41c702b0a82631ee5777fed7f14dfb61","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:SharedUX","backport:prev-major"],"title":"Fix
share modal copy embed
code","number":204584,"url":"https://github.com/elastic/kibana/pull/204584","mergeCommit":{"message":"Fix
share modal copy embed code (#204584)\n\n## Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/204312\r\n\r\nThis PR removes
an unnecessary function, that causes an infinite render\r\nloop for
visualisations.\r\n\r\n\r\n##
After\r\n\r\n\r\nhttps://github.com/user-attachments/assets/259d238b-c1cf-4d74-bfca-1a6440d0f5cd\r\n\r\n##
How to test\r\n- From the left side nav, click the `Visualize Library`
menu item,\r\nattempt to create a legacy visualisation, any one of
choice and attempt\r\nsharing said created visualisation clicking the
copy embed code should\r\nnot result in any error but rather copy the
embed code with the visual\r\nfeedback.\r\n\r\n<!--\r\n###
Checklist\r\n\r\nCheck the PR satisfies following conditions.
\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\r\n- [ ] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [ ] [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- [ ] If a plugin
configuration key changed, check if it needs to be\r\nallowlisted in the
cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\r\nchanges have been approved by the breaking-change committee.
The\r\n`release_note:breaking` label should be applied in these
situations.\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [ ] The PR description includes
the appropriate Release Notes section,\r\nand the correct
`release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n###
Identify risks\r\n\r\nDoes this PR introduce any risks? For example,
consider risks like hard\r\nto test bugs, performance regression,
potential of data loss.\r\n\r\nDescribe the risk, its severity, and
mitigation for each identified\r\nrisk. Invite stakeholders and evaluate
how to proceed before merging.\r\n\r\n- [ ] [See some
risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\r\n-
[ ]
...\r\n\r\n\r\n-->","sha":"effd84dc41c702b0a82631ee5777fed7f14dfb61"}},"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/204584","number":204584,"mergeCommit":{"message":"Fix
share modal copy embed code (#204584)\n\n## Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/204312\r\n\r\nThis PR removes
an unnecessary function, that causes an infinite render\r\nloop for
visualisations.\r\n\r\n\r\n##
After\r\n\r\n\r\nhttps://github.com/user-attachments/assets/259d238b-c1cf-4d74-bfca-1a6440d0f5cd\r\n\r\n##
How to test\r\n- From the left side nav, click the `Visualize Library`
menu item,\r\nattempt to create a legacy visualisation, any one of
choice and attempt\r\nsharing said created visualisation clicking the
copy embed code should\r\nnot result in any error but rather copy the
embed code with the visual\r\nfeedback.\r\n\r\n<!--\r\n###
Checklist\r\n\r\nCheck the PR satisfies following conditions.
\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\r\n- [ ] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [ ] [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- [ ] If a plugin
configuration key changed, check if it needs to be\r\nallowlisted in the
cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\r\nchanges have been approved by the breaking-change committee.
The\r\n`release_note:breaking` label should be applied in these
situations.\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [ ] The PR description includes
the appropriate Release Notes section,\r\nand the correct
`release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n###
Identify risks\r\n\r\nDoes this PR introduce any risks? For example,
consider risks like hard\r\nto test bugs, performance regression,
potential of data loss.\r\n\r\nDescribe the risk, its severity, and
mitigation for each identified\r\nrisk. Invite stakeholders and evaluate
how to proceed before merging.\r\n\r\n- [ ] [See some
risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\r\n-
[ ]
...\r\n\r\n\r\n-->","sha":"effd84dc41c702b0a82631ee5777fed7f14dfb61"}}]}]
BACKPORT-->

Co-authored-by: Eyo O. Eyo <[email protected]>
@eokoneyo
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
8.16

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

Questions ?

Please refer to the Backport tool documentation

eokoneyo added a commit to eokoneyo/kibana that referenced this pull request Dec 18, 2024
## Summary

Closes elastic#204312

This PR removes an unnecessary function, that causes an infinite render
loop for visualisations.

## After

https://github.com/user-attachments/assets/259d238b-c1cf-4d74-bfca-1a6440d0f5cd

## How to test
- From the left side nav, click the `Visualize Library` menu item,
attempt to create a legacy visualisation, any one of choice and attempt
sharing said created visualisation clicking the copy embed code should
not result in any error but rather copy the embed code with the visual
feedback.

<!--
### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

-->

(cherry picked from commit effd84d)

# Conflicts:
#	src/plugins/share/public/components/tabs/embed/embed_content.test.tsx
#	src/plugins/share/public/components/tabs/embed/embed_content.tsx
#	src/plugins/share/public/components/tabs/embed/index.tsx
@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Dec 18, 2024
@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

eokoneyo added a commit to eokoneyo/kibana that referenced this pull request Dec 19, 2024
Closes elastic#204312

This PR removes an unnecessary function, that causes an infinite render
loop for visualisations.

https://github.com/user-attachments/assets/259d238b-c1cf-4d74-bfca-1a6440d0f5cd

- From the left side nav, click the `Visualize Library` menu item,
attempt to create a legacy visualisation, any one of choice and attempt
sharing said created visualisation clicking the copy embed code should
not result in any error but rather copy the embed code with the visual
feedback.

<!--

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

-->

(cherry picked from commit effd84d)
eokoneyo added a commit that referenced this pull request Dec 19, 2024
# Backport

This will backport the following commits from `main` to `8.16`:
- [Fix share modal copy embed code
(#204584)](#204584)

<!--- 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":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-17T17:13:02Z","message":"Fix
share modal copy embed code (#204584)\n\n## Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/204312\r\n\r\nThis PR removes
an unnecessary function, that causes an infinite render\r\nloop for
visualisations.\r\n\r\n\r\n##
After\r\n\r\n\r\nhttps://github.com/user-attachments/assets/259d238b-c1cf-4d74-bfca-1a6440d0f5cd\r\n\r\n##
How to test\r\n- From the left side nav, click the `Visualize Library`
menu item,\r\nattempt to create a legacy visualisation, any one of
choice and attempt\r\nsharing said created visualisation clicking the
copy embed code should\r\nnot result in any error but rather copy the
embed code with the visual\r\nfeedback.\r\n\r\n<!--\r\n###
Checklist\r\n\r\nCheck the PR satisfies following conditions.
\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\r\n- [ ] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [ ] [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- [ ] If a plugin
configuration key changed, check if it needs to be\r\nallowlisted in the
cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\r\nchanges have been approved by the breaking-change committee.
The\r\n`release_note:breaking` label should be applied in these
situations.\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [ ] The PR description includes
the appropriate Release Notes section,\r\nand the correct
`release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n###
Identify risks\r\n\r\nDoes this PR introduce any risks? For example,
consider risks like hard\r\nto test bugs, performance regression,
potential of data loss.\r\n\r\nDescribe the risk, its severity, and
mitigation for each identified\r\nrisk. Invite stakeholders and evaluate
how to proceed before merging.\r\n\r\n- [ ] [See some
risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\r\n-
[ ]
...\r\n\r\n\r\n-->","sha":"effd84dc41c702b0a82631ee5777fed7f14dfb61","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:SharedUX","backport:prev-major","v8.18.0"],"number":204584,"url":"https://github.com/elastic/kibana/pull/204584","mergeCommit":{"message":"Fix
share modal copy embed code (#204584)\n\n## Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/204312\r\n\r\nThis PR removes
an unnecessary function, that causes an infinite render\r\nloop for
visualisations.\r\n\r\n\r\n##
After\r\n\r\n\r\nhttps://github.com/user-attachments/assets/259d238b-c1cf-4d74-bfca-1a6440d0f5cd\r\n\r\n##
How to test\r\n- From the left side nav, click the `Visualize Library`
menu item,\r\nattempt to create a legacy visualisation, any one of
choice and attempt\r\nsharing said created visualisation clicking the
copy embed code should\r\nnot result in any error but rather copy the
embed code with the visual\r\nfeedback.\r\n\r\n<!--\r\n###
Checklist\r\n\r\nCheck the PR satisfies following conditions.
\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\r\n- [ ] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [ ] [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- [ ] If a plugin
configuration key changed, check if it needs to be\r\nallowlisted in the
cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\r\nchanges have been approved by the breaking-change committee.
The\r\n`release_note:breaking` label should be applied in these
situations.\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [ ] The PR description includes
the appropriate Release Notes section,\r\nand the correct
`release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n###
Identify risks\r\n\r\nDoes this PR introduce any risks? For example,
consider risks like hard\r\nto test bugs, performance regression,
potential of data loss.\r\n\r\nDescribe the risk, its severity, and
mitigation for each identified\r\nrisk. Invite stakeholders and evaluate
how to proceed before merging.\r\n\r\n- [ ] [See some
risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\r\n-
[ ]
...\r\n\r\n\r\n-->","sha":"effd84dc41c702b0a82631ee5777fed7f14dfb61"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/204584","number":204584,"mergeCommit":{"message":"Fix
share modal copy embed code (#204584)\n\n## Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/204312\r\n\r\nThis PR removes
an unnecessary function, that causes an infinite render\r\nloop for
visualisations.\r\n\r\n\r\n##
After\r\n\r\n\r\nhttps://github.com/user-attachments/assets/259d238b-c1cf-4d74-bfca-1a6440d0f5cd\r\n\r\n##
How to test\r\n- From the left side nav, click the `Visualize Library`
menu item,\r\nattempt to create a legacy visualisation, any one of
choice and attempt\r\nsharing said created visualisation clicking the
copy embed code should\r\nnot result in any error but rather copy the
embed code with the visual\r\nfeedback.\r\n\r\n<!--\r\n###
Checklist\r\n\r\nCheck the PR satisfies following conditions.
\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\r\n- [ ] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [ ] [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- [ ] If a plugin
configuration key changed, check if it needs to be\r\nallowlisted in the
cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\r\nchanges have been approved by the breaking-change committee.
The\r\n`release_note:breaking` label should be applied in these
situations.\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [ ] The PR description includes
the appropriate Release Notes section,\r\nand the correct
`release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n###
Identify risks\r\n\r\nDoes this PR introduce any risks? For example,
consider risks like hard\r\nto test bugs, performance regression,
potential of data loss.\r\n\r\nDescribe the risk, its severity, and
mitigation for each identified\r\nrisk. Invite stakeholders and evaluate
how to proceed before merging.\r\n\r\n- [ ] [See some
risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\r\n-
[ ]
...\r\n\r\n\r\n-->","sha":"effd84dc41c702b0a82631ee5777fed7f14dfb61"}},{"branch":"8.x","label":"v8.18.0","labelRegex":"^v8.18.0$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/204623","number":204623,"state":"MERGED","mergeCommit":{"sha":"f77fc58383202e136095d7a6ab011b95bd53b540","message":"[8.x]
Fix share modal copy embed code (#204584) (#204623)\n\n#
Backport\r\n\r\nThis will backport the following commits from `main` to
`8.x`:\r\n- [Fix share modal copy embed
code\r\n(#204584)](https://github.com/elastic/kibana/pull/204584)\r\n\r\n<!---
Backport version: 9.4.3 -->\r\n\r\n### Questions ?\r\nPlease refer to
the [Backport
tool\r\ndocumentation](https://github.com/sqren/backport)\r\n\r\n<!--BACKPORT
[{\"author\":{\"name\":\"Eyo
O.\r\nEyo\",\"email\":\"[email protected]\"},\"sourceCommit\":{\"committedDate\":\"2024-12-17T17:13:02Z\",\"message\":\"Fix\r\nshare
modal copy embed code (#204584)\\n\\n##
Summary\\r\\n\\r\\nCloses\r\nhttps://github.com//issues/204312\\r\\n\\r\\nThis
PR removes\r\nan unnecessary function, that causes an infinite
render\\r\\nloop
for\r\nvisualisations.\\r\\n\\r\\n\\r\\n##\r\nAfter\\r\\n\\r\\n\\r\\nhttps://github.com/user-attachments/assets/259d238b-c1cf-4d74-bfca-1a6440d0f5cd\\r\\n\\r\\n##\r\nHow
to test\\r\\n- From the left side nav, click the `Visualize
Library`\r\nmenu item,\\r\\nattempt to create a legacy visualisation,
any one of\r\nchoice and attempt\\r\\nsharing said created visualisation
clicking the\r\ncopy embed code should\\r\\nnot result in any error but
rather copy the\r\nembed code with the
visual\\r\\nfeedback.\\r\\n\\r\\n<!--\\r\\n###\r\nChecklist\\r\\n\\r\\nCheck
the PR satisfies following conditions.\r\n\\r\\n\\r\\nReviewers should
verify this PR satisfies this list as\r\nwell.\\r\\n\\r\\n- [ ] Any text
added follows
[EUI's\r\nwriting\\r\\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),\r\nuses\\r\\nsentence
case text and
includes\r\n[i18n\\r\\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\\r\\n-\r\n[\r\n]\\r\\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\\r\\nwas\r\nadded
for features that require explanation or tutorials\\r\\n- [ ]
[Unit\r\nor\r\nfunctional\\r\\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\\r\\nwere\r\nupdated
or added to match the most common scenarios\\r\\n- [ ] If a
plugin\r\nconfiguration key changed, check if it needs to
be\\r\\nallowlisted in the\r\ncloud and added to
the\r\n[docker\\r\\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\\r\\n-\r\n[
] This was checked for breaking HTTP API changes, and
any\r\nbreaking\\r\\nchanges have been approved by the breaking-change
committee.\r\nThe\\r\\n`release_note:breaking` label should be applied
in these\r\nsituations.\\r\\n- [ ]
[Flaky\r\nTest\\r\\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)\r\nwas\\r\\nused
on any tests changed\\r\\n- [ ] The PR description includes\r\nthe
appropriate Release Notes section,\\r\\nand the
correct\r\n`release_note:*` label is applied
per\r\nthe\\r\\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\\r\\n\\r\\n###\r\nIdentify
risks\\r\\n\\r\\nDoes this PR introduce any risks? For
example,\r\nconsider risks like hard\\r\\nto test bugs, performance
regression,\r\npotential of data loss.\\r\\n\\r\\nDescribe the risk, its
severity, and\r\nmitigation for each identified\\r\\nrisk. Invite
stakeholders and evaluate\r\nhow to proceed before merging.\\r\\n\\r\\n-
[ ] [See
some\r\nrisk\\r\\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\\r\\n-\r\n[
]\r\n...\\r\\n\\r\\n\\r\\n-->\",\"sha\":\"effd84dc41c702b0a82631ee5777fed7f14dfb61\",\"branchLabelMapping\":{\"^v9.0.0$\":\"main\",\"^v8.18.0$\":\"8.x\",\"^v(\\\\d+).(\\\\d+).\\\\d+$\":\"$1.$2\"}},\"sourcePullRequest\":{\"labels\":[\"release_note:skip\",\"v9.0.0\",\"Team:SharedUX\",\"backport:prev-major\"],\"title\":\"Fix\r\nshare
modal copy
embed\r\ncode\",\"number\":204584,\"url\":\"https://github.com/elastic/kibana/pull/204584\",\"mergeCommit\":{\"message\":\"Fix\r\nshare
modal copy embed code (#204584)\\n\\n##
Summary\\r\\n\\r\\nCloses\r\nhttps://github.com//issues/204312\\r\\n\\r\\nThis
PR removes\r\nan unnecessary function, that causes an infinite
render\\r\\nloop
for\r\nvisualisations.\\r\\n\\r\\n\\r\\n##\r\nAfter\\r\\n\\r\\n\\r\\nhttps://github.com/user-attachments/assets/259d238b-c1cf-4d74-bfca-1a6440d0f5cd\\r\\n\\r\\n##\r\nHow
to test\\r\\n- From the left side nav, click the `Visualize
Library`\r\nmenu item,\\r\\nattempt to create a legacy visualisation,
any one of\r\nchoice and attempt\\r\\nsharing said created visualisation
clicking the\r\ncopy embed code should\\r\\nnot result in any error but
rather copy the\r\nembed code with the
visual\\r\\nfeedback.\\r\\n\\r\\n<!--\\r\\n###\r\nChecklist\\r\\n\\r\\nCheck
the PR satisfies following conditions.\r\n\\r\\n\\r\\nReviewers should
verify this PR satisfies this list as\r\nwell.\\r\\n\\r\\n- [ ] Any text
added follows
[EUI's\r\nwriting\\r\\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),\r\nuses\\r\\nsentence
case text and
includes\r\n[i18n\\r\\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\\r\\n-\r\n[\r\n]\\r\\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\\r\\nwas\r\nadded
for features that require explanation or tutorials\\r\\n- [ ]
[Unit\r\nor\r\nfunctional\\r\\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\\r\\nwere\r\nupdated
or added to match the most common scenarios\\r\\n- [ ] If a
plugin\r\nconfiguration key changed, check if it needs to
be\\r\\nallowlisted in the\r\ncloud and added to
the\r\n[docker\\r\\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\\r\\n-\r\n[
] This was checked for breaking HTTP API changes, and
any\r\nbreaking\\r\\nchanges have been approved by the breaking-change
committee.\r\nThe\\r\\n`release_note:breaking` label should be applied
in these\r\nsituations.\\r\\n- [ ]
[Flaky\r\nTest\\r\\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)\r\nwas\\r\\nused
on any tests changed\\r\\n- [ ] The PR description includes\r\nthe
appropriate Release Notes section,\\r\\nand the
correct\r\n`release_note:*` label is applied
per\r\nthe\\r\\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\\r\\n\\r\\n###\r\nIdentify
risks\\r\\n\\r\\nDoes this PR introduce any risks? For
example,\r\nconsider risks like hard\\r\\nto test bugs, performance
regression,\r\npotential of data loss.\\r\\n\\r\\nDescribe the risk, its
severity, and\r\nmitigation for each identified\\r\\nrisk. Invite
stakeholders and evaluate\r\nhow to proceed before merging.\\r\\n\\r\\n-
[ ] [See
some\r\nrisk\\r\\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\\r\\n-\r\n[
]\r\n...\\r\\n\\r\\n\\r\\n-->\",\"sha\":\"effd84dc41c702b0a82631ee5777fed7f14dfb61\"}},\"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/204584\",\"number\":204584,\"mergeCommit\":{\"message\":\"Fix\r\nshare
modal copy embed code (#204584)\\n\\n##
Summary\\r\\n\\r\\nCloses\r\nhttps://github.com//issues/204312\\r\\n\\r\\nThis
PR removes\r\nan unnecessary function, that causes an infinite
render\\r\\nloop
for\r\nvisualisations.\\r\\n\\r\\n\\r\\n##\r\nAfter\\r\\n\\r\\n\\r\\nhttps://github.com/user-attachments/assets/259d238b-c1cf-4d74-bfca-1a6440d0f5cd\\r\\n\\r\\n##\r\nHow
to test\\r\\n- From the left side nav, click the `Visualize
Library`\r\nmenu item,\\r\\nattempt to create a legacy visualisation,
any one of\r\nchoice and attempt\\r\\nsharing said created visualisation
clicking the\r\ncopy embed code should\\r\\nnot result in any error but
rather copy the\r\nembed code with the
visual\\r\\nfeedback.\\r\\n\\r\\n<!--\\r\\n###\r\nChecklist\\r\\n\\r\\nCheck
the PR satisfies following conditions.\r\n\\r\\n\\r\\nReviewers should
verify this PR satisfies this list as\r\nwell.\\r\\n\\r\\n- [ ] Any text
added follows
[EUI's\r\nwriting\\r\\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),\r\nuses\\r\\nsentence
case text and
includes\r\n[i18n\\r\\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\\r\\n-\r\n[\r\n]\\r\\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\\r\\nwas\r\nadded
for features that require explanation or tutorials\\r\\n- [ ]
[Unit\r\nor\r\nfunctional\\r\\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\\r\\nwere\r\nupdated
or added to match the most common scenarios\\r\\n- [ ] If a
plugin\r\nconfiguration key changed, check if it needs to
be\\r\\nallowlisted in the\r\ncloud and added to
the\r\n[docker\\r\\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\\r\\n-\r\n[
] This was checked for breaking HTTP API changes, and
any\r\nbreaking\\r\\nchanges have been approved by the breaking-change
committee.\r\nThe\\r\\n`release_note:breaking` label should be applied
in these\r\nsituations.\\r\\n- [ ]
[Flaky\r\nTest\\r\\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)\r\nwas\\r\\nused
on any tests changed\\r\\n- [ ] The PR description includes\r\nthe
appropriate Release Notes section,\\r\\nand the
correct\r\n`release_note:*` label is applied
per\r\nthe\\r\\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\\r\\n\\r\\n###\r\nIdentify
risks\\r\\n\\r\\nDoes this PR introduce any risks? For
example,\r\nconsider risks like hard\\r\\nto test bugs, performance
regression,\r\npotential of data loss.\\r\\n\\r\\nDescribe the risk, its
severity, and\r\nmitigation for each identified\\r\\nrisk. Invite
stakeholders and evaluate\r\nhow to proceed before merging.\\r\\n\\r\\n-
[ ] [See
some\r\nrisk\\r\\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\\r\\n-\r\n[
]\r\n...\\r\\n\\r\\n\\r\\n-->\",\"sha\":\"effd84dc41c702b0a82631ee5777fed7f14dfb61\"}}]}]\r\nBACKPORT-->\r\n\r\nCo-authored-by:
Eyo O. Eyo
<[email protected]>"}},{"url":"https://github.com/elastic/kibana/pull/204622","number":204622,"branch":"8.17","state":"OPEN"}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <[email protected]>
JoseLuisGJ pushed a commit to JoseLuisGJ/kibana that referenced this pull request Dec 19, 2024
## Summary

Closes elastic#204312

This PR removes an unnecessary function, that causes an infinite render
loop for visualisations.


## After


https://github.com/user-attachments/assets/259d238b-c1cf-4d74-bfca-1a6440d0f5cd

## How to test
- From the left side nav, click the `Visualize Library` menu item,
attempt to create a legacy visualisation, any one of choice and attempt
sharing said created visualisation clicking the copy embed code should
not result in any error but rather copy the embed code with the visual
feedback.

<!--
### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...


-->
@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.

kibanamachine added a commit that referenced this pull request Dec 20, 2024
# Backport

This will backport the following commits from `main` to `8.17`:
- [Fix share modal copy embed code
(#204584)](#204584)

<!--- 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":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-17T17:13:02Z","message":"Fix
share modal copy embed code (#204584)\n\n## Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/204312\r\n\r\nThis PR removes
an unnecessary function, that causes an infinite render\r\nloop for
visualisations.\r\n\r\n\r\n##
After\r\n\r\n\r\nhttps://github.com/user-attachments/assets/259d238b-c1cf-4d74-bfca-1a6440d0f5cd\r\n\r\n##
How to test\r\n- From the left side nav, click the `Visualize Library`
menu item,\r\nattempt to create a legacy visualisation, any one of
choice and attempt\r\nsharing said created visualisation clicking the
copy embed code should\r\nnot result in any error but rather copy the
embed code with the visual\r\nfeedback.\r\n\r\n<!--\r\n###
Checklist\r\n\r\nCheck the PR satisfies following conditions.
\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\r\n- [ ] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [ ] [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- [ ] If a plugin
configuration key changed, check if it needs to be\r\nallowlisted in the
cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\r\nchanges have been approved by the breaking-change committee.
The\r\n`release_note:breaking` label should be applied in these
situations.\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [ ] The PR description includes
the appropriate Release Notes section,\r\nand the correct
`release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n###
Identify risks\r\n\r\nDoes this PR introduce any risks? For example,
consider risks like hard\r\nto test bugs, performance regression,
potential of data loss.\r\n\r\nDescribe the risk, its severity, and
mitigation for each identified\r\nrisk. Invite stakeholders and evaluate
how to proceed before merging.\r\n\r\n- [ ] [See some
risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\r\n-
[ ]
...\r\n\r\n\r\n-->","sha":"effd84dc41c702b0a82631ee5777fed7f14dfb61","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:SharedUX","backport:prev-major"],"title":"Fix
share modal copy embed
code","number":204584,"url":"https://github.com/elastic/kibana/pull/204584","mergeCommit":{"message":"Fix
share modal copy embed code (#204584)\n\n## Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/204312\r\n\r\nThis PR removes
an unnecessary function, that causes an infinite render\r\nloop for
visualisations.\r\n\r\n\r\n##
After\r\n\r\n\r\nhttps://github.com/user-attachments/assets/259d238b-c1cf-4d74-bfca-1a6440d0f5cd\r\n\r\n##
How to test\r\n- From the left side nav, click the `Visualize Library`
menu item,\r\nattempt to create a legacy visualisation, any one of
choice and attempt\r\nsharing said created visualisation clicking the
copy embed code should\r\nnot result in any error but rather copy the
embed code with the visual\r\nfeedback.\r\n\r\n<!--\r\n###
Checklist\r\n\r\nCheck the PR satisfies following conditions.
\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\r\n- [ ] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [ ] [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- [ ] If a plugin
configuration key changed, check if it needs to be\r\nallowlisted in the
cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\r\nchanges have been approved by the breaking-change committee.
The\r\n`release_note:breaking` label should be applied in these
situations.\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [ ] The PR description includes
the appropriate Release Notes section,\r\nand the correct
`release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n###
Identify risks\r\n\r\nDoes this PR introduce any risks? For example,
consider risks like hard\r\nto test bugs, performance regression,
potential of data loss.\r\n\r\nDescribe the risk, its severity, and
mitigation for each identified\r\nrisk. Invite stakeholders and evaluate
how to proceed before merging.\r\n\r\n- [ ] [See some
risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\r\n-
[ ]
...\r\n\r\n\r\n-->","sha":"effd84dc41c702b0a82631ee5777fed7f14dfb61"}},"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/204584","number":204584,"mergeCommit":{"message":"Fix
share modal copy embed code (#204584)\n\n## Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/204312\r\n\r\nThis PR removes
an unnecessary function, that causes an infinite render\r\nloop for
visualisations.\r\n\r\n\r\n##
After\r\n\r\n\r\nhttps://github.com/user-attachments/assets/259d238b-c1cf-4d74-bfca-1a6440d0f5cd\r\n\r\n##
How to test\r\n- From the left side nav, click the `Visualize Library`
menu item,\r\nattempt to create a legacy visualisation, any one of
choice and attempt\r\nsharing said created visualisation clicking the
copy embed code should\r\nnot result in any error but rather copy the
embed code with the visual\r\nfeedback.\r\n\r\n<!--\r\n###
Checklist\r\n\r\nCheck the PR satisfies following conditions.
\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\r\n- [ ] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [ ] [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- [ ] If a plugin
configuration key changed, check if it needs to be\r\nallowlisted in the
cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\r\nchanges have been approved by the breaking-change committee.
The\r\n`release_note:breaking` label should be applied in these
situations.\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [ ] The PR description includes
the appropriate Release Notes section,\r\nand the correct
`release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n###
Identify risks\r\n\r\nDoes this PR introduce any risks? For example,
consider risks like hard\r\nto test bugs, performance regression,
potential of data loss.\r\n\r\nDescribe the risk, its severity, and
mitigation for each identified\r\nrisk. Invite stakeholders and evaluate
how to proceed before merging.\r\n\r\n- [ ] [See some
risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\r\n-
[ ]
...\r\n\r\n\r\n-->","sha":"effd84dc41c702b0a82631ee5777fed7f14dfb61"}}]}]
BACKPORT-->

Co-authored-by: Eyo O. Eyo <[email protected]>
Co-authored-by: Elastic Machine <[email protected]>
@kibanamachine kibanamachine added v8.17.1 and removed backport missing Added to PRs automatically when the are determined to be missing a backport. labels Dec 20, 2024
benakansara pushed a commit to benakansara/kibana that referenced this pull request Jan 2, 2025
## Summary

Closes elastic#204312

This PR removes an unnecessary function, that causes an infinite render
loop for visualisations.


## After


https://github.com/user-attachments/assets/259d238b-c1cf-4d74-bfca-1a6440d0f5cd

## How to test
- From the left side nav, click the `Visualize Library` menu item,
attempt to create a legacy visualisation, any one of choice and attempt
sharing said created visualisation clicking the copy embed code should
not result in any error but rather copy the embed code with the visual
feedback.

<!--
### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...


-->
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Jan 13, 2025
## Summary

Closes elastic#204312

This PR removes an unnecessary function, that causes an infinite render
loop for visualisations.


## After


https://github.com/user-attachments/assets/259d238b-c1cf-4d74-bfca-1a6440d0f5cd

## How to test
- From the left side nav, click the `Visualize Library` menu item,
attempt to create a legacy visualisation, any one of choice and attempt
sharing said created visualisation clicking the copy embed code should
not result in any error but rather copy the embed code with the visual
feedback.

<!--
### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...


-->
viduni94 pushed a commit to viduni94/kibana that referenced this pull request Jan 23, 2025
## Summary

Closes elastic#204312

This PR removes an unnecessary function, that causes an infinite render
loop for visualisations.


## After


https://github.com/user-attachments/assets/259d238b-c1cf-4d74-bfca-1a6440d0f5cd

## How to test
- From the left side nav, click the `Visualize Library` menu item,
attempt to create a legacy visualisation, any one of choice and attempt
sharing said created visualisation clicking the copy embed code should
not result in any error but rather copy the embed code with the visual
feedback.

<!--
### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...


-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-major Backport to (8.x, 8.17, 8.16) the previous major branch and other branches in development release_note:skip Skip the PR/issue when compiling release notes Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) v8.16.3 v8.17.1 v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Visualizations][Legacy] Copy embed code doesn't work
5 participants