Though it is an edge case, it might be useful to indicate to the user that such a password isn't allowed and has been truncated. @peterwilsoncc's idea that one.
2. Uncheck password protected when the password field is empty
When clearing a post password, the Pasword Protected checkbox remains open, even after saving the post.
This communicates that it's enabled, even though the password is empty and the password protection is disabled.
It might be useful to update the showPassword state when toggling the panel to uncheck it.
What problem does this address?
A follow up on:
Context: https://github.com/WordPress/gutenberg/pull/64156#issuecomment-2261912927
1. Add an inline error to warn about a 255+ char password
The protected post field in the database accepts a character count of up to 255.
Anything beyond that returns a server error.
https://github.com/WordPress/gutenberg/issues/64155 limited character input to 255 characters.
Though it is an edge case, it might be useful to indicate to the user that such a password isn't allowed and has been truncated. @peterwilsoncc's idea that one.
2. Uncheck password protected when the password field is empty
When clearing a post password, the Pasword Protected checkbox remains open, even after saving the post.
This communicates that it's enabled, even though the password is empty and the password protection is disabled.
It might be useful to update the
showPassword
state when toggling the panel to uncheck it.https://github.com/user-attachments/assets/6cc41c6e-9847-4742-989e-e64a816e5389
Example:
What is your proposed solution?