Web News

Appnovation Technologies: Simple Website Approach Using a Headless CMS: Part 1

Web - बुध, 02/06/2019 - 3:00पूर्वान्ह
Simple Website Approach Using a Headless CMS: Part 1 I strongly believe that the path for innovation requires a mix of experimentation, sweat, and failure. Without experimenting with new solutions, new technologies, new tools, we are limiting our ability to improve, arresting our potential to be better, to be faster, and sadly ensuring that we stay rooted in systems, processes and...
वर्ग: Web

PreviousNext: Using the new Media Library in Drupal 8.6

Web - 7 hours 56 मिनट पहले

Drupal 8.6 has shipped with the Media Library! It’s just one part of the latest round of improvements from the Media Initiative, but what a great improvement! Being brand new it’s still in the “experimental” module state but we’ve set it up on this website to test it out and are feeling pretty comfortable with its stability.

by Rikki Bochow / 25 September 2018

That said, I highly encourage you test it thoroughly on your own site before enabling any experimental module on a production site. Don’t just take my word for it :)

What it adds

The Media Library has two main parts to it...

Grid Listing

There’s the Grid Listing at /admin/content/media, which takes precedence over the usual table of media items (which is still available under the “Table” tab). The grid renders a new Media Library view mode showing the thumbnail and compact title, as well as the bulk edit checkbox.

Field Widget

Then there’s the field widget! The field widget can be set on the “Manage Form Display” page of any entity with a Media Reference Field. Once enabled, an editor can either browse existing media (by accessing the Grid Listing in a modal) or create a new media item (utilising the new Media Library form mode - which is easy to customise).

The widget is very similar to what the ‘Inline Entity Form’ module gave you, especially when paired with the Entity Browsers IEF submodule. But the final result is a much nicer display and in general feels like a nicer UX. Plus it’s in core so you don’t need to add extra modules!

The widget also supports bulk upload which is fantastic. It respects the Media Reference Fields cardinality, so limit it to one - and only file can be uploaded or selected from the browser. Allow more than one and upload or select up to that exact number.  The field even tells you how many you can add and how many you have left. And yes, the field supports drag and drop :)

What is doesn’t add WYSIWYG embedding

WYSIWYG embed support is now being worked on for a future release of Drupal 8 core, you can follow this Meta issue to keep track of the progress. It sounds like some version of Entity Embed (possibly limited to Media) will make it’s way in and some form of CKEditor plugin or button will be available to achieve something similar to what the Media Entity Browser, Entity Browser, Entity Embed and Embed module set provides currently.

Until then though, we’ve been working on integrating the Media Libraries Grid Listing into a submodule of Media Entity Browser to provide editors with the UX improvements that came with Media Library but keeping the same WYSIWYG embed process (and the contrib modules behind it) they’re currently used to (assuming they’re already using Media Entity Browser, of course). More on this submodule below.

This is essentially a temporary solution until the Media Initiative team and those who help out on their issue queue (all the way from UX through to dev) have the time and mental space to get it into core. It should hopefully have all same the bulk upload features the field widget has, it might even be able to support bulk embedding too!

View mode or image style selectors for editors

Site builders can set the view mode of the rendered media entity from the manage display page, which in turn allows you to set an image style for that view mode, but editors can’t change this per image (without needing multiple different Media reference fields).

There is work on supporting this idea for images uploaded via CKEditor directly, which has nothing to do with Media, but I think it would be a nice feature for Media embedding via WYSIWYG as well. Potentially also for Media Reference Fields. But by no means a deal breaker.

Advanced cropping

From what I can gather there are no plans to add any more advanced cropping capabilities into core. This is probably a good thing since cropping requirements can differ greatly and we don’t want core to get too big. So contrib will still be your goto for this. Image Widget Crop is my favourite for this, but there’s also the simpler Focal Point.

Testing out the Media Entity Browser submodule

You can test out the submodule from the patch on this issue and let us know what you think! Once the patch is added, enable the submodule then edit your existing Entity Browsers and swap the View widget over to the “Media Entity Browser (Media Library)” view.

It shouldn’t matter if you’ve customised your entity browser. If you’ve added something like Dropzone for drag-and-drop support it *should* still work (if not, check the Dropzone or Entity Browser issue queues). If you’ve customised the view it uses however, you might need to redo those customisations on the new view.

I also like updating the Form Mode of the Entity Browsers IEF widget to use the new Media Library form display, which I always pair back to just the essential fields (who really needs to manually set the author and created time of uploaded media?).

You still can’t embed more than one media item at a time. But at least now you also can’t select more than one item when browsing so that’s definitely an improvement.

Plus editors will experience a fairly consistent UX between browsing and uploading media on fields as they do via the WYSIWYG.

Once setup and tested (ensuring you’ve updated any Media Reference Fields to use the new Media Library widget too) you can safely disable the base Media Entity Browser module and delete any unused configuration - it should just be the old “Media Entity Browser” view.

