Skip to content

[8.16] [Links] Fix link settings not persisting (#211041)#211107

Merged
Heenawter merged 3 commits intoelastic:8.16from
Heenawter:backport/8.16/pr-211041
Feb 18, 2025
Merged

[8.16] [Links] Fix link settings not persisting (#211041)#211107
Heenawter merged 3 commits intoelastic:8.16from
Heenawter:backport/8.16/pr-211041

Conversation

@Heenawter
Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 8.16:

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)

# 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
@Heenawter Heenawter added the backport This PR is a backport of another PR label Feb 13, 2025
@Heenawter Heenawter enabled auto-merge (squash) February 13, 2025 21:46
@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #54 / Alerting builtin alertTypes circuit_breakers index threshold rule that hits max alerts circuit breaker persist existing alerts to next execution if circuit breaker is hit

Metrics [docs]

Async chunks

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

id before after diff
links 52.4KB 52.5KB +74.0B
presentationUtil 87.3KB 87.4KB +45.0B
total +119.0B

History

@Heenawter Heenawter merged commit 526a7b7 into elastic:8.16 Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants