-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[Site Editor]: Move featured image at the top of the inspector controls #59783
[Site Editor]: Move featured image at the top of the inspector controls #59783
Conversation
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. |
@@ -142,7 +141,6 @@ export default function TemplatePanel() { | |||
) } | |||
<PostLastRevisionPanel /> | |||
<PostTaxonomiesPanel /> | |||
<PostFeaturedImagePanel /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@youknowriad you have added this here, but I don't think it's needed or used anywhere..
Am I missing something?
Size Change: +71 B (0%) Total Size: 1.71 MB
ℹ️ View Unchanged
|
I just shared some initial designs for this in the tracking issue (#59689). In terms of this PR here's the most relevant part for reference (Page inspector): Tentatively I separated Title and Summary into dedicated panels, but they could easily be combined if y'all feel that's a better approach. For me that decision will probably depend on whether or not we want to make the Summary panel collapsible or not. That's not something we necessarily have to decide here. Either way, I would suggest moving the featured image to the Summary panel for now so that all editable meta is grouped together. Otherwise this looks good 👍 |
@jameskoster That means revert the I think we could keep them though in this PR too.. |
Which changes do you mean? The main difference I see is the width of the description. I think that's fine and aligns with the designs in the tracking issue. |
That's the only difference, yes. You can also check the screenshot in the PR's description, that shows the change with the So, it seems we can keep this. |
packages/editor/src/components/post-featured-image/with-panel-check.js
Outdated
Show resolved
Hide resolved
packages/edit-site/src/components/sidebar-edit-mode/page-panels/page-summary.js
Outdated
Show resolved
Hide resolved
It seems the design (proportions) in the details panel is a bit different than the one in the inspector. Maybe we should use the details panel technique for the width/height of the featured image instead? |
Yes I think so. Areas will likely move to the 'Content' panel anyway. I can work on a follow-up to adjust the title card appearance details to match the designs in the tracking issue.
That seems like a good idea. The proportions in the dark panel are ~12/5 which feels a touch small in the narrower Inspector. Something like |
Thanks for working on this. I want to also send a nod to notably @javierarce and @shaunandrews as some of their past designs are finally coming to fruition: #39082 |
a5c0426
to
13f17ca
Compare
<div className="edit-site-sidebar-card__description"> | ||
{ description } | ||
</div> | ||
<HStack spacing={ 3 } className="edit-site-sidebar-card__header"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to make changes in this PR to massage the details so this resembles the designs in #59689 (comment), but that might be better handled in a follow-up?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Follow up can work for me. No strong opinions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either way works for me
@@ -40,10 +38,6 @@ function ResponsiveWrapper( { | |||
} | |||
|
|||
const TagName = isInline ? 'span' : 'div'; | |||
let aspectRatio; | |||
if ( naturalWidth && naturalHeight ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should definitely not update this component(components package), but made me notice that we use that in PostFeaturedImage component. We might want to update there or remove this wrapper. I thought it was baked in mediaUpload.
c963e8d
to
b546a2f
Compare
@jameskoster thanks for making the changes, but had to revert some of them due to: #59783 (comment). I removed the responsive wrapper completely(details panel also don't have a responsive wrapper), but might still need some polishing, when you find some time. What I noticed though is that the border you added is visible while loading the image. Can we add it to a different element or adjust the styles? |
Ah, thank you for catching that.
Using |
Thanks you so much @jameskoster for the polishing! I guess this is ready to land. |
Yes I think so! |
…ls (WordPress#59783) Co-authored-by: ntsekouras <ntsekouras@git.wordpress.org> Co-authored-by: jameskoster <jameskoster@git.wordpress.org> Co-authored-by: youknowriad <youknowriad@git.wordpress.org> Co-authored-by: oandregal <oandregal@git.wordpress.org> Co-authored-by: jasmussen <joen@git.wordpress.org>
What?
Part of: #59689
This PR adds the Post Featured Image panel on top of the inspector controls, as part of the normalization with the details panel. The panel checks are preserved and the previous
panel
has been removed.This is the first PR of the main issue and will need design feedback here and will indicate how we will move forward. For example if we merge the
summary
panel in the same container.In order to start this work, I have made some updates to the
SidebarCard
component which affects though other panels too. For example in templates where we show the template parts. I think that's the direction we want to go.Testing Instructions
Screenshots or screencast