[Links] Fix link settings not persisting#211041
Conversation
|
Pinging @elastic/kibana-presentation (Team:Presentation) |
nreese
left a comment
There was a problem hiding this comment.
kibana-presentation changes LGTM, thanks for adding unit tests
code review only
💚 Build Succeeded
Metrics [docs]Async chunks
History
cc @Heenawter |
|
Starting backport for target branches: 8.16, 8.17, 8.18, 8.x https://github.com/elastic/kibana/actions/runs/13317018489 |
Closes elastic#211022 ## Summary This PR fixes a bug with persisting Link options where, because we weren't providing the "initial" state to the options editor, it was always starting with the default state - therefore, editing something **other** than the options would reset the link options back to the default. I tested this in `8.14` and the bug was present there, too - based on [the file history / git blame](https://github.com/elastic/kibana/blame/main/src/platform/plugins/private/links/public/components/editor/link_editor.tsx#L60), this bug has been around from the very beginning 🙈 **Before:** https://github.com/user-attachments/assets/360af02e-ae0f-470c-91a3-a52fc9b3d8c6 **After:** https://github.com/user-attachments/assets/d1e93bfa-566a-4506-99e3-47f92c922d49 ### 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 - [x] 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) (cherry picked from commit c6e6a77)
Closes elastic#211022 ## Summary This PR fixes a bug with persisting Link options where, because we weren't providing the "initial" state to the options editor, it was always starting with the default state - therefore, editing something **other** than the options would reset the link options back to the default. I tested this in `8.14` and the bug was present there, too - based on [the file history / git blame](https://github.com/elastic/kibana/blame/main/src/platform/plugins/private/links/public/components/editor/link_editor.tsx#L60), this bug has been around from the very beginning 🙈 **Before:** https://github.com/user-attachments/assets/360af02e-ae0f-470c-91a3-a52fc9b3d8c6 **After:** https://github.com/user-attachments/assets/d1e93bfa-566a-4506-99e3-47f92c922d49 ### 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 - [x] 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) (cherry picked from commit c6e6a77)
Closes elastic#211022 ## Summary This PR fixes a bug with persisting Link options where, because we weren't providing the "initial" state to the options editor, it was always starting with the default state - therefore, editing something **other** than the options would reset the link options back to the default. I tested this in `8.14` and the bug was present there, too - based on [the file history / git blame](https://github.com/elastic/kibana/blame/main/src/platform/plugins/private/links/public/components/editor/link_editor.tsx#L60), this bug has been around from the very beginning 🙈 **Before:** https://github.com/user-attachments/assets/360af02e-ae0f-470c-91a3-a52fc9b3d8c6 **After:** https://github.com/user-attachments/assets/d1e93bfa-566a-4506-99e3-47f92c922d49 ### 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 - [x] 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) (cherry picked from commit c6e6a77) # Conflicts: # src/plugins/links/public/components/editor/link_editor.test.tsx
Closes elastic#211022 ## Summary This PR fixes a bug with persisting Link options where, because we weren't providing the "initial" state to the options editor, it was always starting with the default state - therefore, editing something **other** than the options would reset the link options back to the default. I tested this in `8.14` and the bug was present there, too - based on [the file history / git blame](https://github.com/elastic/kibana/blame/main/src/platform/plugins/private/links/public/components/editor/link_editor.tsx#L60), this bug has been around from the very beginning 🙈 **Before:** https://github.com/user-attachments/assets/360af02e-ae0f-470c-91a3-a52fc9b3d8c6 **After:** https://github.com/user-attachments/assets/d1e93bfa-566a-4506-99e3-47f92c922d49 ### 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 - [x] 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) (cherry picked from commit c6e6a77) # Conflicts: # src/platform/plugins/shared/presentation_util/public/components/dashboard_drilldown_options/dashboard_drilldown_options.tsx # src/plugins/links/public/components/editor/link_editor.test.tsx
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
Closes elastic#211022 ## Summary This PR fixes a bug with persisting Link options where, because we weren't providing the "initial" state to the options editor, it was always starting with the default state - therefore, editing something **other** than the options would reset the link options back to the default. I tested this in `8.14` and the bug was present there, too - based on [the file history / git blame](https://github.com/elastic/kibana/blame/main/src/platform/plugins/private/links/public/components/editor/link_editor.tsx#L60), this bug has been around from the very beginning 🙈 **Before:** https://github.com/user-attachments/assets/360af02e-ae0f-470c-91a3-a52fc9b3d8c6 **After:** https://github.com/user-attachments/assets/d1e93bfa-566a-4506-99e3-47f92c922d49 ### 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 - [x] 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) (cherry picked from commit c6e6a77)
# Backport This will backport the following commits from `main` to `8.18`: - [[Links] Fix link settings not persisting (#211041)](#211041) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Hannah Mudge","email":"Heenawter@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-02-13T21:03:31Z","message":"[Links] Fix link settings not persisting (#211041)\n\nCloses https://github.com/elastic/kibana/issues/211022\r\n\r\n## Summary\r\n\r\nThis PR fixes a bug with persisting Link options where, because we\r\nweren't providing the \"initial\" state to the options editor, it was\r\nalways starting with the default state - therefore, editing something\r\n**other** than the options would reset the link options back to the\r\ndefault.\r\n\r\nI tested this in `8.14` and the bug was present there, too - based on\r\n[the file history / git\r\nblame](https://github.com/elastic/kibana/blame/main/src/platform/plugins/private/links/public/components/editor/link_editor.tsx#L60),\r\nthis bug has been around from the very beginning 🙈\r\n\r\n**Before:**\r\n\r\n\r\nhttps://github.com/user-attachments/assets/360af02e-ae0f-470c-91a3-a52fc9b3d8c6\r\n\r\n\r\n**After:**\r\n\r\n\r\nhttps://github.com/user-attachments/assets/d1e93bfa-566a-4506-99e3-47f92c922d49\r\n\r\n\r\n\r\n### 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- [x] 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)","sha":"c6e6a77c546450af30936fdedeef93221f83d291","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Presentation","loe:small","impact:low","backport:prev-major","Project:Dashboard Navigation","v9.1.0"],"title":"[Links] Fix link settings not persisting","number":211041,"url":"https://github.com/elastic/kibana/pull/211041","mergeCommit":{"message":"[Links] Fix link settings not persisting (#211041)\n\nCloses https://github.com/elastic/kibana/issues/211022\r\n\r\n## Summary\r\n\r\nThis PR fixes a bug with persisting Link options where, because we\r\nweren't providing the \"initial\" state to the options editor, it was\r\nalways starting with the default state - therefore, editing something\r\n**other** than the options would reset the link options back to the\r\ndefault.\r\n\r\nI tested this in `8.14` and the bug was present there, too - based on\r\n[the file history / git\r\nblame](https://github.com/elastic/kibana/blame/main/src/platform/plugins/private/links/public/components/editor/link_editor.tsx#L60),\r\nthis bug has been around from the very beginning 🙈\r\n\r\n**Before:**\r\n\r\n\r\nhttps://github.com/user-attachments/assets/360af02e-ae0f-470c-91a3-a52fc9b3d8c6\r\n\r\n\r\n**After:**\r\n\r\n\r\nhttps://github.com/user-attachments/assets/d1e93bfa-566a-4506-99e3-47f92c922d49\r\n\r\n\r\n\r\n### 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- [x] 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)","sha":"c6e6a77c546450af30936fdedeef93221f83d291"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/211041","number":211041,"mergeCommit":{"message":"[Links] Fix link settings not persisting (#211041)\n\nCloses https://github.com/elastic/kibana/issues/211022\r\n\r\n## Summary\r\n\r\nThis PR fixes a bug with persisting Link options where, because we\r\nweren't providing the \"initial\" state to the options editor, it was\r\nalways starting with the default state - therefore, editing something\r\n**other** than the options would reset the link options back to the\r\ndefault.\r\n\r\nI tested this in `8.14` and the bug was present there, too - based on\r\n[the file history / git\r\nblame](https://github.com/elastic/kibana/blame/main/src/platform/plugins/private/links/public/components/editor/link_editor.tsx#L60),\r\nthis bug has been around from the very beginning 🙈\r\n\r\n**Before:**\r\n\r\n\r\nhttps://github.com/user-attachments/assets/360af02e-ae0f-470c-91a3-a52fc9b3d8c6\r\n\r\n\r\n**After:**\r\n\r\n\r\nhttps://github.com/user-attachments/assets/d1e93bfa-566a-4506-99e3-47f92c922d49\r\n\r\n\r\n\r\n### 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- [x] 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)","sha":"c6e6a77c546450af30936fdedeef93221f83d291"}}]}] BACKPORT--> Co-authored-by: Hannah Mudge <Heenawter@users.noreply.github.com>
# Backport This will backport the following commits from `main` to `8.x`: - [[Links] Fix link settings not persisting (#211041)](#211041) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Hannah Mudge","email":"Heenawter@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-02-13T21:03:31Z","message":"[Links] Fix link settings not persisting (#211041)\n\nCloses https://github.com/elastic/kibana/issues/211022\r\n\r\n## Summary\r\n\r\nThis PR fixes a bug with persisting Link options where, because we\r\nweren't providing the \"initial\" state to the options editor, it was\r\nalways starting with the default state - therefore, editing something\r\n**other** than the options would reset the link options back to the\r\ndefault.\r\n\r\nI tested this in `8.14` and the bug was present there, too - based on\r\n[the file history / git\r\nblame](https://github.com/elastic/kibana/blame/main/src/platform/plugins/private/links/public/components/editor/link_editor.tsx#L60),\r\nthis bug has been around from the very beginning 🙈\r\n\r\n**Before:**\r\n\r\n\r\nhttps://github.com/user-attachments/assets/360af02e-ae0f-470c-91a3-a52fc9b3d8c6\r\n\r\n\r\n**After:**\r\n\r\n\r\nhttps://github.com/user-attachments/assets/d1e93bfa-566a-4506-99e3-47f92c922d49\r\n\r\n\r\n\r\n### 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- [x] 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)","sha":"c6e6a77c546450af30936fdedeef93221f83d291","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Presentation","loe:small","impact:low","backport:prev-major","Project:Dashboard Navigation","v9.1.0"],"title":"[Links] Fix link settings not persisting","number":211041,"url":"https://github.com/elastic/kibana/pull/211041","mergeCommit":{"message":"[Links] Fix link settings not persisting (#211041)\n\nCloses https://github.com/elastic/kibana/issues/211022\r\n\r\n## Summary\r\n\r\nThis PR fixes a bug with persisting Link options where, because we\r\nweren't providing the \"initial\" state to the options editor, it was\r\nalways starting with the default state - therefore, editing something\r\n**other** than the options would reset the link options back to the\r\ndefault.\r\n\r\nI tested this in `8.14` and the bug was present there, too - based on\r\n[the file history / git\r\nblame](https://github.com/elastic/kibana/blame/main/src/platform/plugins/private/links/public/components/editor/link_editor.tsx#L60),\r\nthis bug has been around from the very beginning 🙈\r\n\r\n**Before:**\r\n\r\n\r\nhttps://github.com/user-attachments/assets/360af02e-ae0f-470c-91a3-a52fc9b3d8c6\r\n\r\n\r\n**After:**\r\n\r\n\r\nhttps://github.com/user-attachments/assets/d1e93bfa-566a-4506-99e3-47f92c922d49\r\n\r\n\r\n\r\n### 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- [x] 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)","sha":"c6e6a77c546450af30936fdedeef93221f83d291"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/211041","number":211041,"mergeCommit":{"message":"[Links] Fix link settings not persisting (#211041)\n\nCloses https://github.com/elastic/kibana/issues/211022\r\n\r\n## Summary\r\n\r\nThis PR fixes a bug with persisting Link options where, because we\r\nweren't providing the \"initial\" state to the options editor, it was\r\nalways starting with the default state - therefore, editing something\r\n**other** than the options would reset the link options back to the\r\ndefault.\r\n\r\nI tested this in `8.14` and the bug was present there, too - based on\r\n[the file history / git\r\nblame](https://github.com/elastic/kibana/blame/main/src/platform/plugins/private/links/public/components/editor/link_editor.tsx#L60),\r\nthis bug has been around from the very beginning 🙈\r\n\r\n**Before:**\r\n\r\n\r\nhttps://github.com/user-attachments/assets/360af02e-ae0f-470c-91a3-a52fc9b3d8c6\r\n\r\n\r\n**After:**\r\n\r\n\r\nhttps://github.com/user-attachments/assets/d1e93bfa-566a-4506-99e3-47f92c922d49\r\n\r\n\r\n\r\n### 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- [x] 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)","sha":"c6e6a77c546450af30936fdedeef93221f83d291"}}]}] BACKPORT--> Co-authored-by: Hannah Mudge <Heenawter@users.noreply.github.com>
|
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. |
1 similar comment
|
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. |
# Backport This will backport the following commits from `main` to `9.0`: - [[Links] Fix link settings not persisting (#211041)](#211041) <!--- Backport version: 9.6.4 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Hannah Mudge","email":"Heenawter@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-02-13T21:03:31Z","message":"[Links] Fix link settings not persisting (#211041)\n\nCloses https://github.com/elastic/kibana/issues/211022\r\n\r\n## Summary\r\n\r\nThis PR fixes a bug with persisting Link options where, because we\r\nweren't providing the \"initial\" state to the options editor, it was\r\nalways starting with the default state - therefore, editing something\r\n**other** than the options would reset the link options back to the\r\ndefault.\r\n\r\nI tested this in `8.14` and the bug was present there, too - based on\r\n[the file history / git\r\nblame](https://github.com/elastic/kibana/blame/main/src/platform/plugins/private/links/public/components/editor/link_editor.tsx#L60),\r\nthis bug has been around from the very beginning 🙈\r\n\r\n**Before:**\r\n\r\n\r\nhttps://github.com/user-attachments/assets/360af02e-ae0f-470c-91a3-a52fc9b3d8c6\r\n\r\n\r\n**After:**\r\n\r\n\r\nhttps://github.com/user-attachments/assets/d1e93bfa-566a-4506-99e3-47f92c922d49\r\n\r\n\r\n\r\n### 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- [x] 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)","sha":"c6e6a77c546450af30936fdedeef93221f83d291","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Presentation","loe:small","impact:low","backport:prev-major","Project:Dashboard Navigation","v9.1.0"],"title":"[Links] Fix link settings not persisting","number":211041,"url":"https://github.com/elastic/kibana/pull/211041","mergeCommit":{"message":"[Links] Fix link settings not persisting (#211041)\n\nCloses https://github.com/elastic/kibana/issues/211022\r\n\r\n## Summary\r\n\r\nThis PR fixes a bug with persisting Link options where, because we\r\nweren't providing the \"initial\" state to the options editor, it was\r\nalways starting with the default state - therefore, editing something\r\n**other** than the options would reset the link options back to the\r\ndefault.\r\n\r\nI tested this in `8.14` and the bug was present there, too - based on\r\n[the file history / git\r\nblame](https://github.com/elastic/kibana/blame/main/src/platform/plugins/private/links/public/components/editor/link_editor.tsx#L60),\r\nthis bug has been around from the very beginning 🙈\r\n\r\n**Before:**\r\n\r\n\r\nhttps://github.com/user-attachments/assets/360af02e-ae0f-470c-91a3-a52fc9b3d8c6\r\n\r\n\r\n**After:**\r\n\r\n\r\nhttps://github.com/user-attachments/assets/d1e93bfa-566a-4506-99e3-47f92c922d49\r\n\r\n\r\n\r\n### 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- [x] 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)","sha":"c6e6a77c546450af30936fdedeef93221f83d291"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/211041","number":211041,"mergeCommit":{"message":"[Links] Fix link settings not persisting (#211041)\n\nCloses https://github.com/elastic/kibana/issues/211022\r\n\r\n## Summary\r\n\r\nThis PR fixes a bug with persisting Link options where, because we\r\nweren't providing the \"initial\" state to the options editor, it was\r\nalways starting with the default state - therefore, editing something\r\n**other** than the options would reset the link options back to the\r\ndefault.\r\n\r\nI tested this in `8.14` and the bug was present there, too - based on\r\n[the file history / git\r\nblame](https://github.com/elastic/kibana/blame/main/src/platform/plugins/private/links/public/components/editor/link_editor.tsx#L60),\r\nthis bug has been around from the very beginning 🙈\r\n\r\n**Before:**\r\n\r\n\r\nhttps://github.com/user-attachments/assets/360af02e-ae0f-470c-91a3-a52fc9b3d8c6\r\n\r\n\r\n**After:**\r\n\r\n\r\nhttps://github.com/user-attachments/assets/d1e93bfa-566a-4506-99e3-47f92c922d49\r\n\r\n\r\n\r\n### 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- [x] 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)","sha":"c6e6a77c546450af30936fdedeef93221f83d291"}},{"url":"https://github.com/elastic/kibana/pull/211103","number":211103,"branch":"8.18","state":"OPEN"},{"url":"https://github.com/elastic/kibana/pull/211104","number":211104,"branch":"8.x","state":"OPEN"},{"url":"https://github.com/elastic/kibana/pull/211106","number":211106,"branch":"8.17","state":"OPEN"},{"url":"https://github.com/elastic/kibana/pull/211107","number":211107,"branch":"8.16","state":"OPEN"}]}] BACKPORT-->
# Backport This will backport the following commits from `main` to `8.17`: - [[Links] Fix link settings not persisting (#211041)](#211041) <!--- Backport version: 9.6.4 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Hannah Mudge","email":"Heenawter@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-02-13T21:03:31Z","message":"[Links] Fix link settings not persisting (#211041)\n\nCloses https://github.com/elastic/kibana/issues/211022\r\n\r\n## Summary\r\n\r\nThis PR fixes a bug with persisting Link options where, because we\r\nweren't providing the \"initial\" state to the options editor, it was\r\nalways starting with the default state - therefore, editing something\r\n**other** than the options would reset the link options back to the\r\ndefault.\r\n\r\nI tested this in `8.14` and the bug was present there, too - based on\r\n[the file history / git\r\nblame](https://github.com/elastic/kibana/blame/main/src/platform/plugins/private/links/public/components/editor/link_editor.tsx#L60),\r\nthis bug has been around from the very beginning 🙈\r\n\r\n**Before:**\r\n\r\n\r\nhttps://github.com/user-attachments/assets/360af02e-ae0f-470c-91a3-a52fc9b3d8c6\r\n\r\n\r\n**After:**\r\n\r\n\r\nhttps://github.com/user-attachments/assets/d1e93bfa-566a-4506-99e3-47f92c922d49\r\n\r\n\r\n\r\n### 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- [x] 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)","sha":"c6e6a77c546450af30936fdedeef93221f83d291","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Presentation","loe:small","impact:low","backport:prev-major","Project:Dashboard Navigation","v9.1.0"],"title":"[Links] Fix link settings not persisting","number":211041,"url":"https://github.com/elastic/kibana/pull/211041","mergeCommit":{"message":"[Links] Fix link settings not persisting (#211041)\n\nCloses https://github.com/elastic/kibana/issues/211022\r\n\r\n## Summary\r\n\r\nThis PR fixes a bug with persisting Link options where, because we\r\nweren't providing the \"initial\" state to the options editor, it was\r\nalways starting with the default state - therefore, editing something\r\n**other** than the options would reset the link options back to the\r\ndefault.\r\n\r\nI tested this in `8.14` and the bug was present there, too - based on\r\n[the file history / git\r\nblame](https://github.com/elastic/kibana/blame/main/src/platform/plugins/private/links/public/components/editor/link_editor.tsx#L60),\r\nthis bug has been around from the very beginning 🙈\r\n\r\n**Before:**\r\n\r\n\r\nhttps://github.com/user-attachments/assets/360af02e-ae0f-470c-91a3-a52fc9b3d8c6\r\n\r\n\r\n**After:**\r\n\r\n\r\nhttps://github.com/user-attachments/assets/d1e93bfa-566a-4506-99e3-47f92c922d49\r\n\r\n\r\n\r\n### 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- [x] 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)","sha":"c6e6a77c546450af30936fdedeef93221f83d291"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/211041","number":211041,"mergeCommit":{"message":"[Links] Fix link settings not persisting (#211041)\n\nCloses https://github.com/elastic/kibana/issues/211022\r\n\r\n## Summary\r\n\r\nThis PR fixes a bug with persisting Link options where, because we\r\nweren't providing the \"initial\" state to the options editor, it was\r\nalways starting with the default state - therefore, editing something\r\n**other** than the options would reset the link options back to the\r\ndefault.\r\n\r\nI tested this in `8.14` and the bug was present there, too - based on\r\n[the file history / git\r\nblame](https://github.com/elastic/kibana/blame/main/src/platform/plugins/private/links/public/components/editor/link_editor.tsx#L60),\r\nthis bug has been around from the very beginning 🙈\r\n\r\n**Before:**\r\n\r\n\r\nhttps://github.com/user-attachments/assets/360af02e-ae0f-470c-91a3-a52fc9b3d8c6\r\n\r\n\r\n**After:**\r\n\r\n\r\nhttps://github.com/user-attachments/assets/d1e93bfa-566a-4506-99e3-47f92c922d49\r\n\r\n\r\n\r\n### 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- [x] 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)","sha":"c6e6a77c546450af30936fdedeef93221f83d291"}},{"url":"https://github.com/elastic/kibana/pull/211103","number":211103,"branch":"8.18","state":"OPEN"},{"url":"https://github.com/elastic/kibana/pull/211104","number":211104,"branch":"8.x","state":"OPEN"}]}] BACKPORT-->
# Backport This will backport the following commits from `main` to `8.16`: - [[Links] Fix link settings not persisting (#211041)](#211041) <!--- Backport version: 9.6.4 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Hannah Mudge","email":"Heenawter@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-02-13T21:03:31Z","message":"[Links] Fix link settings not persisting (#211041)\n\nCloses https://github.com/elastic/kibana/issues/211022\r\n\r\n## Summary\r\n\r\nThis PR fixes a bug with persisting Link options where, because we\r\nweren't providing the \"initial\" state to the options editor, it was\r\nalways starting with the default state - therefore, editing something\r\n**other** than the options would reset the link options back to the\r\ndefault.\r\n\r\nI tested this in `8.14` and the bug was present there, too - based on\r\n[the file history / git\r\nblame](https://github.com/elastic/kibana/blame/main/src/platform/plugins/private/links/public/components/editor/link_editor.tsx#L60),\r\nthis bug has been around from the very beginning 🙈\r\n\r\n**Before:**\r\n\r\n\r\nhttps://github.com/user-attachments/assets/360af02e-ae0f-470c-91a3-a52fc9b3d8c6\r\n\r\n\r\n**After:**\r\n\r\n\r\nhttps://github.com/user-attachments/assets/d1e93bfa-566a-4506-99e3-47f92c922d49\r\n\r\n\r\n\r\n### 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- [x] 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)","sha":"c6e6a77c546450af30936fdedeef93221f83d291","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Presentation","loe:small","impact:low","backport:prev-major","Project:Dashboard Navigation","v9.1.0"],"title":"[Links] Fix link settings not persisting","number":211041,"url":"https://github.com/elastic/kibana/pull/211041","mergeCommit":{"message":"[Links] Fix link settings not persisting (#211041)\n\nCloses https://github.com/elastic/kibana/issues/211022\r\n\r\n## Summary\r\n\r\nThis PR fixes a bug with persisting Link options where, because we\r\nweren't providing the \"initial\" state to the options editor, it was\r\nalways starting with the default state - therefore, editing something\r\n**other** than the options would reset the link options back to the\r\ndefault.\r\n\r\nI tested this in `8.14` and the bug was present there, too - based on\r\n[the file history / git\r\nblame](https://github.com/elastic/kibana/blame/main/src/platform/plugins/private/links/public/components/editor/link_editor.tsx#L60),\r\nthis bug has been around from the very beginning 🙈\r\n\r\n**Before:**\r\n\r\n\r\nhttps://github.com/user-attachments/assets/360af02e-ae0f-470c-91a3-a52fc9b3d8c6\r\n\r\n\r\n**After:**\r\n\r\n\r\nhttps://github.com/user-attachments/assets/d1e93bfa-566a-4506-99e3-47f92c922d49\r\n\r\n\r\n\r\n### 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- [x] 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)","sha":"c6e6a77c546450af30936fdedeef93221f83d291"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/211041","number":211041,"mergeCommit":{"message":"[Links] Fix link settings not persisting (#211041)\n\nCloses https://github.com/elastic/kibana/issues/211022\r\n\r\n## Summary\r\n\r\nThis PR fixes a bug with persisting Link options where, because we\r\nweren't providing the \"initial\" state to the options editor, it was\r\nalways starting with the default state - therefore, editing something\r\n**other** than the options would reset the link options back to the\r\ndefault.\r\n\r\nI tested this in `8.14` and the bug was present there, too - based on\r\n[the file history / git\r\nblame](https://github.com/elastic/kibana/blame/main/src/platform/plugins/private/links/public/components/editor/link_editor.tsx#L60),\r\nthis bug has been around from the very beginning 🙈\r\n\r\n**Before:**\r\n\r\n\r\nhttps://github.com/user-attachments/assets/360af02e-ae0f-470c-91a3-a52fc9b3d8c6\r\n\r\n\r\n**After:**\r\n\r\n\r\nhttps://github.com/user-attachments/assets/d1e93bfa-566a-4506-99e3-47f92c922d49\r\n\r\n\r\n\r\n### 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- [x] 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)","sha":"c6e6a77c546450af30936fdedeef93221f83d291"}},{"url":"https://github.com/elastic/kibana/pull/211103","number":211103,"branch":"8.18","state":"OPEN"},{"url":"https://github.com/elastic/kibana/pull/211104","number":211104,"branch":"8.x","state":"OPEN"}]}] BACKPORT-->
Closes elastic#211022 ## Summary This PR fixes a bug with persisting Link options where, because we weren't providing the "initial" state to the options editor, it was always starting with the default state - therefore, editing something **other** than the options would reset the link options back to the default. I tested this in `8.14` and the bug was present there, too - based on [the file history / git blame](https://github.com/elastic/kibana/blame/main/src/platform/plugins/private/links/public/components/editor/link_editor.tsx#L60), this bug has been around from the very beginning 🙈 **Before:** https://github.com/user-attachments/assets/360af02e-ae0f-470c-91a3-a52fc9b3d8c6 **After:** https://github.com/user-attachments/assets/d1e93bfa-566a-4506-99e3-47f92c922d49 ### 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 - [x] 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)
Closes #211022
Summary
This PR fixes a bug with persisting Link options where, because we weren't providing the "initial" state to the options editor, it was always starting with the default state - therefore, editing something other than the options would reset the link options back to the default.
I tested this in
8.14and the bug was present there, too - based on the file history / git blame, this bug has been around from the very beginning 🙈Before:
Screen.Recording.2025-02-13.at.12.10.44.PM.mov
After:
Screen.Recording.2025-02-13.at.12.07.23.PM.mov
Checklist
release_note:*label is applied per the guidelines