Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/editor/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

### Enhancements

- Post Author: Add help text to the author selector linking to the profile screen where the display name can be edited ([#17364](https://github.com/WordPress/gutenberg/issues/17364)).
- Commands: Add a command palette entry that opens the current post on the front end once it is published, labelled with the post type's `view_item` label ([#66720](https://github.com/WordPress/gutenberg/pull/66720)).
- Pre-publish panel: Remove the "Visibility" and "Publish" headings that repeated the title of the panel containing them. The publish date's reset action, which lived in the removed header, becomes a "Reset" button below the date picker, disabled but still focusable while the post is set to publish immediately ([#81806](https://github.com/WordPress/gutenberg/pull/81806)).

Expand Down
2 changes: 2 additions & 0 deletions packages/editor/src/components/post-author/combobox.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { __ } from '@wordpress/i18n';
import { ComboboxControl } from '@wordpress/components';
import { store as editorStore } from '../../store';
import { useAuthorsQuery } from './hook';
import AuthorHelpText from './help-text';

export default function PostAuthorCombobox() {
const [ fieldValue, setFieldValue ] = useState();
Expand Down Expand Up @@ -35,6 +36,7 @@ export default function PostAuthorCombobox() {
allowReset={ false }
hideLabelFromVision
isLoading={ isLoading }
help={ <AuthorHelpText /> }
/>
);
}
12 changes: 12 additions & 0 deletions packages/editor/src/components/post-author/help-text.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { createInterpolateElement } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
import { Link } from '@wordpress/ui';

export default function AuthorHelpText() {
return createInterpolateElement(
__( 'You can edit your display name in <a>your profile</a>.' ),
{
a: <Link href="profile.php" openInNewTab />,
}
);
}
2 changes: 2 additions & 0 deletions packages/editor/src/components/post-author/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { useDispatch } from '@wordpress/data';
import { SelectControl } from '@wordpress/components';
import { store as editorStore } from '../../store';
import { useAuthorsQuery } from './hook';
import AuthorHelpText from './help-text';

export default function PostAuthorSelect() {
const { editPost } = useDispatch( editorStore );
Expand All @@ -21,6 +22,7 @@ export default function PostAuthorSelect() {
onChange={ setAuthorId }
value={ authorId }
hideLabelFromVision
help={ <AuthorHelpText /> }
/>
);
}
Loading