notification panel: rework time formatting (#8997)

Follow up of #7994 to rework the notification panel timestamps.
This PR also includes some of the changes @evrsen proposed in #8996 
Here is what it looks like now:


https://github.com/zed-industries/zed/assets/53836821/d85450e7-eab6-4fe7-bd11-1d76c0e87258

Release Notes:
- Reworked date time formatting in the chat and the notification panel
- Added hover style to notifications and hovering tooltip on timestamps

---------

Co-authored-by: Evren Sen <146845123+evrsen@users.noreply.github.com>
This commit is contained in:
Bennet Bo Fenner 2024-03-13 04:02:04 +01:00 committed by GitHub
parent a105b5f215
commit fb83cf2042
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 422 additions and 103 deletions

View file

@ -493,9 +493,10 @@ impl ChatPanel {
)
.child(
Label::new(time_format::format_localized_timestamp(
OffsetDateTime::now_utc(),
message.timestamp,
OffsetDateTime::now_utc(),
self.local_timezone,
time_format::TimestampFormat::EnhancedAbsolute,
))
.size(LabelSize::Small)
.color(Color::Muted),