Jump to content

Media Manager


kongondo

Recommended Posts

2 hours ago, fruid said:

Now there's unfortunately no possibility to have any structure in the MM

@fruid,

True. This is planned for the next version of MM (see this post). I'll post a demo of it here later today. There is no firm ETA for its release but it will be after summer most likely.

Link to comment
Share on other sites

Hi all,

I wanted to update you on the progress of the next MM as discussed from this post onwards. Here's a very short preview of the next MM.

It is still very early days. Nothing is polished and things may change. My main focus is on the functionality although I spent a bit of time on the GUI. I have spent considerable time thinking about the conceptual design, especially for the API and I am quite pleased with that so far. 

Before you ask, I don't know when this will be ready. It is not a small re-write. I do know that it won't be until after the summer though, that's for sure. Happy to get early feedback, thanks.

 

 

  • Like 5
Link to comment
Share on other sites

how does that work? Each image still lives on a page object, right? What are the folders technically speaking? Will it be possible to move existing images into folders without destroying the image path?

Link to comment
Share on other sites

1 hour ago, fruid said:

how does that work?

Like ProcessWire page reference fields.

1 hour ago, fruid said:

Each image still lives on a page object, right?

Yes. Media pages are not nested. They reference 'categories' (folders) which themselves can be nested.

1 hour ago, fruid said:

What are the folders technically speaking?

To the user, they look like 'folders' in everyday computing (sort of). Conceptually, they are virtual folders. Technically, they are like page reference fields. This means that a media item can belong to more than one category. This is achieved simply by it referencing multiple 'category pages' (like page reference fields). So, technically, we don't nest media items. Instead, we nest the categories and the media items follow that, virtually.

Categories are nestable pages. For instance, in the demo, People is a top level category (folder) page. It has two (ProcessWire) page children, Men and Women. If we wanted to, we could further sub-divide this, e.g. Men > Sports Men > Martial Arts > Etc... These are all 'category' pages. It is not shown in the video but from the screenshot below, you can see the category 'Fruits' is deeply nested.

Deep Nesting

103407110_mm_next_folders_2023-05-13131414.thumb.png.75c4662cd3935917d281eaf05b86dda2.png

Back to the demo, for example, the images (media items) you see when viewing 'Men' have the category 'Men'. 

1 hour ago, fruid said:

Will it be possible to move existing images into folders without destroying the image path?

Definitely. This is because as explained above, we don't nest the media items themselves. Their paths are fixed. For instance, to move some media from the category 'Berries' into 'Apples', behind the scenes, we will just change its category (reference) to 'Apples' (or 'Green', to be more specific). The media itself doesn't move. I am still working on the 'move' from the UX point of view but it will most likely be via both drag and drop and using menu (context) options.

  • Like 4
Link to comment
Share on other sites

5 hours ago, kongondo said:

Hi all,

I wanted to update you on the progress of the next MM as discussed from this post onwards. Here's a very short preview of the next MM.

It is still very early days. Nothing is polished and things may change. My main focus is on the functionality although I spent a bit of time on the GUI. I have spent considerable time thinking about the conceptual design, especially for the API and I am quite pleased with that so far. 

Before you ask, I don't know when this will be ready. It is not a small re-write. I do know that it won't be until after the summer though, that's for sure. Happy to get early feedback, thanks.

 

 

Wow. Looks absolutely incredible. 😍 Really gives you a feel of an asset library. Great work. Looks intuitive too. Can't wait to test it out. 👍

Two questions: how should uploads happen? Can I just upload assets via DND in a folder or is the "New" button meant for uploads? If so, I would give it a different name, e.g. "Upload Media".

Second question: does the search always refer to the entire library or only to the currently selected folder? Can I change the search behaviour in an advanced mode?

  • Like 1
Link to comment
Share on other sites

59 minutes ago, David Karich said:

Two questions: how should uploads happen? Can I just upload assets via DND in a folder or is the "New" button meant for uploads? If so, I would give it a different name, e.g. "Upload Media".

  1. Uploads: Three way (all upload to the current category):
    • DnD
    • Via right click which pops open a contextual dialog and you select 'upload'
    • Via the 'New' button, which pops open a contextual dialog and you select 'upload'
  2. New Button: Opens a dialog/dropdown from which you can choose  'new folder',  'file upload'  or 'folder upload' [this latter one will also create the virtual folder, i.e. category]
1 hour ago, David Karich said:

