-
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
Unify the PageUrl and PageSlug components between site and post editors #56203
Conversation
// Match padding on tertiary buttons for alignment. | ||
padding: $grid-unit-15 * 0.5 0; | ||
width: 30%; | ||
margin-right: 8px; |
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.
These changes can feel random but they are changes meant to unify the spacing and the proportions of these panels between site and post editors.
As I move more panels into the editor
package, I'll try to use a dedicated UI component that I'll be sharing between all these panels to avoid recreating the same design over and over again.
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.
You can use $grid-unit-10 instead of 8px.
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.
To be honest I'll just keep it as is for now as it's a bit random but I'm going to do better in the next PR I promise :P
/** | ||
* Internal dependencies | ||
*/ | ||
import PageStatus from './page-status'; | ||
import PublishDate from './publish-date'; | ||
import EditTemplate from './edit-template'; | ||
import PageSlug from './page-slug'; | ||
|
||
export default function PageSummary( { |
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.
Slowly (panel by panel), I'm hoping to unify this component entirely between post and site editors.
Size Change: -357 B (0%) Total Size: 1.7 MB
ℹ️ View Unchanged
|
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.
Seems fine to me. Before:
After:
I would love a gut check by @SaxonF as he worked a lot on the page status panel in the site editor. But seems safe to merge, IMO.
I don't mind what updates we make to the UI itself, I just think it should be the same. I'm happy to follow-up. Only remark from the screenshot is that I do think that the URL should be visible to be easily copied (or have a copy button) |
100%. I'll open an issue to discuss the design when I find a minute. Definitely not a high-prio item :) |
Related #52632
Follow-up to #56000
What?
Now that we're using the EditorProvider in the site editor, we should be able to reuse the exact same component the post editor uses to edit post properties and attributes. In this PR, I'm unifying the "PostURL" or "PostSlug" component between both.
Note This PR also includes a small CSS notifications between site and post editors: now all the page summary details are 30% of the label and 70% for the actual control, in the post editor, it used to be 45% for the label.
Testing Instructions
1- Ensure that the changing the page slug/url date still looks and works well in both post and site editors.