Skip to content

Pages data view: Clarify 'Date' field #60477

Closed

Description

@jameskoster

Here's how the Date field looks in the Pages data view:

Screenshot 2024-04-04 at 18 23 42

It's not clear which date is being referred to. Specifically; is it the publish date, the modified date, or something else? This detail is clarified in wp-admin with a preceding label:

Screenshot 2024-04-04 at 18 25 04

I suppose the simplest way to tackle this would be to mimic wp-admin and add a prefix. Are there other ways, could/should publish date and modified date be split into separate fields?

cc @WordPress/gutenberg-design @ntsekouras @oandregal for feedback.

Edit: Based on discussion below, let's start simply by adding the prefix:

Screenshot 2024-04-12 at 13 49 24

Activity

  1. jasmussen commented on Apr 5, 2024

    @jasmussen
    Contributor

    This'll take some finessing, but it might be hard to not have to need two lines of text there. It might be good to gather a bit of comparison material across other apps that have similar formats, see what standards there are.

  2. jameskoster commented on Apr 5, 2024

    @jameskoster
    ContributorAuthor

    I don't know that it needs to involve two lines. The prefix could be a single word: Modified: April 5, 2024, 09:55, Published: April 5, 2024, 09:55.

  3. jameskoster commented on Apr 5, 2024

    @jameskoster
    ContributorAuthor

    That said...

    could/should publish date and modified date be split into separate fields

    I think this could be worth discussing. Filtering by publish date (a legitimate use case) is very different to filtering by modified date (still legitimate, but probably less common?).

  4. jasmussen commented on Apr 5, 2024

    @jasmussen
    Contributor

    You'd only ever see Published or Modified, in the existing pages, right? That would simplify things, and maintain the value as well as the density.

    Building on your suggestion but using the existing date format, this isn't bad:

    • Modified: Apr 5, 2024 09:55
    • Published: Apr 5, 2024 09:55.

    Mainly wondering, could we/should we make an effort to ensure the dates line up vertically, even if the prefix varies in width?

  5. jameskoster commented on Apr 5, 2024

    @jameskoster
    ContributorAuthor

    You'd only ever see Published or Modified, in the existing pages, right?

    Also "Scheduled".

    make an effort to ensure the dates line up vertically

    Yeah that's a bit tricky. We might have to choose between vertically aligned dates or separate lines.

    Another option could be to use a 'human friendly' date format e.g. "Published 30 minutes ago" which might mitigate the alignment issue? The actual timestamp could appear in a tooltip on hover if required.

  6. ntsekouras commented on Apr 5, 2024

    @ntsekouras
    Contributor

    I have no strong opinion about this, but if we feel like both modified and published dates have value, we should probably have them as separate fields. That would probably help with the filtering (when we have date filters).

    Additionally if we render both dates in a single field (two lines), I guess in some of them we'll only have one and I'm not sure if this affects the design for any reason. An example is draft posts will always have only modified date.

  7. jameskoster commented on Apr 5, 2024

    @jameskoster
    ContributorAuthor

    I suppose the usefulness of separate fields is:

    1. The simplification of filters like "Show all pages published in January". To do this currently you'd need to filter by date and status.
    2. The ability to filter all pages specifically by modified date (including ones that have been published or scheduled). Currently this isn't possible.

    Seemingly the modified date is already tracked somehow as it appears in the Inspector:

    Screenshot 2024-04-05 at 12 40 45

    So I guess it wouldn't be a big lift to make it a field?

    An example is draft posts will always have only modified date.

    I think that's okay given the explicit labels. It would be strange for a draft post to have a publish date.

  8. jasmussen commented on Apr 5, 2024

    @jasmussen
    Contributor

    I'd tend to reach parity first, and then expand beyond that when we know it's necessary. This is a cat that's hard to put back in the bag. Easy to expand, hard to contract.

  9. jameskoster commented on Apr 5, 2024

    @jameskoster
    ContributorAuthor

    Agreed. For now let's mimic wp-admin, IE add the prefix.

    We can follow-up to discuss in more detail the addition of a separate 'modified date' field.

  10. added
    Needs DevReady for, and needs developer efforts
    and removed on Apr 5, 2024
  11. ntsekouras commented on Apr 22, 2024

    @ntsekouras
    Contributor

    Agreed. For now let's mimic wp-admin, IE add the prefix.

    Does that mean just change the label from date to published date, or something different?

  12. jameskoster commented on Apr 23, 2024

    @jameskoster
    ContributorAuthor

    @ntsekouras no, because we need to capture modified dates for drafts. So for now it means adding a prefix to the field value. I added a screenshot to the OP.

  13. moved this from Next to Needs Dev in Design prioritieson May 15, 2024
  14. self-assigned this
    on May 16, 2024
  15. oandregal commented on May 16, 2024

    @oandregal
    Member

    I'm giving this one a shot.

  16. oandregal commented on May 16, 2024

    @oandregal
    Member

    PR at #61709

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Needs DevReady for, and needs developer efforts[Feature] DataViewsWork surrounding upgrading and evolving views in the site editor and beyond[Status] In ProgressTracking issues with work in progress[Type] EnhancementA suggestion for improvement.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

Sponsor
SponsoredKunjungi sekarang
Promo