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

Media Library: Add title/caption/description/alt to MediaItem #2469

Open
jeroendesloovere opened this Issue Feb 16, 2018 · 17 comments

Comments

Projects
None yet
2 participants
@jeroendesloovere
Member

jeroendesloovere commented Feb 16, 2018

Type

  • Feature

Problem description

When creating a media gallery, you can add images.
Sometimes you feel the need to have the option to add a description to every image.
Which can then be used in for example a Carousel.
=> This is currently not possible (and most of us create a Banner module to tackle this problem).

Example:
Title + Description + Link to the specific page.
schermafbeelding 2018-02-16 om 11 02 28

Expected behavior / Proposed solutions

We should add a button to every image, which opens a pop-up, where we can change the "text".
schermafbeelding 2018-02-16 om 11 03 54

What would be user friendly:

  • A way of showing that the image contains "text".

Note: this will add a database field to MediaGroupMediaItem

To Do:

  • [x] Integrate in MediaLibrary MediaItemEdit with multi-language support:
    • [x] Title
    • Caption
    • Alt text
    • Description
    • Link
  • [x] Integrate in MediaLibraryHelper for MediaGroups
@jeroendesloovere

This comment has been minimized.

Member

jeroendesloovere commented Feb 20, 2018

My suggestion:

  • title “text” field
  • description “text” field
  • link “text” field - you can add your url here
@jeroendesloovere

This comment has been minimized.

Member

jeroendesloovere commented Feb 20, 2018

Currently MediaGalleries are language-unaware.
Which makes my following question:
=> do it needs to be possible to add title/description/link for every language... f.e.: in a tabbed modal?

@carakas

This comment has been minimized.

Member

carakas commented Feb 20, 2018

@mathiashelin @Katrienvh are there other sliders that you would prefere for this over bootstrap slider? Or other feedback/requests

@jeroendesloovere

This comment has been minimized.

Member

jeroendesloovere commented Feb 20, 2018

@carakas The sliders part is not something that this feature should tackle.
This issue goes about adding "title"/"description"/"link" to the MediaGroupMediaItem.

Another PR will add bootstrap carousel:
#2470

@carakas

This comment has been minimized.

Member

carakas commented Feb 20, 2018

take a look at wordpress
screen shot 2018-02-20 at 11 20 59

I would use the same fields

@jeroendesloovere

This comment has been minimized.

Member

jeroendesloovere commented Feb 20, 2018

@carakas Thanks for your reply, but you are talking about something else.

MediaItem

=> This is were you are talking about.

  • Currently we have a title field.

MediaGroupMediaItem

=> This is where I am talking about.
A MediaGroup contains multiple MediaItem entities.
Because your MediaItem can be connected in multiple MediaGroup,
you must be able to add different information...

We want to be able to provide a MediaGroupMediaItem with a custom

  • title
  • description
  • link
    So we don't need any additional Banner modules any longer.
@carakas

This comment has been minimized.

Member

carakas commented Feb 20, 2018

I think you are starting to make it too complicated if this is the thing you are trying to do

@jeroendesloovere

This comment has been minimized.

Member

jeroendesloovere commented Feb 20, 2018

No no no, this is a huge one.

Example
On the home page of a website you need a slider, where you want to show some "news items"/"product foto's"/... each one should have a title/subtitle/ and a clickthrough to the detail page.

This is currently not possible in Fork CMS.
Unless you create your own module which will work with FileUploads... (too cumbersome)

That's why my feature PR would be to add these three fields, so this can be achieved.

@jeroendesloovere

This comment has been minimized.

Member

jeroendesloovere commented Feb 20, 2018

Use case examples:
schermafbeelding 2018-02-20 om 11 44 15

schermafbeelding 2018-02-20 om 11 44 57

schermafbeelding 2018-02-20 om 11 44 31

@carakas

This comment has been minimized.

Member

carakas commented Feb 20, 2018

and why wouldn't you do that on the top level? like I suggested?

@jeroendesloovere

This comment has been minimized.

Member

jeroendesloovere commented Feb 20, 2018

Hmmm, I have thought about it for some hours...
Ok, I'll do that.

@jeroendesloovere

This comment has been minimized.

Member

jeroendesloovere commented Feb 20, 2018

So:

  • Title (will be used in caption)
  • Subtitle (will be used in caption)
  • Alt (will be used in HtmlDOMElement)
  • Description (where will this be used??? @carakas, also in caption?)
  • Link (which will be used as href in <a> read more)
@carakas

This comment has been minimized.

Member

carakas commented Feb 20, 2018

@jeroendesloovere check how wordpress handles it

@jeroendesloovere

This comment has been minimized.

Member

jeroendesloovere commented Feb 20, 2018

Found on https://codex.wordpress.org/Media_Library_Screen

  • Title – The name of the media. A title is often shown on attachment pages and galleries if themes or plugins are designed to display it. F.e.: "Sunset"
  • Caption – A brief explanation of the media. F.e.: "Orange sea with sunset"
  • Description – An explanation of this particular media. F.e.: "Place: Okinawa Beach"
  • Alt Text – (Image files only) The alt text for the image, e.g. “The Mona Lisa” to describe the media. Used for accessibility. F.e.: "Sunset No. 1"

@jeroendesloovere jeroendesloovere changed the title from Media Library: Add option to add description to every MediaGroupMediaItem to Media Library: Add title/caption/description/alt to MediaItem Feb 20, 2018

@jeroendesloovere

This comment has been minimized.

Member

jeroendesloovere commented Feb 21, 2018

Progress so far in the MediaLibrary
Image:
schermafbeelding 2018-02-21 om 10 58 05
File:
schermafbeelding 2018-02-21 om 10 58 26

@carakas

This comment has been minimized.

Member

carakas commented Feb 21, 2018

wouldn't it be better to use an editor or textarea for the caption and description?

@jeroendesloovere

This comment has been minimized.

Member

jeroendesloovere commented Feb 21, 2018

I just changed the following:

  • caption and description now have TextareaType
  • captionLink added (Adding a CaptionLink has the advantage that the frontender can do anything with it.)
    schermafbeelding 2018-02-21 om 13 22 03

@carakas What do you think of this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment