Skip to content
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

Add image credits to the 'Edit Metadata' editor modal. #615

Open
matiasbenedetto opened this issue May 3, 2024 · 3 comments
Open

Add image credits to the 'Edit Metadata' editor modal. #615

matiasbenedetto opened this issue May 3, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@matiasbenedetto
Copy link
Contributor

What?

The deprecated admin page has a field to add image credits to the theme readme.txt file.

image

The site editor modal 'Edit Metadata' doesn't have it.

Screenshot from 2024-05-03 17-08-56

Expected

It seems like the Image credits field should be added to the modal.

@matiasbenedetto matiasbenedetto added the enhancement New feature or request label May 3, 2024
@t-hamano
Copy link
Contributor

I made a simple mockup, what do you think? You can check the branch on metadata-image-credits and the code on e9ac753.

fc14fa48df4dd4317a1ae4fcc17878e8.mp4

This mockup has separated the title, license type, and source URL into separate fields, but there may be two problems:

  • Users may wish to add information other than these three.
  • On deprecated admin pages, this field is a textarea. Therefore, it is difficult to parse that text and sort it into title, license type, and source URL.

Is it simply better to use a textarea?

@matiasbenedetto
Copy link
Contributor Author

The mockup looks good and could be useful for creating new themes. Still, it adds an extra parsing complexity in case we want to load the existing readme.txt info from existing themes into the 'edit metadata' modal (#631), which I think could be a nice follow-up of #626.

It's not likely that all the themes with image credits have image credits in a uniform format, making it easy to parse to identify 'title,' 'license', and 'source URL' elements. Maybe we can this UI when the content of Image Credits is parsed as expected and and use the textarea as a fallback in cases where the content cannot be parsed.

@pbking
Copy link
Contributor

pbking commented May 13, 2024

Is it simply better to use a textarea?

Yes, I think that it would be better to just use a textarea. As @matiasbenedetto mentioned there's no way to know that the format of existing image credits are in. Better to just give users a block to edit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

3 participants