Conversation
| @@ -0,0 +1,12 @@ | |||
| .editor-post-revisions-panel { | |||
| .dataviews-layout__container { | |||
There was a problem hiding this comment.
The overflow override is something we should fix in DataViews IMO because it seems the 'circle' is aligned a bit more left than the group label.
We should consider what to do with the activity padding rule too. --cc @oandregal
There was a problem hiding this comment.
I've removed those styles and this is how the panel looks:
If we want to change how this looks, we should find a fix that works across surfaces rather than targeting internal dataviews styles. That's best to address in a follow-up, we also need to understand how this affects other consumers of the layout.
There was a problem hiding this comment.
It seems other layouts (e.g. grid) have padding as well and that probably is related to the padding in other DataViews components.
At the 'big' debate about reducing padding or removing etc.. I was in favor of removing completely, but it was decided against that for back-compat.
So in this case, I guess it would be the overrides or some kind of extensibility point, like a css var.
There was a problem hiding this comment.
Can we start without overrides in this PR and follow-up with explorations to improve this? One we should consider is no padding in dataviews layouts, as that keeps proving problematic in several usage I've seen.
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
| ) } | ||
| { !! revisionId && ( | ||
| <> | ||
| <VStack spacing={ 1 }> |
There was a problem hiding this comment.
Initially I took a different approach trying to preserve the DataForm and actually adjust the fields to just a few.
Later on I observed that the revision info operate on a separate entity entirely (revision) and it doesn't make much sense to add complexity and also create all those new fields for something that is not going to be a DataForm at all.
The simplest (and best IMO) solution is to reuse the same 'view' components from editor package.
Additionally, this is more flexible to the revisions panels, since they might update with the ongoing work of revisions.
There was a problem hiding this comment.
There's a opportunity for clarity here: there's isRevisionMode checks at different levels of abstraction. Instead of adding those checks here, we can simplify by:
- centralizing them all in the sidebar component
- creating a RevisionsSummary component (that essentially has the PostCardPanel + Open Revisions classic screen)
There was a problem hiding this comment.
I agree that the isRevisionMode checks are scattered but I think it's better to handle separately for easier and better testing.
The internal checks of some components (e.g. PostContentInformation) make the refactoring a bit more convoluted and I think it will be easier to do when we have clarity about the fils for PluginPostStatusInfo slot.
There was a problem hiding this comment.
Checked that slot and it's only available for the ClassicPostSummary, not sure how that affect the experiment 🤔 Note the DataForm inspector should not have any slot because the extensibility model is going to be different: based on the entity, not on UI slots.
In any case, I find tidy first and then introduce feature a faster workflow, as you are refactoring a more contained surface. If you'd rather do the opposite (add feature with more things to refactor, and then refactor) is fine by me as long as we track it and follow up to do it. This is not a blocker for this PR to land.
There was a problem hiding this comment.
Checked that slot and it's only available for the ClassicPostSummary, not sure how that affect the experiment 🤔 Note the DataForm inspector should not have any slot because the extensibility model is going to be different: based on the entity, not on UI slots.
Agreed but the experiment should have a place for the previous slots. I'm planning to explore this really soon and my first thoughts were a new panel.
|
Size Change: +43.3 kB (+0.56%) Total Size: 7.73 MB
ℹ️ View Unchanged
|
e558ae1 to
d8059e3
Compare
I updated to use those styles and what to render for the date (relative if it's within the same day or full in other cases). |
t-hamano
left a comment
There was a problem hiding this comment.
Thanks for the PR! I didn't realize that Dataviews supports "Activity" layout 😅
https://wordpress.github.io/gutenberg/?path=/story/dataviews-dataviews--layout-activity
Should we perhaps refactor the global styles revisions UI by this activity layout in the future as well?
From a design perspective, I don't have strong opinions, but as one idea, we might be able to enable showMedia and display avatars as media.
| getCurrentPostId(), | ||
| REVISIONS_QUERY, | ||
| ]; | ||
| const _revisions = getRevisions( ...query ); |
There was a problem hiding this comment.
This request is only necessary for the data view, but I suspect it will execute even when the panel is closed. Should we create a child component to handle this request to improve performance?
There was a problem hiding this comment.
That's a good thought! I'll update later, as there are ongoing design discussions right now.
|
Flaky tests detected in 36511d9. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/23643655907
|
|
I agree we should aim to make the global styles revisions and post type revisions work the same as much as possible. There's an issue to migrate GS revisions to use the activity layout. That requires some alignment on how selection should work and perhaps adding a "select mode" to the activity layout. Note how selection differs between the two: Screen.Recording.2026-03-26.at.11.26.16.movGiven this PR only affects the DataForm in Editor Inspector experiment, I'd be open to merge what we have today. Another thing that stands out when comparing this to how GS revisions work is the lack of meta info about the changes: "updated paragraph", "updated title", "updated several blocks", "changed color of button", etc. |
The thing though is that it's not just about the representation of revisions (activity layout or not) but also about the user flow for selecting/viewing the So, while I agree we should consolidate where we can, we should have in mind this major difference between visual and content changes. Additionally we can't have a summary about the changes and if we tried that it would be quite costly and not very informative (e.g a paragraph content changed ? 🤔 ). That said, I'm not sure if consolidating is a blocker, but if it is I believe it will take a while to figure it out 😄 . |
d8059e3 to
ce98cb5
Compare
| }; | ||
| }, [] ); | ||
|
|
||
| const { postType, postId, isPostStatusPanelRemoved } = useSelect( |
There was a problem hiding this comment.
isEditorPanelRemoved: I see this also in the PostSummary component, and it looks like this is to hide the summary of the post.
What are your thoughts on starting without this? For the same reasons I mentioned below, I'd rather start without to make it clear the DataForm inspector would provide new mechanics for extensibility (including hiding).
While we're going to allow more granular extensibility, we also need to reckon the existing mechanisms. We'll want to list them all in the tracking issue, as we find them, so we don't forget to provide the same experience when extensibility is brought to this panel.
There was a problem hiding this comment.
Okay, I removed it for now. I was about to push changes to show the fields we show when the panel is disabled just before seeing your comment 😄 .
There was a problem hiding this comment.
I also updated the issue a bit around extensibility.
5f32489 to
36511d9
Compare
| { displayDate } | ||
| </time> | ||
| ); | ||
| }, |
There was a problem hiding this comment.
I imagine rendering dates in "human time diff" is a common use case. Checked the datetime format but it doesn't offer mechanics for this.
I wonder if there're ways to incorporate this into the Field API.
|
I'll follow up with any design updates needed. |
|
The padding feels too much here:
@oandregal this feels like yet another example that suggests DataViews should not be responsible for it's own padding 🙈 |
| .editor-post-revisions-panel__revision-date { | ||
| text-transform: uppercase; | ||
| font-weight: 600; | ||
| font-size: 12px; | ||
| } |
There was a problem hiding this comment.
I'm not sure we should be overriding Dataviews styles like this.
👍 Agreed. |
Co-authored-by: ntsekouras <ntsekouras@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: oandregal <oandregal@git.wordpress.org> Co-authored-by: jasmussen <joen@git.wordpress.org> Co-authored-by: jameskoster <jameskoster@git.wordpress.org> Co-authored-by: fcoveram <fcoveram@git.wordpress.org>
Co-authored-by: ntsekouras <ntsekouras@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: oandregal <oandregal@git.wordpress.org> Co-authored-by: jasmussen <joen@git.wordpress.org> Co-authored-by: jameskoster <jameskoster@git.wordpress.org> Co-authored-by: fcoveram <fcoveram@git.wordpress.org>
Co-authored-by: ntsekouras <ntsekouras@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: oandregal <oandregal@git.wordpress.org> Co-authored-by: jasmussen <joen@git.wordpress.org> Co-authored-by: jameskoster <jameskoster@git.wordpress.org> Co-authored-by: fcoveram <fcoveram@git.wordpress.org>




What?
Resolves: #76246
Which is part of the bigger: #76076
This PR affects the
Editor Inspector: Use DataFormexperiment and adds arevisionspanel based on the designs shared here.Notes
Budgefor the revisions count seem to make the panel header a bit taller than the restadded/removed/modifiedwithout providing more details.Testing Instructions
Editor Inspector: Use DataFormexperimentrevisionspanelScreenshots