[Dashboard navigation] Inject/extract references#164330
[Dashboard navigation] Inject/extract references#164330nickpeihl merged 7 commits intoelastic:navigation-embeddablefrom
Conversation
…able' into navEmbeddable-references
|
Pinging @elastic/kibana-presentation (Team:Presentation) |
src/plugins/navigation_embeddable/common/persistable_state/references.ts
Outdated
Show resolved
Hide resolved
Heenawter
left a comment
There was a problem hiding this comment.
Tested by-reference links panel (via the steps outlined in the PR description) + tested by-value links panels by importing/copying a dashboard with a by-value link panel. Everything worked as expected, and relationships stayed intact 🎉
Left a comment WRT not having a refName property - personally, I find it a bit confusing, especially when trying to trace the tests? But ultimately I'm good either way 👍
src/plugins/navigation_embeddable/common/persistable_state/references.ts
Outdated
Show resolved
Hide resolved
Heenawter
left a comment
There was a problem hiding this comment.
Thanks so much for making the refName separate - it made things so much easier to follow IMO 💃 I left one question WRT the external link supported protocols constant, but otherwise looks great!!
| export const NAV_HORIZONTAL_LAYOUT = 'horizontal'; | ||
| export const NAV_VERTICAL_LAYOUT = 'vertical'; | ||
|
|
||
| export const EXTERNAL_LINK_SUPPORTED_PROTOCOLS = ['http', 'https']; |
There was a problem hiding this comment.
Should we add mailto to this? We allow mailto for URL drilldowns, and I am using the exact same Regex match for external links so they do as well 🤔
| { | ||
| type: 'dashboardLink', | ||
| id: 'fc7b8c70-2eb9-40b2-936d-457d1721a438', | ||
| destinationRefName: 'link_fc7b8c70-2eb9-40b2-936d-457d1721a438_dashboard', |
There was a problem hiding this comment.
This small change makes the tests so much easier to follow - my brain thanks you, hahahah 🤣
And some minor fixes
Heenawter
left a comment
There was a problem hiding this comment.
Approving based on most recent mailto changes 🎉
💔 Build FailedFailed CI Steps
Test Failures
Metrics [docs]
History
To update your PR or re-run it, just comment with: |
Fixes #154363
Summary
Extracts and injects references to Dashboards in Link panels to allow sharing / importing to other Spaces.
To test this:
referencesarray should contain objects for each dashboard.attributes.links[].destinationproperty should be a string in the format oflinks_<someuuid>_dashboard. This string should match one of thereferences[].id.