-
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
Try polishing/simpilfying the header area #5300
Changes from all commits
68c4b22
b0d72a0
5984928
4ebd646
2a69d5e
17e5c94
8a1b678
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,13 +2,12 @@ | |
* External dependencies | ||
*/ | ||
import { connect } from 'react-redux'; | ||
import classnames from 'classnames'; | ||
|
||
/** | ||
* WordPress dependencies | ||
*/ | ||
import { __ } from '@wordpress/i18n'; | ||
import { Dashicon, Button } from '@wordpress/components'; | ||
import { Dashicon, IconButton } from '@wordpress/components'; | ||
|
||
/** | ||
* Internal dependencies | ||
|
@@ -43,7 +42,7 @@ export function PostSavedState( { isNew, isPublished, isDirty, isSaving, isSavea | |
} | ||
|
||
if ( isPublished ) { | ||
return <PostSwitchToDraftButton className={ classnames( className, 'button-link' ) } />; | ||
return <PostSwitchToDraftButton />; | ||
} | ||
|
||
if ( ! isSaveable ) { | ||
|
@@ -60,10 +59,15 @@ export function PostSavedState( { isNew, isPublished, isDirty, isSaving, isSavea | |
} | ||
|
||
return ( | ||
<Button className={ classnames( className, 'button-link' ) } onClick={ onSave }> | ||
<IconButton | ||
className="editor-post-save-draft" | ||
onClick={ onSave } | ||
icon="cloud-upload" | ||
label={ __( 'Save Draft' ) } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The behavior of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That was sort of the thinking behind adding this. I still feel like it may not be ideal to have two elements output here, one for mobile, one for desktop, but I can't think of a better way to make a good experience for both. I'll leave the label in and we can revisit if need be. |
||
> | ||
<span className="editor-post-saved-state__mobile">{ __( 'Save' ) }</span> | ||
<span className="editor-post-saved-state__desktop">{ __( 'Save Draft' ) }</span> | ||
</Button> | ||
</IconButton> | ||
); | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`PostSavedState returns a switch to draft link if the post is published 1`] = ` | ||
<Connect(PostSwitchToDraftButton) | ||
className="editor-post-saved-state button-link" | ||
/> | ||
`; | ||
exports[`PostSavedState returns a switch to draft link if the post is published 1`] = `<Connect(PostSwitchToDraftButton) />`; |
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 values changed because the existing cloud was moved upwards 1px to better align with text.