DataViews: add footer to Pages sidebar#57690
Conversation
|
Size Change: +95 B (0%) Total Size: 1.69 MB
ℹ️ View Unchanged
|
| title={ __( 'Pages' ) } | ||
| content={ <DataViewsSidebarContent /> } | ||
| footer={ | ||
| <VStack spacing={ 0 }> |
There was a problem hiding this comment.
Maybe it's better to extract this and reuse it?
There was a problem hiding this comment.
Where would it need reusing? Note that the existing pages root is going to be removed when the new pages dataviews is made stable, so there's only one place where we need this.
There was a problem hiding this comment.
It could be a while though until we stabilize the pages view.. Anyway I have no strong opinions, it's just that it adds some bloat in this file, which we could move afterwards..
There was a problem hiding this comment.
Yeah, I see your point. I'm working to make it stable for 6.5, a few weeks from now, so I want to be optimistic. Considering that timeline, it felt unnecessary to make this PR bigger by extracting a new component that was to be removed soon. Could have done it differently, in a less optimistic day :)
Oh, no worries, I can explore that. I think I misunderstood your comment. Actually, I was already implementing the second step (adding the "Front Page" to the sidebar, mimicking the existing), and I wanted to raise the same point. The existing page presents three concepts in the sidebar (templates, special pages, and user pages), which I find a bit difficult to reason about – more now with dataviews and the concept of views there. I presume they were there because of findability? This is: making it easier for users to find them, when they don't know they are templates (404) or special pages (front page). Is that right? Perhaps we can explore alternatives for the same effect: add a view in the sidebar for them, or something like that. |
|
@jameskoster I've prepared two PRs for the
Considering why templates were listed there (findability?) and the current dataviews experience (filters, search, preview, etc.) is tailored for items of the same type, I lean towards the second approach. 1 is doable, though I wouldn't recommend pursuing it at this stage and don't find that it provides good findability. I'm fine if we want to go with 3, though I understand that it was there for a reason and would at least try to provide a similar affordance to users. |
|
@oandregal @ntsekouras how do y'all feel about reverting this one (and #57759)? It was initially added because we thought the List layout for data views would be included in 6.5. We were worried about not having the same features as the current pages list, which includes links to 404, search results, blog home, and front page templates. Since the List layout didn't make it into 6.5, having the footer on both the existing pages list and the pages data view seems a bit redundant. Additionally, there's some potential confusion between buttons that open views and buttons that open templates. That trade-off was worth it before, but now I'm not so sure. We could reconsider this for version 6.6. It might be better to find a way to incorporate these templates directly into the data views themselves. What do you think? |
|
Makes sense to me @jameskoster. I created a revert PR here: #59151 |

Part of #55083
Follow-up to #57578
What?
Adds a footer to the sidebar of
Pagescontaining the404andSearchtemplates.Why?
To achieve feature parity with the existing
Pagesroot.How?
Creates a new
SidebarNavigationScreenPagesDataViewsthat adds the footer.Testing Instructions