Skip to content

Commit

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

I noticed that "september" doesn't look nice as it wraps: 

![Screenshot 2024-09-25 at 12 37
00](https://github.com/user-attachments/assets/9ca4a85b-bcde-4228-9c58-9cddb7f89945)

I suggest we use a shorter format: 

![Screenshot 2024-09-25 at 12 36
48](https://github.com/user-attachments/assets/3f2b2111-c1d9-4bae-a139-bd9ea6e38fc4)
  • Loading branch information
Dosant authored Sep 25, 2024
1 parent 17455d8 commit b6e692c
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 b6e692c

Please sign in to comment.