[Sharing URLs] Add the ability to switch between relative and absolute time range#218056
Conversation
tsullivan
left a comment
There was a problem hiding this comment.
This working very well!
I left a few comments about the content strings in the new component.
In regards to this only working in Discover, it sounds like there should be an issue filed on requiring (shareableUrlLocatorParams in toggleShareContextMenu. This could get more crossed over with the coming changes from Sharing Modal Architecture, so maybe it's just something to keep an eye on. cc @eokoneyo
Last comment, I think we should run this by @ek-so, to give final approval on the design. (1) The increased amount of text makes this feel a little unfriendly (2) when absolute time range is the forced default, simply having a disabled checkbox doesn't make it entirely clear:
|
For this to work on dashboards, a dashboard server-side locator is needed. There's a draft PR for this: #218495 |
|
Pinging @elastic/appex-sharedux (Team:SharedUX) |
tsullivan
left a comment
There was a problem hiding this comment.
Seems like the time utils function is not working correctly if the time string has /d
https://www.elastic.co/guide/en/elasticsearch/reference/8.x/common-options.html#date-math
tsullivan
left a comment
There was a problem hiding this comment.
LGTM! Thanks for going through all of the feedback :)
| ...inputParams, | ||
| params: { | ||
| ...inputParams.params, | ||
| timeRange: { |
There was a problem hiding this comment.
I'm a little concerned that were injecting a timeRange on the LocatorParams even if the timeRange const on line 83 could be undefined such as in DashboardLocatorParams. Would it be possible to make the conditional something like if (isAbsoluteTime && timeRange) {
There was a problem hiding this comment.
Sure, updated the condition to be safe.
nickpeihl
left a comment
There was a problem hiding this comment.
lgtm! code review and tested sharing absolute and relative links on dashboards
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
Page load bundle
History
|
|
Starting backport for target branches: 8.19 https://github.com/elastic/kibana/actions/runs/14740659195 |
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
…e time range (elastic#218056) ## Summary This PR adds the ability to switch between relative and absolute time range for short links in Share Modal. By default "absolute time" is pre-selected.    Closes: elastic#189156 --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…e time range (elastic#218056) ## Summary This PR adds the ability to switch between relative and absolute time range for short links in Share Modal. By default "absolute time" is pre-selected.    Closes: elastic#189156 --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 6ab7593) # Conflicts: # src/platform/plugins/shared/share/public/components/tabs/link/link_content.tsx
…absolute time range (#218056) (#219755) # Backport This will backport the following commits from `main` to `8.19`: - [[Sharing URLs] Add the ability to switch between relative and absolute time range (#218056)](#218056) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Krzysztof Kowalczyk","email":"krzysztof.kowalczyk@elastic.co"},"sourceCommit":{"committedDate":"2025-04-29T20:25:38Z","message":"[Sharing URLs] Add the ability to switch between relative and absolute time range (#218056)\n\n## Summary\n\nThis PR adds the ability to switch between relative and absolute time\nrange for short links in Share Modal. By default \"absolute time\" is\npre-selected.\n\n\n\n\n\n\nCloses: #189156\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"6ab7593fe0b0f1e93dd7f62ca0443a8d05b54faa","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","enhancement","Feature:SharingURLs","Team:SharedUX","backport:version","v9.1.0","v8.19.0"],"title":"[Sharing URLs] Add the ability to switch between relative and absolute time range","number":218056,"url":"https://github.com/elastic/kibana/pull/218056","mergeCommit":{"message":"[Sharing URLs] Add the ability to switch between relative and absolute time range (#218056)\n\n## Summary\n\nThis PR adds the ability to switch between relative and absolute time\nrange for short links in Share Modal. By default \"absolute time\" is\npre-selected.\n\n\n\n\n\n\nCloses: #189156\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"6ab7593fe0b0f1e93dd7f62ca0443a8d05b54faa"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/218056","number":218056,"mergeCommit":{"message":"[Sharing URLs] Add the ability to switch between relative and absolute time range (#218056)\n\n## Summary\n\nThis PR adds the ability to switch between relative and absolute time\nrange for short links in Share Modal. By default \"absolute time\" is\npre-selected.\n\n\n\n\n\n\nCloses: #189156\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"6ab7593fe0b0f1e93dd7f62ca0443a8d05b54faa"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
…e time range (#218056) ## Summary This PR adds the ability to switch between relative and absolute time range for short links in Share Modal. By default "absolute time" is pre-selected.    Closes: #189156 --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
…e time range (elastic#218056) ## Summary This PR adds the ability to switch between relative and absolute time range for short links in Share Modal. By default "absolute time" is pre-selected.    Closes: elastic#189156 --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Summary
This PR adds the ability to switch between relative and absolute time range for short links in Share Modal. By default "absolute time" is pre-selected.
Closes: #189156