processwire-requests icon indicating copy to clipboard operation
processwire-requests copied to clipboard

Style image description field the same as custom fields

Open Toutouwai opened this issue 6 months ago • 0 comments

Short description of the enhancement

In the blog post that introduced the custom fields for files and images feature it says:

if you are using custom fields, you might want to disable the description and/or tags fields for the image, just for a more consistent appearance of inputs

But this is not always as straightforward as it sounds because sometimes there's a need to introduce custom fields to a images/files field that is already in use with many existing descriptions. It's possible to use the API to copy all the existing descriptions into a new "Descriptions" custom field but this wouldn't be an easy task for many users, it would necessitate changes in how the description is accessed in template files and other API code, and it would just be nice to be able to avoid it.

If the Description field was styled the same way as custom fields (and nearly all other inputfields in the PW admin) then when custom fields are added they would sit more nicely alongside the description field.

So this... 2024-08-01_124549 ...would instead look like this... 2024-08-01_124722

It would also make the Description field more clear and accessible because currently the only visible "Description" label is the placeholder, which means that it's no longer visible as soon as the field is populated.

Probably it would be good to make similar changes to the Tags field when that is enabled.

Using the standard inputfields for Description and Tags will be less space efficient so that is a downside, but worth the trade-off in my opinion. Reducing the excessive padding of AdminThemeUikit inputfields across the whole PW admin theme would mitigate this downside to some extent, something that's been raised a number of times.

Toutouwai avatar Aug 01 '24 01:08 Toutouwai