Second question: does the search always refer to the entire library or only to the currently selected folder? Can I change the search behaviour in an advanced mode?

By default, yes, it is the entire library. However, there will be advanced search, accessible by clicking some icon within the search box. It will open a dialog within which you can set search parameters such as type, name, date, category, etc.

  • Like 1
Link to comment
Share on other sites

I just uploaded 800+ images to MM (with Scan + Publish) but when I jump to page 2 (or any further) of the pagination, I get a 

Error retrieving results: [object Object]

and do not see any images on the following pages.

BTW I very often have issues like that with pagination in PW admin in general, so maybe this is more like a core issue.

(PW 3.0.210)

 

Link to comment
Share on other sites

3 hours ago, fruid said:

I just uploaded 800+ images to MM (with Scan + Publish) but when I jump to page 2 (or any further) of the pagination, I get a 

Error retrieving results: [object Object]

and do not see any images on the following pages.

BTW I very often have issues like that with pagination in PW admin in general, so maybe this is more like a core issue.

(PW 3.0.210)

 

This sort of thing sometimes happen to me when Tracy Debugger is on, and I get an unexpected warning from some random module that messes up any ajax response by errors appended or prepended to it. Maybe you could take a look in the Network tab to see what you got in the pagination response?

  • Like 2
Link to comment
Share on other sites

9 hours ago, fruid said:

I get a 

Error retrieving results: [object Object]

As both you and @elabx have alluded to, it is a tricky one. For MM specifically, since we are using Lister (will change in the next version, most likely, to htmx), it could also point to an error about a particular image on a particular page. The [object Object] is most likely the text of the error that ProcessWire is returning. Like @elabx pointed out, have a look at the Network tab. A 500 error would mean a server error. Some of the possible causes are a very large image that MM did not finish resizing, or there was an error uploading it, hence clogging up stuff. I have received a number of suggestions about handling such stuff, especially from @gebeer.  I'll include this in the next updates. 

Back to your issue, I know 800 images is  lot because it means 800 pages, but if you are able to narrow this down to some possible 'big' images, you can sort out the issue manually by editing the relevant (MM) page. However, this too can make the system hang. So, you might want to resort to the API in that case.

Let me know how it goes

  • Like 1
Link to comment
Share on other sites

On 5/12/2023 at 7:30 PM, kongondo said:

Hi @Boost,

Are you able to install other modules by uploading their zip files? If not, I am thinking is a permissions issue in your system?

I'm able to install any other modules. BTW is this a paid module?

Link to comment
Share on other sites

On 5/13/2023 at 1:17 PM, kongondo said:

Happy to get early feedback, thanks.

This looks so much cleaner and easier to use than the current version. The context menu looks very nice already. The other elements could need some more polishing - I know that's not been a priority yet, still you asked for feedback 😉

Some things I noticed on the video
- a breadcrumb navigation should be visible to reflect the directory navigation (when you click on people it disappears, when you click on "men" it should show People > Men)
- the selected category and parent categories should be visible (when you click the "men" category nothing is active) (it would probably look nicer to use bold text instead of green)
- the spacings and alignments look a bit off. Some inspiration: 

https://demo.filerun.com/?username=admin&password=admin
and the screenshots below

 

https://cdn.dribbble.com/users/372375/screenshots/14473793/media/94daec64a83f99c8731e320df68d4541.png?compress=1&resize=400x300&vertical=topReact UI kit for Figma — Design & Code toolkit 2-in-1 by Roman Kamushken  for Setproduct on Dribbble

 

 

Advanced Search | Web design quotes, Web design, Web app designhttps://cdn.dribbble.com/users/971133/screenshots/15899953/media/d258260eeef2344436c1ccbc159ddc2d.png?compress=1&resize=400x300&vertical=top

 

 

  • Like 1
Link to comment
Share on other sites

is this version already available? Or any update for my current version? I'm on version 0.1.2 and was hoping an update would solve some bugs…

One bug I'm having is the pagination (not sure if I mentioned this before). I cannot go to the next pages in the MM pagination. And the little wheel loads forever, see screenshot.

Also, on the bottom you can read

Media Manager (Process) v0.1.2

twice. Seems buggy.

image.png.4c735b1801ccc43d118f83eade440e84.png

Link to comment
Share on other sites

On 4/20/2023 at 5:14 PM, kongondo said:
namespace ProcessWire;

$importedUsualPages = $pages->find("your-selector");

