⚡ NEW: WordPress/gutenberg/pull/ - Collection
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Add <ViewLink> component #50260
Conversation
|
Size Change: +101 B (0%) Total Size: 1.37 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.
Works for me:
The labels on other elements ('Preview' / 'Saved') make for a somewhat jumbled appearance. It would be nice to eliminate those given we have the "Show button text labels" preference.
There's still some design work happening on the title outline that can change the final placement of this action later on.
Indeed, it's easy to imagine this button moving somewhere like:
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, sleek.
| import { store as coreStore } from '@wordpress/core-data'; | ||
| import { useSelect } from '@wordpress/data'; | ||
|
|
||
| export default function PreviewLink() { |
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.
| export default function PreviewLink() { | |
| export default function ViewLink() { |
Displays a button with an external icon to open a new window with the published post type


After #50217 and #50218.
This displays a discrete button for opening any current published post type in a new window. It uses the post type view label as provided.
There's still some design work happening on the title outline that can change the final placement of this action later on.