Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pages data view: Clarify 'Date' field #60477

Closed
jameskoster opened this issue Apr 4, 2024 · 13 comments · Fixed by #61709
Closed

Pages data view: Clarify 'Date' field #60477

jameskoster opened this issue Apr 4, 2024 · 13 comments · Fixed by #61709
Assignees
Labels
[Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond Needs Dev Ready for, and needs developer efforts [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.

Comments

@jameskoster
Copy link
Contributor

jameskoster commented Apr 4, 2024

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
@jameskoster jameskoster added [Type] Enhancement A suggestion for improvement. Needs Design Feedback Needs general design feedback. [Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond labels Apr 4, 2024
@jasmussen
Copy link
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.

@jameskoster
Copy link
Contributor Author

jameskoster commented Apr 5, 2024

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.

@jameskoster
Copy link
Contributor Author

jameskoster commented Apr 5, 2024

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?).

@jasmussen
Copy link
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?

@jameskoster
Copy link
Contributor Author

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.

@ntsekouras
Copy link
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.

@jameskoster
Copy link
Contributor Author

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.

@jasmussen
Copy link
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.

@jameskoster
Copy link
Contributor Author

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.

@jameskoster jameskoster added Needs Dev Ready for, and needs developer efforts and removed Needs Design Feedback Needs general design feedback. labels Apr 5, 2024
@ntsekouras
Copy link
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?

@jameskoster
Copy link
Contributor Author

@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.

@jasmussen jasmussen moved this from Next to Needs Dev in Design priorities May 15, 2024
@oandregal oandregal self-assigned this May 16, 2024
@oandregal
Copy link
Member

I'm giving this one a shot.

@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label May 16, 2024
@oandregal
Copy link
Member

PR at #61709

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond Needs Dev Ready for, and needs developer efforts [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.
Projects
Status: Done
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants