Skip to content

Commit

Permalink
[8.x] [TableListView] Adjust last updated date format (#193964) (#194047
Browse files Browse the repository at this point in the history
)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[TableListView] Adjust last updated date format
(#193964)](#193964)

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

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

<!--BACKPORT [{"author":{"name":"Anton
Dosov","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-25T17:00:53Z","message":"[TableListView]
Adjust last updated date format (#193964)\n\n## Summary\r\n\r\nI noticed
that \"september\" doesn't look nice as it wraps: \r\n\r\n![Screenshot
2024-09-25 at 12
37\r\n00](https://github.com/user-attachments/assets/9ca4a85b-bcde-4228-9c58-9cddb7f89945)\r\n\r\nI
suggest we use a shorter format: \r\n\r\n![Screenshot 2024-09-25 at 12
36\r\n48](https://github.com/user-attachments/assets/3f2b2111-c1d9-4bae-a139-bd9ea6e38fc4)","sha":"b6e692ccb05a3e5a2b8747b4d5f21d0d8a235d52","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:SharedUX","backport:prev-minor","Component:TableListView"],"title":"[TableListView]
Adjust last updated date
format","number":193964,"url":"https://github.com/elastic/kibana/pull/193964","mergeCommit":{"message":"[TableListView]
Adjust last updated date format (#193964)\n\n## Summary\r\n\r\nI noticed
that \"september\" doesn't look nice as it wraps: \r\n\r\n![Screenshot
2024-09-25 at 12
37\r\n00](https://github.com/user-attachments/assets/9ca4a85b-bcde-4228-9c58-9cddb7f89945)\r\n\r\nI
suggest we use a shorter format: \r\n\r\n![Screenshot 2024-09-25 at 12
36\r\n48](https://github.com/user-attachments/assets/3f2b2111-c1d9-4bae-a139-bd9ea6e38fc4)","sha":"b6e692ccb05a3e5a2b8747b4d5f21d0d8a235d52"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193964","number":193964,"mergeCommit":{"message":"[TableListView]
Adjust last updated date format (#193964)\n\n## Summary\r\n\r\nI noticed
that \"september\" doesn't look nice as it wraps: \r\n\r\n![Screenshot
2024-09-25 at 12
37\r\n00](https://github.com/user-attachments/assets/9ca4a85b-bcde-4228-9c58-9cddb7f89945)\r\n\r\nI
suggest we use a shorter format: \r\n\r\n![Screenshot 2024-09-25 at 12
36\r\n48](https://github.com/user-attachments/assets/3f2b2111-c1d9-4bae-a139-bd9ea6e38fc4)","sha":"b6e692ccb05a3e5a2b8747b4d5f21d0d8a235d52"}}]}]
BACKPORT-->

Co-authored-by: Anton Dosov <[email protected]>
  • Loading branch information
kibanamachine and Dosant authored Sep 25, 2024
1 parent 986db1f commit 52e6a19
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const UpdatedAtField: FC<{ dateTime?: string; DateFormatterComp?: DateFor
}
return (
<EuiToolTip content={updatedAt.format('LL LT')}>
<span>{updatedAt.format('LL')}</span>
<span>{updatedAt.format('ll')}</span>
</EuiToolTip>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,8 @@ describe('TableListView', () => {

expect(tableCellsValues).toEqual([
// Renders the datetime with this format: "July 28, 2022"
['Item 1Item 1 description', updatedAtValues[0].format('LL')],
['Item 2Item 2 description', updatedAtValues[1].format('LL')],
['Item 1Item 1 description', updatedAtValues[0].format('ll')],
['Item 2Item 2 description', updatedAtValues[1].format('ll')],
]);
});

Expand Down Expand Up @@ -1132,11 +1132,11 @@ describe('TableListView', () => {
Array [
Array [
"Item 1",
"July 15, 2023",
"Jul 15, 2023",
],
Array [
"Item 2",
"July 15, 2023",
"Jul 15, 2023",
],
]
`);
Expand Down Expand Up @@ -1166,7 +1166,7 @@ describe('TableListView', () => {
Array [
Array [
"Item from search",
"July 1, 2023",
"Jul 1, 2023",
],
]
`);
Expand Down Expand Up @@ -1208,11 +1208,11 @@ describe('TableListView', () => {
Array [
Array [
"Item 1",
"July 15, 2023",
"Jul 15, 2023",
],
Array [
"Item 2",
"July 15, 2023",
"Jul 15, 2023",
],
]
`);
Expand Down

0 comments on commit 52e6a19

Please sign in to comment.