$arrayOfConnections = [
  'my-usual-page' => [
    'id' => 1876,
    'imported_mm_pages_ids' => [2035, 2036, 2038, 2056]
  ]
];

foreach($importedUsualPages as $importedUsualPage){
  $importedUsualPage->of(false);
  $mmField = new WireArray();
  $importedMMPagesIDs = $arrayOfConnections[$importedUsualPage->name];
  foreach($importedMMPagesIDs as $importedMMPageID){
    $mmFieldItem = new WireData();
    $mmFieldItem->id = $importedMMPageID;
    $mmFieldItem->type = 3;// 1-audio; 2-document; 3-image; 4-video
    // add MM item to WireArray
    $mmField->add($mmFieldItem);
  }
  // -----
  // populate mm_field of page
  $importedUsualPage->set('mm_field', $mmField);
  $importedUsualPage->save('mm_field');

I tried this approach but I get

Value set to field 'mema_images' must be a MediaManagerArray

(mema_images being the field of type "MediaManager" on the template for the pages where I want to "add" images or technically speaking refer to the image-pages)

 

  • Like 1
Link to comment
Share on other sites

19 hours ago, MrSnoozles said:

Some things I noticed on the video
- a breadcrumb navigation should be visible to reflect the directory navigation (when you click on people it disappears, when you click on "men" it should show People > Men)

Hi @MrSnoozles, Thanks for the feedback. Yes, a breadcrumb navigation is planned. I haven't started work on it yet. It will be very similar to Google Drive (i.e. like the demo.filerun).

19 hours ago, MrSnoozles said:

- the selected category and parent categories should be visible (when you click the "men" category nothing is active) (it would probably look nicer to use bold text instead of green)

True. And the 'green' is just for testing. So, no decision made there yet.

19 hours ago, MrSnoozles said:

- the spacings and alignments look a bit off. Some inspiration: 

The browser for the recording was zoomed in at around 175% so that could be the reason but I've note this, thanks.

Thanks!

6 hours ago, fruid said:

is this version already available? Or any update for my current version? I'm on version 0.1.2 and was hoping an update would solve some bugs…

Hi @fruid. No. As mentioned in the post with the video demo, the next MM will not be available until after the summer at the earliest.

6 hours ago, fruid said:

One bug I'm having is the pagination (not sure if I mentioned this before). I cannot go to the next pages in the MM pagination. And the little wheel loads forever, see screenshot.

I have also just noticed this. It must be related to a newer version of ProcessWire. I am only noticing it in 'All media' view. Pagination is working fine if viewing a single media type. 

6 hours ago, fruid said:

Also, on the bottom you can read

Media Manager (Process) v0.1.2

twice. Seems buggy.

It shouldn't show twice and yes, I have also seen this if in 'All media' view. That footer is not inserted by Media Manager. It is inserted by ProcessPageLister which is the class that ProcessMediaManager extends. The next version of MM will not be extending ProcessPageLister so this error won't occur.

5 hours ago, fruid said:

Exact as processed filename

Good idea. I'll add this.

2 hours ago, fruid said:

I tried this approach but I get

Value set to field 'mema_images' must be a MediaManagerArray

(mema_images being the field of type "MediaManager" on the template for the pages where I want to "add" images or technically speaking refer to the image-pages)

Sorry about that. I'll have a look.

1 hour ago, fruid said:

In an upcoming version, could you add the page-ID of the image when listing (or detail view) of an image in the MM? I can see title, name, dimensions, filesize, tags, … but no ID.

Will do.

1 hour ago, fruid said:

I hope you appreciate the feedback.

Totally! Thanks for all the feedback!

  • Like 1
Link to comment
Share on other sites

Hi kongondo,

I just watched the video and it looks very good! I already sent some suggestions a while ago, but I wanted to repeat an important one: I have some projects where the clients have lots of PDFs with very long detailed technical names. I assume the PDFs won't have thumbnails in Media Manager, so it would be very good if one could switch the view to a really compact list view, where the filenames would not be cropped. Perhaps in this list view also some other meta data could be shown, like filesize etc. Also I would add that the filenames or image titles as shown in the video are cropped in a way it makes them nearly unreadable. So I am wondering if you could consider an option to not crop those titles or filenames at all?

Link to comment
Share on other sites

how can I retrieve the URL (absolute path) of an image added to a media-manager-image field of a page? Can't find the API.

EDIT:

never mind, I figured it out, need to loop even though it's a single image.

foreach ($page->mmfield as $image) {
	echo $image->media->url;
}

right?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...