Skip to content
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 classname to author select fill #85

Open
tomjn opened this issue Aug 18, 2021 · 0 comments
Open

Add classname to author select fill #85

tomjn opened this issue Aug 18, 2021 · 0 comments

Comments

@tomjn
Copy link
Contributor

tomjn commented Aug 18, 2021

In a project we need to show/hide the author selection panel dynamically based on another option, but there are no mechanisms to do this.

Unlike the other rows in the post status panel, authorships row does not have a special classname that could be used to toggle with CSS in place of other mechanisms

Luckily, there is a className prop on the PluginPostStatusInfo component: https://github.com/WordPress/gutenberg/blob/3da717b8d0ac7d7821fc6d0475695ccf3ae2829f/packages/edit-post/src/components/sidebar/plugin-post-status-info/index.js#L55

https://github.com/humanmade/authorship/blob/develop/src/plugin.tsx#L13 could be modified to add this prop, and we would be able to toggle the visibility of this UI without resorting to DOM hacking

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant