-
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
Add <ViewLink> component #50260
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:
I think we should try next consolidating the preview dropdown into the icon button with tooltip |
Just hopping in to say..I love the idea of the view link being inside the title bar! |
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.