-
Notifications
You must be signed in to change notification settings - Fork 0
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
Only mention “public” in post status option if relevant. #3
Conversation
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.
I have struggled with this notation for a while. The disadvantage of this proposal is that if there are only 'public' => false
post statuses, so no public post statuses at all, the visibility remains a guess for users. I have also tried to shorten this with emojis or something, but that was not necessarily very clear either. That is how I eventually came up with this notation, it is not perfect, but I doubt whether this PR is an improvement. The backtics are also more of a markdown thing, should we use it like that? We need custom selects → https://developer.chrome.com/blog/rfc-customizable-select, https://open-ui.org/components/customizableselect/ 😏.
Can we not use plain old
I was somewhat hesitant to add them, but when both the post status and "public" were mentioned, I thought it needed some kind of distinction. However, the backticks are no longer needed with the |
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 solution, smart to use <optgroup>
elements for this.
if ( 0 === count( $group['options'] ) ) { | ||
continue; | ||
} |
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.
I prefer to use https://www.php.net/array_filter so that there is no such logic in the foreach.
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.
Changed in 85d7052.
I found the post status setting options a bit overwhelming:
This PR changes the option to only denote "public" if that is the case for the post status: