humanmade / humanmade/authorship

Add classname to author select fill

Open
#85 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
68
Forks
11
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.