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: Display excerpt #56250

Closed
jameskoster opened this issue Nov 17, 2023 · 10 comments
Closed

Pages data view: Display excerpt #56250

jameskoster opened this issue Nov 17, 2023 · 10 comments
Labels
[Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond Needs Design Needs design efforts. [Type] Enhancement A suggestion for improvement.

Comments

@jameskoster
Copy link
Contributor

This came up in #56154.

Let's explore the merits of including the excerpt in the Pages data table. If deemed useful let's work out whether it should be optional, and design the appearance (is it a dedicated column or appended to title, how does it appear in grid layout, etc).

@jameskoster jameskoster added [Type] Enhancement A suggestion for improvement. [Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond Needs Design Needs design efforts. labels Nov 17, 2023
@jameskoster
Copy link
Contributor Author

jameskoster commented Nov 17, 2023

A couple of quick mockups:

Appended to title

excerpt

This works quite well when the table is wider or there are fewer columns. Otherwise it feels a bit cramped, and I'm not sure how useful the excerpt is when you can only see a few words. We could apply some smarts to hide it at certain widths, or just make it optional. Or both together :)

Dedicated column

excerpt-column

Visually this doesn't work as well, it makes the table feel more cramped. I think the only argument for a dedicated column is that it enables inline/quick editing (#55101).

@ntsekouras
Copy link
Contributor

I think the only argument for a dedicated column is that it enables inline/quick editing (#55101).

That's definitely a good reason for this to be separate. We could try adding this field but hidden by default, and also append this to the title and add conditional css or logic in JS.

@jameskoster
Copy link
Contributor Author

Another question that might inform the direction is precisely what to display. Is it a literal output of the excerpt field, or do we auto-generate an excerpt when that field is empty?

For the appended-to-title treatment to work consistently I think we'd need to auto-generate, which might make the inline edit experience a bit strange. For that reason I lean slightly towards a dedicated column, hidden by default like you suggest.

@jasmussen
Copy link
Contributor

I don't know that we want Excerpt to be quick-editable, do we? It feels like for V1 of this we don't add anything to quick edit that isn't already shipping in core, we simply have no data to suggest that it's useful yet (and personally I wouldn't ever edit an excerpt here, I might do it in the detail page). Additionally, the way I see this text isn't as an excerpt — because if there isn't one we'd use the page text instead — but as a glanceability tool to help you find the page you mean to edit: "oh it's that one".

To that end, I'm drawn to it potentially being something we show next to the title, as in the first mockup, but only on wider screens where the whitespace affords it. In those cases it's working a little better than I expected.

Is this the lightest gray we can use for the text? What would it show if the page is empty? What would it show if the page only contained images?

@jameskoster
Copy link
Contributor Author

Seems like we're talking about two separate things here;

  1. Display the actual excerpt as a field in the view
  2. Displaying the page text (or excerpt if specified) appended to the title, situationally depending on screen width, and truncated accordingly

Displaying the excerpt as a field has practical benefits:

  • Benefits from existing mechanics without additional logic, IE show/hide in view options, sort and filter via column header
  • Direct manipulation for quick edits. (I think it would be a little strange to allow quick-edits for all fields except the excerpt).
  • It 'works' regardless of viewport size, title length, number of columns, layout selection, etc.

Appending a 'pseudo-excerpt' to the title looks nice, but loses out on practicality, requires some additional logic, and isn't always going to work reliably. As an example this look a bit clunky, and doesn't seem to be very useful:

Screenshot 2023-11-30 at 11 39 37

For me practicality wins here, but I appreciate this might be subjective. It'd be good to gather more thoughts!

@jasmussen
Copy link
Contributor

Direct manipulation for quick edits. (I think it would be a little strange to allow quick-edits for all fields except the excerpt).

Right, what I'm saying is that we don't have that in WordPress at the moment, so the value is dubious, and it's one of those things that's easy to add when we know we want it, but hard to remove if we add it now. So I'd postpone adding this as a separate thing now, and refine the other aspects first.

Which leaves, yes, the other idea, whether we show text appended to the title. I suppose you are right, it doesn't always work reliably. Thank you for exploring.

@jameskoster
Copy link
Contributor Author

It could be made to work reliably, but it gets complex to the point where I'm not sure it's worth it, yet.

I propose we treat excerpt as a regular field for now (with no inline edit-ability because we don't have that anywhere yet) so that we get all the other practicality benefits. We can revisit later and potentially update the design if we decide that inline editing is definitely a no-go long term.

@jasmussen
Copy link
Contributor

I'd actually suggest pausing this for now, and then we have it around to revisit if need be.

@jameskoster
Copy link
Contributor Author

I agree it's not high priority :)

@jameskoster
Copy link
Contributor Author

The ongoing Inspector work will make the excerpt accessible from data views. That effort has active momentum so I'm going to close this out for now. We can revisit later if needed.

@jameskoster jameskoster closed this as not planned Won't fix, can't repro, duplicate, stale Apr 16, 2024
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 Design Needs design efforts. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

3 participants