Closed miragecraft closed 1 year ago
This is on purpose. The cover field defined in cover.yml is used in two places: note.yml and album.yml. The field queries images with the image
blueprint assigned which is also the template that is assigned to uploads through this field. While the files section uses the blocks/image
file template/blueprint.
Ok, I think I know what it's doing - the blocks/image
template is used so that the image block item can select it.
However why make images under blocks/image
template unavailable to be selected as cover?
The main gripe I have with this, is that by default the cover is set to one of the blocks/image
files, so you're presented with an initial setup that's not possible to re-create using the blueprint provided.
That seems wrong?
@texnixe Have to agree here with @miragecraft. It seems wrong to have currently a cover selected but when one wants to change the selection no images are available to select - not even the one that is currently selected. That seems to contradict itself and isn't a great yes experience for the files field.
@distantnative Right, the selected image should of course have the template assigned for upload, otherwise it doesn't make sense. Other than that, it might make sense to keep the distinction between the the template assigned to the field and the section, so that a cover image is not used again within the text, and for learning purposes.
blueprints\fields\cover.yml
file is used in multiple places, however it does not allow you to select images on the note page because the note page usesblocks/image
as template whilecover.yml
is using the querypage.images.template('image')
.I can fix this by changing it to
page.images
to omit the template, orpage.images.filterBy("template", "in", ["image", "blocks/image"])
to include both.