Please post any feedback on the issue itself so we can make sure it’s at its best before rolling another release of the module.

Happy days!

I hope you have as much fun setting up the Media Library as I did. If you want to contribute to the Media Initiative I’m sure they’ll be more than happy for the help! They’ve done a fantastic job so far but there’s still plenty left to do.

Tagged Media in Core, CKEditor
वर्ग: Web

Japan’s mini space elevator goes to space - CNET

Webware - 9 hours 8 मिनट पहले
And we have lift off!
वर्ग: Web

Mark Hamill's one-word-a-day tweets finally explained - CNET

Webware - 9 hours 35 मिनट पहले
Raise a toast of blue (or green) milk, it's Luke Skywalker's 67th birthday!
वर्ग: Web

Google Doodle aims to help button up your voter registration - CNET

Webware - 10 hours 24 मिनट पहले
Election day is quickly approaching, and Google is reminding voters to make sure they can vote.
वर्ग: Web

Instagram co-founders leaving Facebook to 'explore creativity again' - CNET

Webware - 10 hours 31 मिनट पहले
CEO Kevin Systrom and CTO Mike Krieger have resigned their positions at the photo-sharing app.
वर्ग: Web

Twitter reacts to Gritty, the most frightening mascot ever invented - CNET

Webware - सोम, 09/24/2018 - 10:54pm
The new Philadelphia Flyers mascot will keep you up at night.
वर्ग: Web

Google CEO Sundar Pichai plans private meeting with GOP lawmakers - CNET

Webware - सोम, 09/24/2018 - 9:49pm
Among the planned topics of discussion is the company's alleged political bias in search results.
वर्ग: Web

How drones and lasers will help us predict volcanic eruptions - CNET

Webware - सोम, 09/24/2018 - 7:18pm
New early warning systems mean scientists can better forecast when a mountain is about to blow its top.
वर्ग: Web

RIP Al Matthews: As Sgt. Apone, he fought to the end in Aliens - CNET

Webware - सोम, 09/24/2018 - 6:47pm
The actor and singer was a military vet himself when he played the cigar-chomping space leader.
वर्ग: Web

Microsoft and Shell team up to build AI into gas stations - CNET

Webware - सोम, 09/24/2018 - 6:07pm
Shell is experimenting with cameras that can tell if you're smoking at a gas station.
वर्ग: Web

Surprising tech and gadgets you can get on Amazon for under $50 - CNET

Webware - सोम, 09/24/2018 - 5:04pm
These items are fun, useful and in many cases, weird as hell.
वर्ग: Web

Matt Glaman: Xdebug over the command line with DDEV

Web - सोम, 09/24/2018 - 5:00pm
Xdebug over the command line with DDEV Mon, 09/24/2018 - 16:00 mglaman

I moved over to DDEV for my local development stack back in February. One of my favorite things is the ease of using Xdebug. You can configure Xdebug to always be enabled, or turn it on and off as needed (my preferred method.) When you have Xdebug enabled, it also enables it for any PHP scripts executed over the command line. That means you can debug your Drush or Drupal Console scripts like a breeze!

This article is based on using Xdebug within PhpStorm, as it is my primary IDE.

वर्ग: Web

Snapchat test lets you point camera at products and buy them on Amazon - CNET

Webware - सोम, 09/24/2018 - 4:34pm
It's not just about the filters anymore. Snapchat now wants to help you shop.
वर्ग: Web

Lotus needs your help finding its very first car - Roadshow

Webware - सोम, 09/24/2018 - 4:15pm
Its whereabouts "have never been established." This could be tough.
वर्ग: Web

Alaska Airlines will make long flights more bearable with VR movies - CNET

Webware - सोम, 09/24/2018 - 4:11pm
The airline teamed up with SkyLights, maker of the Allosky VR headset.
वर्ग: Web

Microsoft Ignite 2018: Windows Virtual Desktop, Office 2019 and everything else just announced - CNET

Webware - सोम, 09/24/2018 - 4:11pm
Surface Hub 2 news, big search changes, Azure Sphere, Microsoft Teams and more.
वर्ग: Web

This 'ghosted' texting Halloween costume is truly haunting - CNET

Webware - सोम, 09/24/2018 - 3:37pm
A skimpy costume tries to spook us with unanswered text messages.
वर्ग: Web

2019 Honda Civic's new Sport trim starts at $21,150 - Roadshow

Webware - सोम, 09/24/2018 - 3:33pm
The whole lineup remains about as affordable as ever.
वर्ग: Web

Dell's ultrathin S2718D HDR monitor cut to $220, can charge your laptop - CNET

Webware - सोम, 09/24/2018 - 3:33pm
This 27-incher packs a lot of USB-C goodness.
वर्ग: Web