Repository: wagtail/wagtail

Issue:
Display pages and snippets’ "First published at" as absolute value
### Is your proposal related to a problem?

In side panels, we display pages and snippets’ "First published at" datetime as a relative date. To know the absolute date(time), users have to go to the history page and look at the first entry.

### Describe the solution you'd like

It’d be simpler if hovering over the "First published at \[time ago\]" text would reveal the absolute datetime in a tooltip, similarly to what we do in listings, with a dotted underline as a cue.

Code: https://github.com/wagtail/wagtail/blob/e0b0d03cf025c025a19dbcb803b64f0c1fce212c/wagtail/admin/templates/wagtailadmin/shared/side_panels/status.html#L19

What we do on listings (different field) for reference:

```html
<button type="button" class="w-human-readable-date" data-tippy-content="Aug. 14, 2023, 10:47 a.m.">
    <time class="w-human-readable-date__date" datetime="2023-08-14T10:47:04.536893+00:00">
        1&nbsp;hour ago
    </time>
    
</button>
```

### Describe alternatives you've considered

We could also use a read-only FieldPanel to display `first_published_at`.

### Additional context

See for example https://static-wagtail-v5-1.netlify.app/admin/pages/69/edit/

> Form page
> First published 4 years ago

Display pages and snippets’ "First published at" as absolute value
### Is your proposal related to a problem?

In side panels, we display pages and snippets’ "First published at" datetime as a relative date. To know the absolute date(time), users have to go to the history page and look at the first entry.

### Describe the solution you'd like

It’d be simpler if hovering over the "First published at \[time ago\]" text would reveal the absolute datetime in a tooltip, similarly to what we do in listings, with a dotted underline as a cue.

Code: https://github.com/wagtail/wagtail/blob/e0b0d03cf025c025a19dbcb803b64f0c1fce212c/wagtail/admin/templates/wagtailadmin/shared/side_panels/status.html#L19

What we do on listings (different field) for reference:

```html
<button type="button" class="w-human-readable-date" data-tippy-content="Aug. 14, 2023, 10:47 a.m.">
    <time class="w-human-readable-date__date" datetime="2023-08-14T10:47:04.536893+00:00">
        1&nbsp;hour ago
    </time>
    
</button>
```

### Describe alternatives you've considered

We could also use a read-only FieldPanel to display `first_published_at`.

### Additional context

See for example https://static-wagtail-v5-1.netlify.app/admin/pages/69/edit/

> Form page
> First published 4 years ago



Discussion:
This looks like a fair enhancement. A tooltip may display the first published date. I don't know whether `type:Enhancemet` type issues are open for contributions, if they are, may I contribute to this solution? 
@YashTote yep, that would be a very welcome contribution!
I would like to give this a try
Go ahead!
Hello @laymonage, @thibaudcolas , I've made some changes for enhancing the user experience in side panels. When users hover over the "First published" text, a tooltip now displays the absolute datetime, simplifying access. I'm attaching a screenshot of the changes and would like to confirm if this implementation aligns with expectations.

![Screenshot (20)](https://github.com/wagtail/wagtail/assets/111359305/9efe81a8-8622-400b-b089-f8908c77801e)

Thanks @rohitsrma, that looks close but not quite right yet. The original "First published [time ago]" should still be shown instead of "07:02". The tooltip seems correct though!
Okay, I've made the updates you can review in the screenshot. Please let me know if everything looks good now.

![Screenshot (21)](https://github.com/wagtail/wagtail/assets/111359305/c5a14481-1f9a-4b35-b34f-9477d057e69d)

This looks like a fair enhancement. A tooltip may display the first published date. I don't know whether `type:Enhancemet` type issues are open for contributions, if they are, may I contribute to this solution? 
@YashTote yep, that would be a very welcome contribution!
I would like to give this a try
Go ahead!
Hello @laymonage, @thibaudcolas , I've made some changes for enhancing the user experience in side panels. When users hover over the "First published" text, a tooltip now displays the absolute datetime, simplifying access. I'm attaching a screenshot of the changes and would like to confirm if this implementation aligns with expectations.

![Screenshot (20)](https://github.com/wagtail/wagtail/assets/111359305/9efe81a8-8622-400b-b089-f8908c77801e)

Thanks @rohitsrma, that looks close but not quite right yet. The original "First published [time ago]" should still be shown instead of "07:02". The tooltip seems correct though!
Okay, I've made the updates you can review in the screenshot. Please let me know if everything looks good now.

![Screenshot (21)](https://github.com/wagtail/wagtail/assets/111359305/c5a14481-1f9a-4b35-b34f-9477d057e69d)


Resolving patch:
diff --git a/wagtail/admin/templatetags/wagtailadmin_tags.py b/wagtail/admin/templatetags/wagtailadmin_tags.py
--- a/wagtail/admin/templatetags/wagtailadmin_tags.py
+++ b/wagtail/admin/templatetags/wagtailadmin_tags.py
@@ -1196,8 +1196,9 @@ def workflow_status_with_date(workflow_state):
 
 
 @register.inclusion_tag("wagtailadmin/shared/human_readable_date.html")
-def human_readable_date(date, description=None):
+def human_readable_date(date, description=None, position="top"):
     return {
         "date": date,
         "description": description,
+        "position": position,
     }


Test patch: