Matt and Mike talk about the Drupal 8's core media module, including the processes, issues, and ecosystems needed to make it happen.

This Episode's Guests

Adam Globus-Hoenich

Adam Globus-Hoenich

Maintainer of Media (and "initiative hustler") in Drupal 8 core. Senior Software Engineer at Acquia and principal engineer of the Lightning distribution.

Sean Blommaert

Sean Blommaert

Maintainer of Media in Drupal 8 core, and freelance Drupal developer.

Transcript

Transcript

Matt Kleve:
For December 13th, 2019 it's the Lullabot Podcast!
Matt Kleve:
Everybody it's the Lullabot Podcast episode 242. I'm Matt Kleve, Senior Developer at Lullabot with me as always co-host of the solo show, Senior Front-end Developer, Mike Herchel. Hey Mike.
Mike Herchel:
Hey, how are you doing?
Matt Kleve:
I'm doing pretty good. We're talking media today.
Mike Herchel:
Yeah.
Matt Kleve:
It's media.
Mike Herchel:
It's media, yeah.
Matt Kleve:
It is great. There was an old commercial that used to say that.
Mike Herchel:
Was that a Drupal commercial?
Matt Kleve:
It could be.
Mike Herchel:
[inaudible 00:00:46] commercials?
Matt Kleve:
Especially since we're at Drupal 8.8. Right?
Mike Herchel:
That's really true.
Matt Kleve:
Yeah. I think this commercial was from the '80s if I remember correct.
Mike Herchel:
It could it be, yeah. So anyway, Drupal 8.8 is released and with that comes a lot of improvements to media that's going on in core, right?
Matt Kleve:
Yeah. Media in Core is a big deal. And with us, we have two of the initiative leads for Media in core.
Adam G-H:
Hey, hello.
Matt Kleve:
Hello. So first step, we have Adam Globus-Hoenich, who is one of the maintainers of Media in DA Core. He's a Senior Software Engineer, Acquia and Principal Engineer at Lightning Distribution from Boston-ish in Massachusetts, in the USA.
Adam G-H:
Hi everybody.
Matt Kleve:
... phenaproxima on drupal.org and Twitter. I'm glad I pronounced that correct. Hey Adam, how are you doing?
Adam G-H:
I am doing okay. Greetings from Sunny Union City, New Jersey.
Matt Kleve:
Is that Boston-ish?
Adam G-H:
It depends on what your radius is.
Matt Kleve:
It's the ish part.
Adam G-H:
Boston is within 400 miles.
Matt Kleve:
Okay. All right.
Adam G-H:
So yeah, sort of.
Matt Kleve:
Okay. Also with us today, we have a maintainer of Media in Drupal core and freelance Drupal developer. He's from the Rotterdam area of the Netherlands. He's SeanB on drupal.org and Sean Blommaert on Twitter.
Sean Blommaert:
I bet you're doing well.
Matt Kleve:
As you might imagine, with us is Sean Blommaert. Hey Sean.
Sean Blommaert:
Yeah. Hi.
Matt Kleve:
Glad you're here.
Sean Blommaert:
Yes, very happy to be here.
Matt Kleve:
So let's jump in. Media went into Drupal 8 core at some point, right? A few versions ago. I'm trying to remember a few minor versions ago.
Adam G-H:
8.4.
Matt Kleve:
And so with 8.8 we see a pretty major update. Right? So what's new? What's cool?
Adam G-H:
Sean, do you want to take this? You're a better PR guy for this initiative.
Sean Blommaert:
So for the last I think mostly year, we have been working really hard to get the Media Library module into core and I can say that for 8.8 ship with a stable Media Library module, that's super awesome and that kept us busy for most of the year.
Adam G-H:
Yeah. To be clear, there was already... There was two parts of the system. There's the Media module and then that went in at 8.4 and it was never experimental. And then there was the Media Library, which has been around since 8.6 actually. But it has only become stable, and beautiful and awesome in 8.8.
Matt Kleve:
If I recall correctly, when the Media initially went into Core, there was almost no UI for it. Is that correct? It was just maybe the underlying architecture?
Adam G-H:
I mean there was the UI, but not anything nicer or exciting.
Matt Kleve:
Got you.
Adam G-H:
It's just some forms, some administrative views, a table of all your Media, pretty boring stuff by Drupal standards.
Matt Kleve:
Yeah. So the Media Library is more of what the UI, where you hit a button and it pops up like a little browser. Can you maybe walk maybe imagine there's a Drupal site builder that hasn't used Media UI or Media Library and maybe talk them through what it will look like, and what their actions are and what they can do with it.
Adam G-H:
I nominate you man.
Sean Blommaert:
No, that's fine. So the Media module ships with a custom entity like the nodes, but now it's media. And if you want to use media in articles for example, or blog posts, you need an entity reference field to link the media within your article. And in the beginning we shipped with the basic boring entity reference field where you have this auto complete. You need type in the Media name if you know it and then you can reuse it. And it looks beautiful on the front end, but for editors it was basically horrible.
Sean Blommaert:
So what we want to make it more a visual experience where you select images or videos that you know and you of course want to see them before you select them, which is hard to do in an auto complete, and we thought of this Media Library where you just click a button, it should open this library thing where you can have like a nice grid overview of all the media in your site and have some filters on it to make it easier to select stuff and then maybe also directly create things while you're at it. And yeah, so basically make it more easy for editors to select media.
Matt Kleve:
Got you. So, they can basically hit a button under node add form or whatever they're doing and a module will pop up. I guess you can figure your field to show either images or videos or whatever else you want. And then it can show you a grid of those or different options. And if I recall correctly, the stuff that has shown you is a few, right? So it's has exposed filters and you can even configure that yourself and stop me if I'm wrong here. So you can do searches and everything and they'll just filter everything like views magically will do. And at that point you click on the one you want, a big green check box [inaudible 00:06:25] right or I'm I thinking an entity browser, I don't know.
Sean Blommaert:
Well, there was this contrib module, media entity browser I believe that shows the green check marks on top of the media items but for core we just stuck to a simple checkbox on top of your grid item. Yeah. Just to make it a little bit more accessible. And we have all types of other information that we want to show in the grid. So yeah, having this big green check mark also has its own usability and accessibility problems.
Mike Herchel:
Sure.
Matt Kleve:
That makes sense.
Mike Herchel:
So entity browser came from contrib right? Just keep things straight.
Sean Blommaert:
Yes. So entity browser is a contrib module and we basically built something similar but totally different and way simpler.
Mike Herchel:
So before we go into contrib though, I want to maybe go into some more of the functionality of the core Media Library module. So the Media Library does allow a selection of multiple pieces of media at the same time. Is that correct?
Sean Blommaert:
Yes, you can select multiple media items at the same time when you open the Media Library, it's basically defined by what you're configuring your entity reference fields. So if you just enable, for example, remote videos and images, you can only select those.
Matt Kleve:
So the Media Library has really a custom widget for that entity reference field. Is that what's going on there?
Sean Blommaert:
Exactly right.
Mike Herchel:
Cool. And it allows the ability to upload like new items, correct?
Adam G-H:
Yeah, no, it totally does. For all the media types that come with core, you can do that. So for images or files, audio files, video files, you can upload, you've got a little thing above the grid of media items that lets you upload stuff, bio fields. And then for things like remote videos, which means YouTube and Vimeo, things that have a URL, there's a text field instead where you can just enter the URL and add a remote video that way. So yes, you can definitely add things from the Media Library.
Matt Kleve:
When you're adding things like that. Say I'm an editor and I want to categorize something, I can attach a field to the media entity, like I say, some type of free tagging taxonomy field and then categorize that and then maybe search based on that later?
Adam G-H:
Most definitely.
Matt Kleve:
Yeah.
Adam G-H:
Yeah, I get asked that one a lot actually and you could definitely do that. There's no reason you couldn't add a free tagging field to a media type and then there's no reason you couldn't display that in the Media Library when creating a new thing. And then obviously, the media library is built around a view so you can configure that view however you want to expose the tags and all this kind of stuff. So yeah, you could totally do all that.
Mike Herchel:
That is so awesome.
Adam G-H:
Thank you.
Mike Herchel:
Thank you. As Matt was saying earlier, there's some contrib modules that have this functionality in there and I'm guessing the Media Library supersedes those or makes those not needed anymore. Is that correct?
Adam G-H:
Nope. Most definitely not.
Mike Herchel:
All right. Well, I'm glad I'm asking that question then.
Adam G-H:
I'm glad you asked it also. The Media Library is limited on purpose. It is definitely not a replacement for something like entity browser. Entity browser is way more powerful and can do a lot more things. And the reason that Media Library is more limited, it's just because what the more complexity we introduce, the harder it becomes just to do one thing right. If you're trying to do all the things, you're not going to do any of them well. So Media Library only tries to do a few things well. And what we tried to do, our guiding principle is what 80% of sites need this out of the box. If it's something we felt was really common and it's not just us being like, "Oh well we think this is common." We've validated this also with the UX team and if it's something we thought that would be very common, we were inclined to put it into Media Library and otherwise it's like listen, you can already do this with entity browser and contribs. Those modules are not going anywhere and they shouldn't because entity browser and its ecosystem are fantastic.
Mike Herchel:
Cool. Now media works with the Wysiwyg editor, CK editor, correct?
Adam G-H:
It does.
Mike Herchel:
Oh that's so cool. And maybe I can even... How does it work with image styles if I want to insert stuff in CK editor, but I don't want it to be larger than 400 pixels wide? Can I do that?
Adam G-H:
Yeah, I think it would be a little bit... It's a step removed from what it would from directly embedding an image. But what happens is that when you embed media into a Wysiwyg, it's displaying that media using a view mode. So you could easily go configure that view mode for that media type and say, "Hey, in the embedded view mode, use an image style." It also lets you choose which view mode to use if you have multiple you want to choose from. And so you could totally do something like that. You could have a view mode called small, medium and large and have image styles configure differently on each of those. And then when embedding a thing in the Wysiwyg, you could choose which view mode you wanted to use for that particular embed. So yeah, there's some flexibility there.
Mike Herchel:
That's a lot of flexibility.
Matt Kleve:
I mean, you have a bunch of entities that can be rendered with view modes and I think as long as you're thinking along those lines, you're doing a lot of things right in the current Drupal 8 system.
Adam G-H:
I think that's a really good way of putting it. So yeah, a lot of flexibility there. I should mention, if you need more flexibility even than that, the entity embed module similar to entity browser, was built to handle the more complex edge cases and things that are less common. And that's not going anywhere either. So enjoy.
Sean Blommaert:
I also get asked that question a lot. Can we use the embedding that we have in core now also to embed notes and stuff like that? I think yeah, by default it does do that and entity and the embed, is meant not just for media embedding but for all types of entities that you want to embed. So I don't see that going away anytime soon and it shouldn't.
Mike Herchel:
So here's a question for you. If I'm building a site and I need to number one embed nodes, but I also need to embed media, do I need the Media Library module or should I just go straight with the entity embed?
Adam G-H:
Yeah, you shouldn't need the Media Library module. So you can do everything with entity embed and probably if you want to have a unified experience for your users, I would probably suggest you go for that. So technically you can also use them at the same time. They have both a similar tag, but it's slightly different. So it would not get into weight of each other.
Sean Blommaert:
Yeah, exactly. They should be able to run alongside each other and coexist peacefully.
Mike Herchel:
Got you. So entity browsers, is when you have a field and you're browsing for an entity. An entity embed is basically, with the entity browser but for CK editor. Am I understanding that correctly? [inaudible 00:14:20]
Adam G-H:
Pretty much.
Matt Kleve:
Yeah. One is the widget on the entity reference field and one is the button you click on the top of the Wysiwyg. Right?
Adam G-H:
Yeah.
Matt Kleve:
That's Great.
Mike Herchel:
Are there any other popular contrib modules that you feel people should know about?
Sean Blommaert:
The things that are mostly used are support for different types of media. So different sources. For example, if you want to have Instagram or Spotify or stuff like that, core doesn't do that by default. So we have a whole suite of media underscore entity underscore whatever modules that you can use. Besides that, there are things like drop zones that are very popular too. It will be also be integrated in the entity browser and of course, things to use for cropping your images and stuff like that. So yeah, those are the things that I find myself install a lot for clients and things I see in the projects that I join.
Mike Herchel:
So drop zone, is when you can have your browser and then just from another window dragged your file and just drop it into the area and then it'll trigger the upload. Am I understanding that correctly?
Sean Blommaert:
Oh, technically you could also drag and drop on an existing file field of course, but not all people know that.
Adam G-H:
Yeah. Because it doesn't really present itself that way.
Matt Kleve:
Ah, I never knew that either.
Adam G-H:
Yeah. I mean again, it's not obvious. There's nothing even that says you can drop a file here. There was an issue that was open to redesign all that and make them really look and behave more like drop zones, but unfortunately it was punted to Drupal 9 because it had some serious accessibility problems that we couldn't overcome in the short term.
Sean Blommaert:
I want us to talk about it.
Adam G-H:
I'm sorry Sean, I didn't mean to talk you over.
Mike Herchel:
Well, hey, you brought the magical word accessibility and I'm assuming since the Media Library is in Drupal core, it's pretty accessible. Am I correct on that?
Adam G-H:
Yeah, I think that would depend on who you asked.
Matt Kleve:
Well, I mean that's true of anything accessibility wise, right? I mean the gamut is wide and there are a lot of questions that are like, well, it's yes and no. Right? But it's something-
Adam G-H:
That's a lot of answers like that.
Matt Kleve:
... Yeah, I suppose.
Adam G-H:
What I can definitely say is, we put a lot of effort into accessibility for the Media Library. Everything we did that was user facing had to be validated by an accessibility maintainer. If we hadn't done that, this would have been done earlier in core. And I don't want to mean that the accessibility, people are an obstacle to be overcomed. They help tremendously and they're really smart. But yeah, we did a lot of work with that. There's definitely skeletons in the closet there and a lot of things that Drupal core itself, it has a lot of outstanding accessibility problems that we didn't necessarily cause, but that we inherited in a big way. So yeah, we try. [crosstalk 00:17:43]
Sean Blommaert:
And to be fair, we also are basically building this super Ajax UI that we don't really have in core yet. So we were, I don't know, wandering into new territories here and just sometimes reinvent the wheel and just figuring out while we go how to work with, I don't know, more complex Ajax and fancy UIs and making them very usable and accessible at the same time.
Adam G-H:
Exactly.
Mike Herchel:
I'm assuming, you're using jQuery UI to manage a lot of the Ajax interactions, is that correct?
Sean Blommaert:
Unfortunately, yes.
Mike Herchel:
Yeah. Well,
Adam G-H:
Yeah. We had the jQuery UIs for the modals but apart from that we are mostly using the Ajax system that we already have at the Ajax API.
Mike Herchel:
Got you.
Matt Kleve:
As a front-ender Mike, does that make you sad?
Mike Herchel:
I know there's been some issues with jQuery UI, Drupal cores is trying to deprecate it and it's old. And honestly, from my point of view, jQuery's developer experience is pretty nice. It's a lightweight module, it's super mature, but at the same time, when you're managing these multiple modals on all these states, it wasn't really built for that. It was more built for manipulating the DOM directly and cross browser, making everything easy cross browser, which isn't as much of an issue as it used to be.
Sean Blommaert:
We have definitely been fighting the Ajax system a lot.
Adam G-H:
It's like what we're doing, sorry, go ahead Sean.
Sean Blommaert:
No. You continue. I was just sighing.
Mike Herchel:
Yeah.
Sean Blommaert:
It was really a struggle at times. Yeah.
Adam G-H:
Whenever you say the Ajax system, I just sigh inward because that's the thing. The Ajax system we have in Drupal core just was not built to do the kind of things that Media Library needs to do. So we did have to swim upstream quite frequently. It's meant to be like, oh I click a button on this form and then something comes back and replaces something else in the form. But that's not really what the Media Library is, this is what we had to work with. That was a pain point for sure. And hopefully it's just bad now.
Mike Herchel:
So maybe just for the hell of it, do you have something particular in mind that that was a real pain point that you had to swim upstream for that you could maybe talk about and say, "Well, this is what we ran into. This was a real pain because of this and we ended up solving it with this piece of ugly code but it works. But maybe if we had a different library, we could do something different."
Adam G-H:
I recall a lot of things coming up from the Ajax stuff around accessibility actually, where there's a bunch of things where you'll ask the Ajax system to do something and it'll do it, but it won't necessarily be clear to assistive technology what was happening or what the result was. That was a thing we struggled with for quite a while. And I think there's still some outstanding issues there, but that's what I recall being a real pain in the butt. But I know Sean is probably just... He's probably sitting there right out just being like the [inaudible 00:21:23]. [crosstalk 00:21:25]
Sean Blommaert:
No, we have some places, for example, when you open the Media Library and at the left side you have these vertical tabs where you select different media types, those are just simple links. When you click them, we should replace something else into page. But for some reason the Ajax system didn't support doing that through a specific selector on the link. So we can do that when you use it from a forum or something like that. But from a link it wasn't possible. So now we had to overwrite a whole bunch of stuff in the Ajax system just to make something that would be relatively easy to add possible.
Sean Blommaert:
But also because the Ajax system is pretty old and it's also pretty widely used, people are really hesitant to touch it and extend it. In this case it was a lot easier for us to make progress by just overriding a bunch of it instead of trying to fix it where it should be fixed. We ran into a lot of things like that where we were just like, let's work around the issue and make it work for us instead of trying to fix it in the Ajax system itself because it's so complex.
Mike Herchel:
That makes a lot of sense. Yeah. Well, I'm sorry you had to deal with that, but thanks for dealing with that.
Sean Blommaert:
Welcome.
Matt Kleve:
Any other skeletons you want to talk about or anything that you [inaudible 00:23:00] when you think about how a problem was solved or something that's still outstanding?
Adam G-H:
Or something that's like broken something that's... I don't think you should do it that way.
Matt Kleve:
I was just going to say outstanding, broken is harsh.
Adam G-H:
Sean, should we tell him about the overflow bug?
Sean Blommaert:
Mm-hmm (affirmative)
Adam G-H:
This is a public issue. I can talk about it. Okay, I'll describe this one. This is not really a skeleton in the closet. This is more of a skeleton that's just dancing out in public. And basically it is currently, so let's say you have the Media Library and you're using it on a field that only allows three item, so you open up the Media Library, you're going to add three items and let's say you upload five, you create five new media items and they're automatically selected for you after you upload, It'll let you do that right now, but it won't work. It'll just be like, five of three items selected and then you'll say insert selected and you'll get some errors on the other side. That's a bug and that definitely makes me wince. And we wanted to fix it before 8.8 but we just didn't have the time. So hopefully-
Sean Blommaert:
It's also not that easy to fix though. And I think we ran into a lot of issues where you were like, okay, we know there's a problem, but we need to find a great solution for it. So in this case you could, for example, say, "Wait, you uploaded five items. I'm sorry you can't do that. We throw them all away. You start over." But that's probably not very user friendly. So now we decided that we want to have like... Okay, we keep the five items and we let you save them, but now you have to de-select two before you insert them back into your article. So that's of course a lot better solution because you uploaded some stuff and you want it to be in the system. You just can't use it all at the same time. But that does make the solution a lot more complex and yeah, just having something user friendly for things that seem simple problems can sometimes be a real pain. And since we have so many user facing features, that's something we always have to discuss with a lot of smart people before we get the right solution.
Sean Blommaert:
That's a hundred... You hit the nail right on the head. It's like a lot of times the problem is straightforward, but the fix is not precisely because there are always UX implications, there's always accessibility of vacations and we always have to think through those things before we just fix the bug in some way. That complicates things and it slows things down but it's a worthwhile process because that's how we got it to be as nice as it is.
Mike Herchel:
Yeah. That's why people use Drupal because it is accessible, because it is flexible, because it can do all these things. I would say because it is usable even though that's debatable depending on how you set it up. But yeah.
Matt Kleve:
I think it's one of the nice things is that a nice people like you two have solved these problems or at least thought about these problems before I tried to build something stupid that would find these problems anyway.
Sean Blommaert:
Yeah. Then there's this hard barred between sometimes you know there's a bug and you want to get it fixed and in normal projects for clients, you just ship with something better. It doesn't have to be perfect, but just improve it a little bit and it's already... It takes the immediate pain away. And from there we can see but for core of course, we can't ship a slightly better solution and then maybe throw that out later because we're only [inaudible 00:26:41] every six months. And besides that, having people that build on top of whatever you have or get used to whatever you have, and then taking it away again, it's way more problematic at the scale of Drupal core and for regular project. So for me personally, I work on projects a lot. That's something I still have to get used to every once in a while and can get pretty frustrated about.
Mike Herchel:
Yeah, it's like we have to try to get it as right as possible at the beginning and then we have to have a plan for the future because we know people are going to use this. They're going to extend it, they're going to build off it and if we break something, it's like, "Hey, why did you break my site?"
Matt Kleve:
Speaking of breaking things, we're talking with two of the maintainers of Media and Drupal 8 core and we're talking about the new stuff in media with the recently released Drupal 8.8. Coming up right after this break, we'll talk a little bit about what it took to get to this point in the process of working with core and working with people who are volunteers coming up right after this.
Mike Herchel:
Hey, it's Florida DrupalCamp organizer and DrupalEasy Podcast host, Mike Anello. How are you doing Mike?
Mike Anello:
Hey Mr Hershel, how are you? Thanks for having me.
Mike Herchel:
I'm doing pretty good. It's chilly outside.
Mike Anello:
I know. It's low 70s. I don't know how you and I are going to survive down here over the winter.
Mike Herchel:
Yeah, I know, in February, specifically around February 20th it's going to be about the same, right? That's [inaudible 00:28:14] temperature?
Mike Anello:
Yeah. If only there was a good reason for people to come down to Florida, the weekend of February 21st, 22nd and 23rd.
Mike Herchel:
Now that you mention it, Mike Anello, organizer of Florida DrupalCamp, isn't Florida DrupalCamp that same exact weekend?
Mike Anello:
Oh my goodness, Mike Herschel co-organizer of Florida DrupalCamp, I think it is.
Mike Herchel:
Yes. And it's going to be nice, warm and sunny. We're going to guarantee that. We have foresight into that. How many days is Florida DrupalCamp?
Mike Anello:
It's three days. The first day is a training day, that's Friday the 21st. The second day, Saturday the 22nd is wall-to-wall sessions and food and fun. And then the third day, Sunday the 23rd, it's like a two thirds day. We end a little bit early. We have a few sessions, but it's mainly a contribution day.
Mike Herchel:
Yeah. It's a contribution day. And when we say contribution day, we actually have a good amount of people contributing, correct?
Mike Anello:
We do. And we've got arguably, one of the top contributor, trainer, organizer, [herders 00:29:17], who's going to be there, [Emma Jane 00:29:19]
Mike Herchel:
Yeah. Absolutely. She gets stuff done and points people in the correct way. I'm one of the organizers for the new Drupal theme, which is going to be named [inaudible 00:29:34], which there'll be a subsequent podcast on, but I'm planning doing a sprint then. We're going to be hopefully deep into the theme process and we're going to need a lot of help.
Mike Anello:
So where and when can people register for this amazing event?
Mike Herchel:
Ooh, that's a good question. They can register right now at fldrupal.camp and the early bird tickets are $50. I believe the tickets go up to $75 January 17th. The camp is located in Orlando, which Orlando you can get flights to from anywhere and yeah.
Mike Anello:
All right, well come on down to the camp.
Mike Herchel:
Yeah, I agree. All right. Well, thanks Mike Anello organizer of Florida DrupalCamp for being on this podcast.
Mike Anello:
Oh, no. Thank you.
Mike Herchel:
All right.
Mike Herchel:
Welcome back. We're talking about media in Drupal core with a two of the maintainers for the media initiative, Adam and Sean, notice how I didn't have to say the last names.
Matt Kleve:
Tricky.
Adam G-H:
Lucky you.
Mike Herchel:
So yeah. Right. As we mentioned earlier, the core media has been in since 8.4-ish or maybe 8.5.
Adam G-H:
8.4.
Mike Herchel:
Yeah, 8.4. How long have you all been working on it? What has the process been like? And maybe take that into how the architecture was developed and how that goes into creating the media library module and things like that.
Adam G-H:
Oh, that's a big question.
Mike Herchel:
That's a big question.
Adam G-H:
The easy part is that I've been working on it since the end of 2016. I was asked to join a sprint in Berlin by [Yannis Slash RSM 00:31:33], who is no longer with the initiative. But the goal of that sprint was to take the media entity contrib module and refactor it so that it could become the basis for the media system in core. And so that's what we did. And that was my first involvement with it. Then after that I was just continually involved because it can become... Especially after Yannis departed, I was just like, "Okay, I guess I have to help more. So never happen." So yeah, it's just been a long process of trying to deliver things. I've been lucky in that, Acquia pays me primarily to work on open source and so I'm able to get a lot of work time to work on this as well. As long as I can show that it aligns with Acquia as goals as a company. And obviously delivering media handling is good for everybody. I was able to get a lot of time do that.
Matt Kleve:
Is that just like part of your job then? Or how do you work that in?
Adam G-H:
It's just part of my job. It's like-
Matt Kleve:
Cool. That's awesome.
Adam G-H:
... Hey, I have a gold list order to get it done or to get it to stable, which is not a big goal but there you go.
Matt Kleve:
Yeah. No pressure. Right. I mean-
Adam G-H:
[crosstalk 00:33:00]
Matt Kleve:
... Your professional life lays in the balance of an open source project which I suppose we all do. I don't know, maybe [crosstalk 00:33:12] it's not as dramatic as I'm making it out to be.
Adam G-H:
Yeah. Well, I can be pretty dramatic sometimes as everybody knows. But yeah, it's like I've just been doing a lot of the... Acquia has actually been really amazingly helpful in getting this thing to where it is. Not only by funding my time, but also funding the time of other contributors who worked on it. Like Sean contracted with Acquia to work on this with me and then we had Nate Andersen, okay Nate from Dede Auto working on the embedding stuff. We had [inaudible 00:33:45] working on embedding stuff. Acquia helps pay for a sprint in Barcelona at the end of last year where we redesigned the Media Library and sought out the UI a little bit more and got a lot done there too. So I think it's fair to say that without Acquias' help and the very least giving, paying for my time, paying for the time of a lot of contributors, it probably would be delayed much longer than it is. So thanks Acquia.
Matt Kleve:
Yeah. Thank you Acquia.
Adam G-H:
Definitely.
Mike Herchel:
So back to the question here. So this guy in with 8.4 and that was just the media entities in core and maybe the [crosstalk 00:34:30]-
Matt Kleve:
In the reference field. Right? Yeah.
Mike Herchel:
... Yeah, in the reference field, what was the process like from there? I'm guessing there was some outstanding bugs to fix and then starting on the Media Library and... Did that go in as experimental or did it come in the stable? How did that work?
Adam G-H:
The Media Library went in initially as experimental and it was at a proof of concept stage. In that form, it was written by Sam Mortenson and it was really basic, it lets you... It had two buttons where you could browse media, choose from existing and add new stuff. And that was what we were going to proceed with until around before 8.7, during the 8.7 development cycle. Sean was like, "We need to step back and rethink this. I think we have to really look at the UI more closely." That was a fair point because we were working from three year old mock-ups at that point, where circumstances had changed a lot. And that's what led us to the Barcelona sprint where we had a Christina, who I think is at Lullabot now, designing-
Mike Herchel:
That's Christina Chumillas. Correct?
Adam G-H:
... Yes. She helped us come up with a much nicer, more modern UI for it and we hacked out a prototype and in pieces we had to plan how to get that committed to Drupal 8.7 and we did, we pulled that off. So an 8.7 at Drupal core, I think that would have been Seattle. We were able to say, "Look at what the Media Library looks like now. Still experimental because we don't have Wysiwyg support yet, but it's beautiful. Oh my God." And then from there to 8.8, it was really about two things. It was about adding Wysiwyg support first and then getting it good enough to be marked stable by the committers. That definitely involves a lot of bug fixes and it involves me mostly working with Nate, who I mentioned to just hack through that, deliver the basics of what was needed and then just convince everybody that it was good enough to go. It's dragging a bag of cats.
Mike Herchel:
Dragging bag of cats. That could be the title of the podcast right there if we want.
Matt Kleve:
Don't call Peter.
Adam G-H:
I didn't say they were abused cats.
Matt Kleve:
They're in a bag and they're being dragged though.
Adam G-H:
[crosstalk 00:37:21] Because it's cats. So yeah, like cats don't want to go anywhere.
Matt Kleve:
What's wrong with having cats?
Mike Herchel:
What do you have against cats? You're going to piss off half of Drupal here Adam. I'm just [inaudible 00:37:32]
Adam G-H:
Okay. I am a dog person. I have to admit it, but I don't have a problem with cats. It's the thing that you want to drag a dog along, they follow walk.
Matt Kleve:
All right Sean, do you have anything to say? Tell me about this process Sean. Was it difficult working with all these people and getting this stuff in core? I mean, is this something you enjoy? Why do you care? Why is this something you spend your time doing?
Sean Blommaert:
For me, it also started at the Barcelona, at the Berlin sprint at the same time Adam started and at that time I was not doing a lot of core development. So for me, I wanted to be more involved in Media and Drupal 7 always was a little bit of a pain point for me. I saw Yannis talk at DrupalCon and talking about how media should be in core and I decided to join. I just went to the sprint with no real experience and just tried to learn as much as I can and just try to not be in the way. And from there when Yannis slowly started backing out with the initiative because he needed some time, because it was probably a lot of work and frustrating work for him at times as well, there was this gap and I jumped into it. I was lucky enough that my employer at the time allowed me to work on it and I didn't have children back then so I could spend a lot of my free time on it as well. I just did this basic patch improvements and just slowly learn the system more and got more involved. And over time I just grew to be one of the people who know most about it.
Sean Blommaert:
From there I also got the chance to be paid to work on this as well since Acquia recognized all the work I did and they wanted to help out. So from there we talked about getting the Media Library into core and that's also how I was like, we need to think before we start building stuff. So we did then the sprint that Adam told you about and yeah. From there we just slowly started issue by issue, doing all the work and sometimes you fix one issue and get three ones back. It was frustrating at times, but I learned a lot, I became a lot better developer. I get to meet and work with a lot of awesome and smart people. I'm still, I don't know, feel like I'm learning every day and I think it's super cool and it keeps me really motivated and the fact that it's now stable and being used by a lot of sites, it makes me happy-
Mike Herchel:
Yeah. That's so awesome.
Sean Blommaert:
... Even though it can be frustrating.
Matt Kleve:
It is good. Yeah. So Adam, even if you hate cats, I suppose we can [crosstalk 00:40:17]
Adam G-H:
I don't hate cats. Don't say I hate cats. I don't hate cats.
Matt Kleve:
Why is this something that you got passionate about? Why is this something that you care so much about?
Mike Herchel:
Hating cats, that is.
Matt Kleve:
Yeah, that's it. [crosstalk 00:40:27]
Adam G-H:
Oh my God. Okay, this will haunt me forever. Nevermind, it's not true. I got passionate about it because Drupal needs this. I've been working with Drupal since 2007 and it's like we don't have this really.
Matt Kleve:
I think there was a survey and the four, six, four, seven maybe even the four when it was like, "Hey, yeah Drupal's great if only media handling was useful."
Adam G-H:
Yeah. Well, 12 years later here we are. That for me is a lot of what drives it where it's just like, we need this. These are table stakes. The other reason is because as Sean alluded to, I have been able on this initiative to work with really awesome people that are just... I can't say enough nice things about them honestly. And I wouldn't know where to begin. Everybody is super smart, super nice, super knowledgeable and just persistent because a lot of what it takes to just get an initiative done in core is just persistence. Just constantly being like, how... Let's push this forward, let's push this forward, let's push this forward. It's frustrating and it's tiring. And if you have people who are blocking you and introducing bad attitudes and toxicity, how can you expect to get anything done? The fact that I was able to work with the people that I did on this, is a huge part of what kept me going. And it's a huge part of what keeps me in the initiative in Drupal 9 as well.
Matt Kleve:
Yeah. Was there any burnout? It sounds like it's something that...
Adam G-H:
Was there burnout?
Matt Kleve:
Yeah. You're still excited about it today as you were a year ago?
Adam G-H:
Yes I am, but I am hiatusing.
Matt Kleve:
Yeah, okay. There it is.
Adam G-H:
Yeah. No, I'm hiatusing until Drupal 9 because I mean, this was a big milestone.
Matt Kleve:
Yeah, it is.
Adam G-H:
Yeah no, absolutely. Getting it to stable took a lot of work. I had to work a bunch of late nights. I took on a lot of stress for it because I'm unofficially the initiative coordinator. I'm not listed in that capacity, but I'm doing that work and it's just a lot to do. I want to see the media initiative completed and that's going to be somewhere between Drupal 9 and 10. I want to see the initiative completed, but I have to safeguard my mental health too. So it's not really burn out, it's more just like, let's do this before burnout happens.
Matt Kleve:
Yeah, that's important.
Sean Blommaert:
Yeah. We call Adam do official media initiative hustler.
Matt Kleve:
That's good. I like that.
Sean Blommaert:
[crosstalk 00:43:24] You're hustling for commits and reviews all the time and it takes a lot of time and effort out of them. And I'm super glad he takes that on because it's not something that's really easy to do, but you manage just to get it done every time. So I'm really thankful for [crosstalk 00:43:42].
Matt Kleve:
Sean, has it been hard on you being involved in the initiative?
Sean Blommaert:
Not as hard as it had been on the Adam, but yeah, for me it's also since I didn't get all my hours covered in work time as Adam did, for me it's a lot more of the free time that I spend on it.
Matt Kleve:
Well, yeah. Our bio we read right at the beginning said you're freelance, so that's a totally different perspective for you, the time you spend working on Drupal couldn't be making you money. That's your [crosstalk 00:44:14].
Sean Blommaert:
Exactly. I have 60 hour work weeks and then also I try to do 10 hours a week of this in my free time and also three children. So I have a busy life. But yeah, we managed to get it done and it doesn't feel like work me. I just really enjoy working on this, I learned a lot from it and I think for me it also helps to promote myself a bit better. I get a lot more work because of it. I'm able to help clients better because I know so much and so many people because of this. I think it fits together really well.
Matt Kleve:
Sure. Right. Your knowledge of the media system makes you valuable as a freelancer. I mean that, absolutely.
Sean Blommaert:
Yeah. Even though it's not always paid hours, it's still adds a lot of value. Maybe not every hour is paid, but yeah, I do get a lot more work because of it. So in the end it is [inaudible 00:45:15].
Matt Kleve:
You're not just a developer, you're one of the developers. It's a difference.
Sean Blommaert:
It's hard to see myself that way, but I do notice more and more that people see it and they're thankful for it. That also gives me a lot of energy.
Mike Herchel:
I see you that way, Sean.
Sean Blommaert:
Thank you very much.
Mike Herchel:
You're welcome.
Matt Kleve:
Group hug. This sounds pretty successful. Yeah. I mean, we're happy with where we are?
Adam G-H:
I am. There's more to do, but I'm happy with where we are right now and I think that we did tremendous accomplishment in the Drupal 8 cycle. I think this is a really good time to step back and just be like, "Yeah, look at what we did now, let's fight the final set of dragons in Drupal 9." So yeah, I think that we've done what we set out to do in Drupal.
Matt Kleve:
Outside of bugs, are there any features that you're planning on putting in there for D9?
Adam G-H:
Nothing that leaps to mind. I mean like the initiative is pretty much feature complete where we're delivering all the features that we consider to be part of the minimum viable product as it were. The major thing that we need to deliver I think in Drupal 9, is we need to figure out how the media system is going to coexist with file and image fields. Because right now, if you're a site builder, you go to add a new field and it's like you can add a file field, an image field or a media field. It's like what's the difference?
Sean Blommaert:
[crosstalk 00:47:01] privately, it's not something we have at the moment. And if you really wants to replace files, then making a media item private somehow it's definitely a hard problem to solve.
Matt Kleve:
Oh, yeah.
Adam G-H:
We also need to have a migration path, people who have sites that have many file and image fields. If they want to use the media system, we have to find some way to move them over to media if they want to move over. So, that's a thing that we'll probably deliver. I'm hoping we'll do it in contrib, but it's definitely more [crosstalk 00:47:35]
Matt Kleve:
It's not something that's insurmountable for somebody who's writing their own migration anyway. I mean, the data's there. You can move the data. What's the challenge?
Adam G-H:
Oh no, it's definitely doable. I personally think that there should be a core sanctioned way that it's done where it's like, this is the migration path we actually support. [crosstalk 00:47:57]
Matt Kleve:
So is that hard because people snap together their own solutions that might not necessarily match the right way, trademark?
Adam G-H:
Yeah.
Sean Blommaert:
It's definitely hard. We already been dealing with that when we moved from media entity and contrib to media in core as well. For example, in a contrib module, a source field for your media items so the image or the URL to your YouTube video, it was not required. So in the end, when doing the migrations, people that didn't have a source fields configured for their media type, got into problems because we were expecting them to have one. This is just a small example, but I can imagine if we start trying to move a file fields over to media fields, you'd get into all kinds of really complex situations where a file is basically, it doesn't have a bundle and It's a really simple thing. But for media types you have, for example an image can belong to three media types, how can you make that process manageable and easy for users that have a bunch of file fields across a couple of content types? It's a really hard problem to solve and I don't think we really have a strong solution for it yet.
Matt Kleve:
So are we talking about deprecating regular image fields and the file fields in the future or am I just completely misunderstanding this?
Adam G-H:
I wouldn't go so far as to say that personally.
Mike Herchel:
You're talking about it.
Adam G-H:
Yeah, we were talking about but that doesn't mean it's going to happen.
Matt Kleve:
Exactly, yes.
Adam G-H:
We're trying to figure out how to make them make sense together. It's not so much about one replacing the other, it's more just like deprecating file and image fields might be the thing that makes the most sense but we don't know that yet. Really just making them coexist in a way that makes sense to site builders and make sense to authors is the most important thing I think.
Matt Kleve:
That makes sense. Cool.
Sean Blommaert:
And besides that on our roadmap there is the media module itself, the issues that are created for DOS for the last couple of year, we kind of... Not entirely ignore them, but they got a lot less attention. So there are probably a lot of features in there. The one thing that comes to mind when you have a media item and you use it in two different articles, you might want to change the Alltech 4:1 article or stuff like that. So overriding little pieces of media depending on words used, is something that's also a really complex issue and we are thinking about, and also next small little things we want to add to the Media Library, so that we have so many feature requests and a lot of good feature requests. I think it will keep us busy for a long time.
Matt Kleve:
Oh, how about overriding a caption? That's an example that I just did on a project. I mean, it's a very real thing.
Sean Blommaert:
In the Widget Wix editor, you can already add a custom captions but if you have a caption field on your media entity right now and you want to change that, it's currently not really possible with core. Like in projects most of the times some people use paragraphs or stuff where you add a bunch of fields into paragraph next to media item and then when trying to display it, you mix them together in different ways. That is something that I see but it would be great if core supported this because it's a sensible feature to have.
Matt Kleve:
Cool.
Adam G-H:
It's actually important from an accessibility perspective too because the things like all texts and captions need to make sense in the context that they show up. And that may not always be the case if you're just referencing some media items somewhere. So it's actually important from an accessibility and authoring perspective as well.
Matt Kleve:
So Adam, is there anything else you'd like to add as we point toward wrapping this up?
Adam G-H:
Oh, I don't know, a lot of things. I guess I would just say to quote Maui and Moana, what can I say except you're welcome.
Matt Kleve:
Now we want you to sing the song.
Adam G-H:
No, that's not going to happen sorry. I do not have... My pipes are not as good as the rock.
Matt Kleve:
One of those verses ends his ends with, now I'm stealing your boat. So are you [inaudible 00:52:40]
Adam G-H:
Yeah. Okay, we will end the podcast with that. I am stealing your boats. I mean basically, all I would tell people is, "I hope you enjoy it." We put a lot of thought into it. It's not [inaudible 00:52:46] browser, but hopefully it's good enough for you. So yeah, well wishes I suppose.
Matt Kleve:
Right on Sean.
Adam G-H:
And I'm stealing your boat.
Matt Kleve:
There you go. Right on Sean.
Sean Blommaert:
Yeah. For me it's something similar. I just want to say thank you and it's been a real pleasure to work with everyone involved and I hope everyone uses it and enjoys it. If it doesn't work for you, then it might be intentional and there is a lot of contrib modules that you can also use-
Matt Kleve:
Or they just didn't like you.
Sean Blommaert:
... So please don't be mad at us.
Matt Kleve:
Kidding.
Sean Blommaert:
We put a lot of time and effort into this trying to make it as good as we can but unfortunately we don't have unlimited time and unlimited resources. I'm pretty happy with it and hopefully people are too.
Matt Kleve:
So it's Adam and Shawn of course, we talked to you on the podcast today, but the project didn't happen because of YouTube alone. Right? There's a big team working on this.
Adam G-H:
How would you stay if I said that it was just us?
Matt Kleve:
Well, then I'd say, "Okay, cool. I'm glad you're here."
Adam G-H:
Yeah. No, there were so many people who worked on this and I don't think I can... I named a few people before, but there was also the entire UX. The UX team Christina, Angie, Gobbler, Jess, a lot of the committers, et cetera, et cetera. There were so many little contributions from so many people. I would give a particular shout out to [Reign 00:54:29], who helped us with accessibility things as did Andrew Macpherson. Both of them were tremendously helpful. And I mean, I don't know, I feel like if I... I guess I've already named names, but if I'm not naming you right now, you know who you are and-
Matt Kleve:
And you're appreciated.
Adam G-H:
... You have my heart. Yes, you're very appreciated. Absolutely.
Matt Kleve:
Because when some awkward podcast host puts you on the spot, it's hard to make sure that everybody gets mentioned. I wanted to take the opportunity to give you the... There's a bunch of people helping to make it awesome. So we're glad for them too.
Adam G-H:
And it's still not too late to help out yourself, by the way.
Matt Kleve:
Tell me how.
Adam G-H:
Even if it's just creating an issue, just something you've encountered that's weird, just create an issue for it. That already helps us tremendously because we don't have all the edge cases tested and everything. If something is not working, it could very well be the case and we need to fix it. So just testing and reporting issues is already tremendously helpful. 100%
Matt Kleve:
Mike, any final thoughts?
Mike Herchel:
I'm really excited about... This is something that, as you said earlier Matt, people have been asking for it for a long time and I'm sure it's going to solve pretty much all of my needs. And if not, I'm going to tweet at Sean just to yell at him.
Sean Blommaert:
Yeah, it solves a lot of problems. But as you know, building Drupal sites-
Mike Herchel:
It's a big deal.
Sean Blommaert:
... There are always that other problem that people have. It's the, "Hey, wouldn't it be cool if it would work this way?" The good thing is that you're able to still do that, right? You can build on top of the system that exists, but there's a system that's in place now has a lot of sane defaults and that's it.
Mike Herchel:
Yeah. And from my use of it, it's pretty amazing. So yeah. Thank you.
Matt Kleve:
That's great here.
Adam G-H:
Yeah, same.
Matt Kleve:
Thanks everybody.
Adam G-H:
Thanks for having us.

Published in

If you enjoyed this Episode, you may also enjoy...

About host Matt Kleve

Portrait of Matt Kleve
Matt Kleve has been a Drupal developer since 2007. His previous work in the media sparks a desire to create lean, easy to use workflow processes.

About host Mike Herchel

Thumbnail
A senior front-end developer, Mike is also a lead of the Drupal 9 core "Olivero" theme initiative, organizer for Florida DrupalCamp, maintainer for the Drupal Quicklink module, and an expert hammocker