WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.41k stars 4.16k forks source link

Data views: Improve title display for untitled records #56154

Closed jameskoster closed 2 months ago

jameskoster commented 10 months ago

In data views, records without a title appear as "(no-title)". If they're also private they appear as "Private: ". It would be good to improve and align this.

Untitled public records should ideally appear as "Untitled $post_type". Private records can be denoted via badge, (similar to https://github.com/WordPress/gutenberg/issues/57763):

Screenshot 2024-04-16 at 11 38 21
Original issueIf a page is set to private and has no title, it appears like so in the pages data view: Screenshot 2023-11-15 at 15 46 31 Regular title-less pages display a 'no-title' string: Screenshot 2023-11-15 at 15 49 02 We might use that in this scenario too, IE: "Private: no-title". Bonus points if that string can display as "No title", or perhaps "Untitled". cc @WordPress/gutenberg-design for thoughts on that. For reference in wp-admin title-less pages are displayed as "(no title)".
jasmussen commented 10 months ago

Good catch, there needs to be some text there to indicate what's up. This seems like a problem where we can look at other platforms, just as a quick example, an email with no subject shows up in Gmail as (no subject), perhaps more relevant, an untitled Google Doc shows up as "Untitled document":

cropped screenshot showing "Untitled document" in Google Docs

I think we can do better than no-title. Untitled feels a baseline, Untitled [post-type] (i.e. Untitled post) might be better still.

Have there separately been any thought given to showing a brief snippet of text from the post itself? Like how in Gmail it shows first the subject, and then the first elided line of text from the email in the next column?

cropped screenshot of Gmail, showing a row of "(no subject)" followed by a snippet of text from the email in the next column

jameskoster commented 10 months ago

"Untitled [post-type/format]" seems good to me.

Have there separately been any thought given to showing a brief snippet of text from the post itself?

We could include a view option for the excerpt. Might be worth a ticket.

jasmussen commented 10 months ago

Mostly noting for the idea backlog in case it's worthwhile in explorations. It might not be a fit. And to be clear I'm not suggesting a separate column for the excerpt, I'm actually suggesting it could happen in extension of the title. So just as an example:

A short visual exploration is likely to reveal whether this is a useful tool when you have a very wide screen and long empty columns of whitespace between title on the left, and author/options on the right, leveraging that extra space for context. It might also reveal that it's unnecessary and annoying noise.

jameskoster commented 10 months ago

I think the usefulness would be largely subjective, so I'd still lean towards making it optional. That doesn't necessarily mean it needs to be a dedicated column though. Let's discuss in a new ticket!

colorful-tones commented 4 months ago

Hi folks, We are only one week away from the Beta 1 cut-off date for WordPress 6.6. We (the editor triage leads of the 6.6 release) have decided to remove it from the WordPress 6.6 Editor Tasks project board.

youknowriad commented 2 months ago
Screenshot 2024-07-12 at 10 09 59 AM

This is what the tables show today.

What do you think we should do?

IMO, we should show neither "private" nor a badge for private pages / posts as there's already a "status" column and we should consistently show (no title) because that's how posts/pages that are empty are rendered everywhere in WordPress.

jasmussen commented 2 months ago

Your suggestion sounds good to me. Show (no title) consistently—though even that we could potentially improve across the software, it's curious that the "no" is lowercase. And with Status prominently shown, I'd tend to agree it's not useful as a prefix. What if you try to set the world on fire by naming your post "Private:"? :)

youknowriad commented 2 months ago

Ok, so it turns out that we have the right logic in place but that for some reason the "pages" endpoint returns "Private:" as rendered title for private pages with empty titles.

youknowriad commented 2 months ago

It's not clear to me what the exact path forward is here but I opened this trac ticket to get more information and figure out what needs to be done https://core.trac.wordpress.org/ticket/61639

youknowriad commented 2 months ago

Going to close this in favor of the core ticket as it's going to be solved there.

jameskoster commented 2 months ago

I still think "Untitled $post_type" would be better than "(no title)", if trivial to implement.

youknowriad commented 2 months ago

It's trivial to implement but I think consistency prevails personally. If we ware to show "Untitled $post_type", I think we should show It everywhere and not just dataviews and I believe that is a different issue with a larger scope.