-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 PostSchedule component between site and post editors #56196
Conversation
Size Change: -254 B (0%) Total Size: 1.7 MB
ℹ️ View Unchanged
|
8b0c4b6
to
c4d953b
Compare
|
||
.editor-post-schedule__panel-dropdown { | ||
width: 70%; | ||
} |
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.
Some of the styles above are duplicated between these "panels". Since this is the second panel I'm adding, I think it's fine, but as a direct follow-up for this PR, I'll try to see if we can use a common UI component and share it across the panels.
Both post and site editor approaches are not satisfying for me:
- Site editor reuses classnames, we should always reuse components and not classnames
- Post editor duplicates styles.
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.
The follow-up is ready here #56238
How about adding props like |
@t-hamano I don't really see the site and post editors as different editors, ultimately they should merge. So I prefer that we make a decision and go with one formatting or the other |
@youknowriad I see. Personally, I prefer displaying the full date. The reason for this is that the full date is used in the admin post list and post editor, and I think users are familiar with that format. What do you think? |
I went with the other format because it was shorter and easier to read but I'm not very opinionated and would go with whatever. Curious what designers think |
ok, I'm fine with that, I'll update the PR :) |
b5df462
to
df2fe7b
Compare
I've restored the full date format and it's now used in both editors. This should be ready for a final review. |
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.
Nice.
I'm not sure the publish date should be forced to stay in one line and truncated with That maybe made sense with the shorter format previously used in the Site editor, when the date was something like: Now that the date is the full date, a portion of the publish date/time is invisible to users. Partially hiding such an important information doesn't seem ideal. Screenshot: Please also consider that month names can get way longer when translated to some languages. There is no way to predict how much space the publish date/time string will need. |
@afercia sure, happy to do that, what do you think @SaxonF @jameskoster |
Thanks Riad. I creatd #56262 to keep track of it. |
Agree it's important to see full date, especially for scheduled posts. If this is how it worked previously in the post editor would it be easiest to restore that behavior? Multi-line Buttons aren't ideal, but that's something to address separately when we get around to updating the Summary panel. |
Related #52632
Follow-up to #56000
closes #55111
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 "PostSchedule" or "PostPublishDate" component between both.
I'm using the best of both here:
Testing Instructions
1- Ensure that the changing the page publish date still looks and works well in both post and site editors.