payloadcms / payload

Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for building powerful applications.
https://payloadcms.com
MIT License
27.67k stars 1.72k forks source link

fix(ui): add disabled attribute to blocks drawer toggler #9424

Open rilrom opened 7 hours ago

rilrom commented 7 hours ago

What?

When update access control is set to false, the blocks drawer can still be accessed. Blocks still cannot be saved to the document, making this more of a QoL improvement.

Why?

The blocks DrawerToggler is missing the disabled attribute.

How?

Adding the disabled attribute to the blocks DrawerToggler.

Reproduction steps

https://github.com/rilrom/payload/tree/issue/disabled-add-block-button

  1. Navigate to the posts collection.
  2. Click the 'Add blocks' button.
  3. Blocks can be selected (however they are still readonly in the document and cannot be saved).

Recordings

Before

https://github.com/user-attachments/assets/da12829d-5b27-4da9-bbd1-067d679a89ba

After

https://github.com/user-attachments/assets/67166477-b83a-4495-98ae-2d272542103b