WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.49k stars 4.19k forks source link

QuickEdit: Add password field data to the pages quick edit #66567

Closed louwie17 closed 2 days ago

louwie17 commented 3 days ago

What?

This adds a password field to the @wordpress/fields package for use within the DataForm component. In particular the page quick edit. Related issue https://github.com/WordPress/gutenberg/issues/64519.

Why?

The password field was missing from the page quick edit.

How?

A new password field is added to the @wordpress/fields component, which can be imported by using passwordField. The field it-self is mimicked from the current implementation in the site editor sidebar: https://github.com/WordPress/gutenberg/blob/2943dd3adfa4e1ad33b980760277377df9ac0f91/packages/editor/src/components/post-status/index.js#L222-L263 Class names have just been updated.

The password field is displayed within the status dropdown as part of the combined fields API.

Testing Instructions

  1. Enable the DataViews specific experiments under Gutenberg > Experiments
  2. Make sure you have a block themed theme enabled.
  3. Go to Appearance > Editor and click Pages
  4. Switch the page view to the table view
  5. Select a page and select the Details icon
  6. A Status & Visibility field should now be displayed
  7. Click on the visibility field and toggle the statuses, a password field should be shown if the status is not private
  8. Add a password and update the page ( it should update correctly )
  9. Select multiple pages, the Status & Visibility field should dissapear.

Testing Instructions for Keyboard

Screenshots or screencast

Screenshot 2024-10-29 at 2 42 21 PM Screenshot 2024-10-29 at 2 46 27 PM
github-actions[bot] commented 3 days ago

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: louwie17 <louwie17@git.wordpress.org>
Co-authored-by: jameskoster <jameskoster@git.wordpress.org>
Co-authored-by: oandregal <oandregal@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.