Skip to content

[8.19] Fix "now" and mixed format date handling in share modal (#245539)#245846

Merged
kowalczyk-krzysztof merged 3 commits intoelastic:8.19from
kowalczyk-krzysztof:backport/8.19/pr-245539
Dec 10, 2025
Merged

[8.19] Fix "now" and mixed format date handling in share modal (#245539)#245846
kowalczyk-krzysztof merged 3 commits intoelastic:8.19from
kowalczyk-krzysztof:backport/8.19/pr-245539

Conversation

@kowalczyk-krzysztof
Copy link
Member

Backport

This will backport the following commits from main to 8.19:

Questions ?

Please refer to the Backport tool documentation

## Summary

This PR fixes a bug where mixed dates (e.g one absolute and one
relative) wouldn't work properly and "now" was rendering as 0 seconds in
share modal date switcher.

<img width="494" height="432" alt="Screenshot 2025-12-09 at 13 13 05"
src="https://github.com/user-attachments/assets/4d5eb332-7329-40be-b725-97cf5020b73a"
/>

It also makes `ShareableUrlLocatorParams` strongly typed, requiring
`timeRange` to be always present even if it has an undefined value, in
response to a regression where dashboard time range parameter name was
renamed to be snake_case, which broke the functionality as
`TimeTypeSection` would always expect `timeRange`.

Closes: elastic#241084

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit bae752e)

# Conflicts:
#	src/platform/plugins/shared/discover/public/application/main/components/top_nav/app_menu_actions/get_share.tsx
#	src/platform/plugins/shared/share/moon.yml
#	src/platform/plugins/shared/share/public/components/share_context_menu.tsx
#	src/platform/plugins/shared/share/public/components/tabs/link/time_type_section.tsx
#	src/platform/plugins/shared/share/public/components/url_panel_content.tsx
#	src/platform/plugins/shared/share/tsconfig.json
@bhavyarm bhavyarm self-requested a review December 10, 2025 18:14
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

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

@kowalczyk-krzysztof kowalczyk-krzysztof merged commit 5e60ca0 into elastic:8.19 Dec 10, 2025
12 checks passed
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
share 94 95 +1

Async chunks

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

id before after diff
dashboard 704.4KB 704.4KB +61.0B
discover 1.1MB 1.1MB +15.0B
total +76.0B

Page load bundle

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

id before after diff
share 56.8KB 56.1KB -694.0B
Unknown metric groups

API count

id before after diff
share 160 161 +1

History

@kowalczyk-krzysztof kowalczyk-krzysztof self-assigned this Dec 10, 2025
@kowalczyk-krzysztof kowalczyk-krzysztof deleted the backport/8.19/pr-245539 branch December 10, 2025 21:27
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

4 participants