Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix time picker not to show [object Object] #182152

Merged

Conversation

sakurai-youhei
Copy link
Member

@sakurai-youhei sakurai-youhei commented Apr 30, 2024

Summary

This PR fixes one i18n mapping for EUI to render the dateFormat = MMM D, YYYY @ HH:mm:ss.SSS correctly at the bottom.

With i18n.locale: "en":
kibana-bug-fixed-en

With i18n.locale: "zh-CN":
image

With i18n.locale: "ja-JP":
kibana-bug-fixed-ja_JP

With i18n.locale: "fr-FR":
image

Note: It showed [object Object] instead of MMM D, YYYY @ HH:mm:ss.SSS before this fix.

Fixes #182099

Checklist

For maintainers

Release note

Fixes time picker to show allowed formats properly in absolute tabs.

@sakurai-youhei sakurai-youhei added bug Fixes for quality problems that affect the customer experience release_note:fix backport:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) labels Apr 30, 2024
@sakurai-youhei sakurai-youhei requested a review from a team as a code owner April 30, 2024 14:32
@sakurai-youhei sakurai-youhei marked this pull request as draft April 30, 2024 15:43
@sakurai-youhei

This comment was marked as outdated.

@sakurai-youhei sakurai-youhei marked this pull request as ready for review May 3, 2024 01:32
@sakurai-youhei sakurai-youhei marked this pull request as draft May 3, 2024 17:53
@sakurai-youhei sakurai-youhei marked this pull request as ready for review May 4, 2024 05:34
@pgayvallet
Copy link
Contributor

cc @Bamieh

@Bamieh Bamieh self-requested a review May 7, 2024 21:25
@Bamieh
Copy link
Member

Bamieh commented May 7, 2024

Weird how that passed the CI check. I need to pull the code to check tomorrow morning

@Bamieh
Copy link
Member

Bamieh commented May 8, 2024

Hey,

Can you share a screenshot for the [object object]? i ran the main branch and i am getting the correct formatting.

image

Also the values object inside the code looks good.

@sakurai-youhei
Copy link
Member Author

Hi @Bamieh This is a screenshot from the main branch 187ed09.

sakurai@wsl:~/git/kibana$ git log -1
commit 187ed098750c68ee889f1c7c2156f41c163f262f (HEAD -> main, origin/main, origin/HEAD)
Author: Elastic Machine <[email protected]>
Date:   Wed May 8 15:01:26 2024 +0100

    [main] Sync bundled packages with Package Storage (#182938)

    Automated by
    https://buildkite.com/elastic/package-storage-infra-kibana-discover-release-branches/builds/677

image

Because the dateFormat is a react component, i18n.translate() returns a string containing [object Object].

image

Copy link
Member

@Bamieh Bamieh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thank you.

@Bamieh
Copy link
Member

Bamieh commented May 9, 2024

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Page load bundle

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

id before after diff
core 408.2KB 408.3KB +19.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@sakurai-youhei sakurai-youhei merged commit 50d6748 into elastic:main May 9, 2024
18 checks passed
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request May 9, 2024
## Summary

This PR fixes one i18n mapping for EUI to render the `dateFormat` = `MMM
D, YYYY @ HH:mm:ss.SSS` correctly at the bottom.

Note: It showed `[object Object]` instead of `MMM D, YYYY @
HH:mm:ss.SSS` before this fix.

Fixes elastic#182099

## Release note

Fixes time picker to show allowed formats properly in absolute tabs.

---------

Co-authored-by: Kibana Machine <[email protected]>
(cherry picked from commit 50d6748)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.14

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request May 9, 2024
…) (#183022)

# Backport

This will backport the following commits from `main` to `8.14`:
- [Fix time picker not to show &#x60;[object Object]&#x60;
(#182152)](#182152)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Youhei
Sakurai","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-05-09T10:08:07Z","message":"Fix
time picker not to show `[object Object]` (#182152)\n\n##
Summary\r\n\r\nThis PR fixes one i18n mapping for EUI to render the
`dateFormat` = `MMM\r\nD, YYYY @ HH:mm:ss.SSS` correctly at the
bottom.\r\n\r\nNote: It showed `[object Object]` instead of `MMM D, YYYY
@\r\nHH:mm:ss.SSS` before this fix.\r\n\r\nFixes
https://github.com/elastic/kibana/issues/182099\r\n\r\n## Release
note\r\n\r\nFixes time picker to show allowed formats properly in
absolute tabs.\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine
<[email protected]>","sha":"50d674867bdf1af37f6b61a89151e52c5da2bdbd","branchLabelMapping":{"^v8.15.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","backport:prev-minor","v8.15.0"],"title":"Fix
time picker not to show `[object
Object]`","number":182152,"url":"https://github.com/elastic/kibana/pull/182152","mergeCommit":{"message":"Fix
time picker not to show `[object Object]` (#182152)\n\n##
Summary\r\n\r\nThis PR fixes one i18n mapping for EUI to render the
`dateFormat` = `MMM\r\nD, YYYY @ HH:mm:ss.SSS` correctly at the
bottom.\r\n\r\nNote: It showed `[object Object]` instead of `MMM D, YYYY
@\r\nHH:mm:ss.SSS` before this fix.\r\n\r\nFixes
https://github.com/elastic/kibana/issues/182099\r\n\r\n## Release
note\r\n\r\nFixes time picker to show allowed formats properly in
absolute tabs.\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine
<[email protected]>","sha":"50d674867bdf1af37f6b61a89151e52c5da2bdbd"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.15.0","branchLabelMappingKey":"^v8.15.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/182152","number":182152,"mergeCommit":{"message":"Fix
time picker not to show `[object Object]` (#182152)\n\n##
Summary\r\n\r\nThis PR fixes one i18n mapping for EUI to render the
`dateFormat` = `MMM\r\nD, YYYY @ HH:mm:ss.SSS` correctly at the
bottom.\r\n\r\nNote: It showed `[object Object]` instead of `MMM D, YYYY
@\r\nHH:mm:ss.SSS` before this fix.\r\n\r\nFixes
https://github.com/elastic/kibana/issues/182099\r\n\r\n## Release
note\r\n\r\nFixes time picker to show allowed formats properly in
absolute tabs.\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine
<[email protected]>","sha":"50d674867bdf1af37f6b61a89151e52c5da2bdbd"}}]}]
BACKPORT-->

Co-authored-by: Youhei Sakurai <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) bug Fixes for quality problems that affect the customer experience release_note:fix v8.14.0 v8.15.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Time picker shows [object Object] in absolute tab
5 participants