? NPM Resource Changed ? ? Pending

User tests: Successful: Unsuccessful:

avatar dgrammatiko
dgrammatiko
26 Jun 2021

Pull Request for Issue #32642 and https://www.facebook.com/groups/joomlanospam/posts/10157777796480997/?__cft__[0]=AZXC8G44TJLPO0QeEbytZwSVaZX2YpNFHjOUcx1xUqyJjBUZGqgh763LWT-Lx2xKyvJfIm-LQO6wUquCrqneOLqSAlx3AOpRDAxnMrliJHTTK1AIkT4Mh-BVfJCJjMVFEyDYelefuWE8UMA3X6_-XUFRasmSPT8VNhUVlOln0Ujj4LCrwnBYH_QLfColkn2QEkk&__tn__=%2CO%2CP-R

Apparently, the Joomla community finds it totally fine to use software that is based on a javascript that's 2 major versions behind. It's not fine for me thus the PR...

Summary of Changes

  • Reworked the media select Javascript
  • Changed the one field for all the supported extensions to multiple fileds in Media Manager (this needs to be communicated as it's a B/C break, and also it needs updates to the sql files)
  • Reworked/added file types in the vue App (the files need to enable the preview)

Please extract this
Archive.zip
to the images directory, or use your own mp3/mp4/pdf files

Testing Instructions

  • Apply the PR or downlad the installable from github

  • If you're applying the PR then go to the Media manager options and

  • Make sure the legal mime types are: image/jpeg,image/gif,image/png,image/bmp,audio/mp3,video/mp4,application/msword,application/excel,application/pdf,application/powerpoint,text/plain,application/x-zip

  • the video extensions are mp4

  • the audio extensions are mp3

  • the document extensions are odg,odp,ods,odt,pdf,png,ppt,txt,xcf,xls,csv

  • and finally the images extensions are: bmp,gif,jpg,jpeg,png,ico This is IMPORTANT

  • Go to tinyMCE and:

  • Select the image from the CMS Content dropdown

  • Then select the video file, click on the controls and embed checkboxes, change the width and height and then click select image at the bottom of the modal

  • Press couple returns type Video Link and select the text you just wrote

  • Then select the video file, without selecting the controls and embed checkboxes (width and height is irrelevant here) and then click select image at the bottom of the modal

  • Check the produced HTML by clicking the toggle button under the editor

  • Select the image from the CMS Content dropdown

  • Then select the audio file, click on the controls and embed checkboxes and then click select image at the bottom of the modal

  • Press couple returns type Audio Link and select the text you just wrote

  • Then select the audio file, without selecting the controls and embed checkboxes and then click select image at the bottom of the modal

  • Check the produced HTML by clicking the toggle button under the editor

  • Select the image from the CMS Content dropdown

  • Then select the PDF file, click on the embed checkboxe change the width and height and then click select image at the bottom of the modal

  • Press couple returns type PDF Link and select the text you just wrote

  • Then select the PDF file, without selecting the embed checkboxe and then click select image at the bottom of the modal

  • Check the produced HTML by clicking the toggle button under the editor

  • your final html should look like:

<p><video controls="controls" width="800" height="600">
<source src="/images/flower.mp4" type="video/mp4" /></video></p>
<p> </p>
<p><a href="images/flower.mp4" download="">Video Link</a></p>
<p> </p>
<p><audio src="images/t-rex-roar.mp3" controls="controls"></audio></p>
<p> </p>
<p><a href="images/t-rex-roar.mp3" download="">Audio Link</a></p>
<p> </p>
<p><object data="images/core_xy_exploded_infographic1.pdf" type="application/pdf" width="800" height="600">
You don't have a pdf plugin, but you can <a download="" href="/images/core_xy_exploded_infographic1.pdf"> download the pdf file.</a></object></p>
<p> </p>
<p><a href="images/core_xy_exploded_infographic1.pdf" download="">PDF Link</a></p>
  • Check that the insertion of an image is still ok

  • Check that the media FIELDS (intro/fulltext images) are still functional

  • Finally save the article and visit it in the front end. That's it.

  • Edit the definition of the intro image

    <field
    name="image_intro"
    type="media"
    label="COM_CONTENT_FIELD_INTRO_LABEL"
    />
    by adding types="images,audios"

  • Test the field, you should be able now to select images and audio files, also try to upload an unsupported file (eg video and pdf)

  • Repeat with different combinations types="images,audios,videos,documents"

Actual result BEFORE applying this Pull Request

Impossible to select/embed anything other than an image file

Expected result AFTER applying this Pull Request

It's ok to select/embed audio, video, document files
Screenshot 2021-06-26 at 23 04 08
Screenshot 2021-06-26 at 23 04 38
Screenshot 2021-06-26 at 23 04 28
Screenshot 2021-06-26 at 23 04 18

Front end:
j4 local_index php_teststststtsts

Documentation Changes Required

There are few todos that I skipped here:

  • sql files
  • remove renamed files
  • rename the xtd button image to media as the image is confusing now

@wilsonge @laoneo any feedback?

avatar dgrammatiko dgrammatiko - open - 26 Jun 2021
avatar dgrammatiko dgrammatiko - change - 26 Jun 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 26 Jun 2021
Category Administration com_media JavaScript NPM Change Language & Strings Repository Layout Front End Plugins
avatar dgrammatiko dgrammatiko - change - 26 Jun 2021
The description was changed
avatar dgrammatiko dgrammatiko - edited - 26 Jun 2021
avatar brianteeman
brianteeman - comment - 26 Jun 2021

looking forward to testing this tomorrow

avatar dgrammatiko dgrammatiko - change - 26 Jun 2021
Labels Added: ? NPM Resource Changed ?
avatar dgrammatiko dgrammatiko - change - 26 Jun 2021
The description was changed
avatar dgrammatiko dgrammatiko - edited - 26 Jun 2021
avatar joomla-cms-bot joomla-cms-bot - change - 26 Jun 2021
Category Administration com_media JavaScript NPM Change Language & Strings Repository Layout Front End Plugins Administration com_media JavaScript NPM Change Language & Strings Repository Layout Libraries Front End Plugins
avatar joomla-cms-bot joomla-cms-bot - change - 26 Jun 2021
Category Administration com_media JavaScript NPM Change Language & Strings Repository Layout Front End Plugins Libraries Administration com_media JavaScript NPM Change Language & Strings Repository SQL Installation Postgresql Layout Libraries Front End Plugins
avatar brianteeman
brianteeman - comment - 27 Jun 2021

Tested using your supplied files. Only the pdf uploads. The mp3 and mp4 give a generic cant be uploaded message.
Tested a larger 5mb mp4 and it doesnt appear to do anything. No upload, no error, nothing
Sometimes after one of the failures the session is killed and you have to log in again

avatar brianteeman
brianteeman - comment - 27 Jun 2021

The problem was in your test instructions. Better to clear the existing values in the options and then save in order to get the defaults. If it had been customised at all it would fail

avatar brianteeman
brianteeman - comment - 27 Jun 2021

Click on a pdf file and then click on the three dots
Check the console

media-manager.min.js?6a2a37958931d4cd9934c0d049a970a8:1 Uncaught (in promise) TypeError: Cannot read property 'focus' of undefined
    at Proxy.<anonymous> (media-manager.min.js?6a2a37958931d4cd9934c0d049a970a8:1)
avatar brianteeman
brianteeman - comment - 27 Jun 2021

mp4 files have previews but there is no preview icon (you need to double click on the file to see the preview)

pdf files do not have previews but you can still double click on the file and the previous item is displayed

avatar brianteeman
brianteeman - comment - 27 Jun 2021

If you dont check the box "Use native elements" before inserting then nothing added to the article

avatar richard67
richard67 - comment - 27 Jun 2021

For files and folder deletion on update with script.php you can leave it to @wilsonge and me. One of us will run the tool to generate the lists of files and folders when this PR has been merged and before the next release after that. So it does not need to be done in this PR. But if you want to do it here because you wanna make it right, I can help later.

For SQL scripts we have to decide how much we want to touch the media manager options on update. Since it will be at least risky and hacky trying to add single values to the json, we might have to completely replace the params so people would lose their settings on update if they have changed some. I can help with making the update SQL but not with
making the decision if we want that or not.

avatar brianteeman
brianteeman - comment - 27 Jun 2021

@richard67 whichever is decided on the sql there should be a postinstallation message. either saying the settings have been reset to the defaults or saying that you can update the settings to add support for pdf, etc

avatar richard67
richard67 - comment - 27 Jun 2021

@richard67 whichever is decided on the sql there should be a postinstallation message. either saying the settings have been reset to the defaults or saying that you can update the settings to add support for pdf, etc

Yeah, that makes sense. Personally I'd prefer the "We don't touch the settings and let the postinstall message tell people that they can update their settings to add support for PDF and so on" approach.

It can be that we have already an update SQL touching these parameters when updating from 3.10. If this is the case, we could modify that one to set them right. I have to check if there is one.

avatar brianteeman
brianteeman - comment - 27 Jun 2021

IIRC we discussed this when I added webp support (or tried to)

avatar richard67
richard67 - comment - 27 Jun 2021

I've just checked: It seems there is no update SQL script where we already touch the params of the com_media extension. So there is no need to modify such a script.

avatar dgrammatiko
dgrammatiko - comment - 27 Jun 2021

If you dont check the box "Use native elements" before inserting then nothing added to the article

Fixed, there are 3 modes: embed, insert asa link with predefined text, insert as a link with selected text from the editor (the 2nd was missing)

mp4 files have previews but there is no preview icon (you need to double click on the file to see the preview)

The preview needs refactoring so it can handle all the file types, also I thought that removing the magnifying glass I removed the preview but I totally forgot the double click FIXED

Click on a pdf file and then click on the three dots
Check the console

Some side effect from copy/pasting, investigating FIXED

The problem was in your test instructions. Better to clear the existing values in the options and then save in order to get the defaults. If it had been customised at all it would fail

Will update the instructions for existing installations

A comment about SQL files and B/C:

  • Since J4 supports multiple local adapters the images adapter should be sniffed on update time and the default directory for media files should be media-uploads or something similar. Having audio, video or other files under a directory images is weird but maybe I'm heretic here. My point is that this can be done in a non B/C breaking way with a post install script for updates. Also doing it this way means that we get rid of runtime code that we have right now to do the adjustment, sounds more solid solution to me anyways.
    Anyways I'm ok whatever the decision is here, post install message or not or whatever...
avatar richard67
richard67 - comment - 27 Jun 2021

A comment about SQL files and B/C:

* Since J4 supports multiple local adapters the `images` adapter should be sniffed on `update` time and the default directory for media files should be `media-uploads` or something similar. Having audio, video or other files under a directory `images` is weird but maybe I'm heretic here. My point is that this can be done in a non B/C breaking way with a post install script for updates. Also doing it this way means that we get rid of runtime code that we have right now to do the adjustment, sounds more solid solution to me anyways.
  Anyways I'm ok whatever the decision is here, post install message or not or whatever...

@dgrammatiko It would be good to have that post install script or procedure. But that would maybe be better a new routine in the script.php than an update SQL script. If necessary @joomdonation could have a look on it.

avatar joomla-cms-bot joomla-cms-bot - change - 27 Jun 2021
Category Administration com_media JavaScript NPM Change Language & Strings Repository Layout Front End Plugins Libraries SQL Installation Postgresql Administration com_media JavaScript NPM Change Language & Strings Repository SQL Installation Postgresql Layout Libraries Front End Plugins Unit Tests
avatar dgrammatiko dgrammatiko - change - 27 Jun 2021
Labels Added: ?
avatar brianteeman
brianteeman - comment - 27 Jun 2021

Preview of video now working correctly

Preview of pdf - almost - the preview opens but its black. Clicking on rotate makes it appear (maybe that will give a clue)

Audio file will not upload

avatar dgrammatiko
dgrammatiko - comment - 27 Jun 2021

Audio file will not upload

Make sure the legal mime types are: image/jpeg,image/gif,image/png,image/bmp,audio/mp3,video/mp4,application/msword,application/excel,application/pdf,application/powerpoint,text/plain,application/x-zip

avatar brianteeman
brianteeman - comment - 27 Jun 2021

Checked that twice before posting

image/jpeg,image/gif,image/png,image/bmp,audio/mp3,video/mp4,application/msword,application/excel,application/pdf,application/powerpoint,text/plain,application/x-zip

avatar dgrammatiko dgrammatiko - change - 27 Jun 2021
The description was changed
avatar dgrammatiko dgrammatiko - edited - 27 Jun 2021
avatar brianteeman
brianteeman - comment - 27 Jun 2021

Article intro and full image
This works when selecting an image (as before)
However you can select a non image file - instead of some type of error message saying "this isnt an image etc" it just silently returns

avatar dgrammatiko
dgrammatiko - comment - 27 Jun 2021

it just silently returns

Yes, I couldn't decide what would be the best scenario for this case so I silently ignored anything non-image. This might need an alert or something similar.

Checked that twice before posting

There's something fishy as the tests are also failing for no obvious reason

avatar richard67
richard67 - comment - 27 Jun 2021

@dgrammatiko Here the screenshot from drone from system tests: https://ci.joomla.org/artifacts/joomla/joomla-cms/4.0-dev/34634/system-tests/45401/MediaListCest.showsDefaultFilesAndFolders.mysql.fail.png

It says "syntax error, unexpected ')'".

Here the part of the log with the test where it fails:

MediaListCest: Test that it shows the joomla default media files and folders.
89s
325Signature: MediaListCest:showsDefaultFilesAndFolders
89s
326Test: tests/Codeception/acceptance/administrator/components/com_media/MediaListCest.php:showsDefaultFilesAndFolders
89s
327Scenario --
89s
328 I do administrator login 
89s
329  [Cookies] [{"name":"0cd014c79b960a69d3b33ac5245b0833","value":"2c944nm5pml9uatbrlgsjngk43","path":"/","domain":"localhost","expiry":1624893164,"secure":false,"httpOnly":false}]
89s
330  [Snapshot] Restored "ci-admin" session snapshot
89s
331 I create directory "images/test-dir"
89s
332   I get suite configuration 
89s
333   I get suite configuration 
89s
334 Created /tests/www/test-install/images/test-dir
89s
335 I am on page "administrator/index.php?option=com_media&..."
89s
336  [GET] http://localhost/test-install/administrator/index.php?option=com_media&path=local-images:/
89s
337 I wait for media loaded 
90s
338   I wait for element {"class":"media-loader"},3
90s
339   I wait for element not visible {"class":"media-loader"}
90s
340   I wait 1
90s
341 I see contents ["banners","headers","sampledata","joomla_black.png","powered_by.png"]
91s
342   I see element {"class":"media-browser-item"}
91s
343 I delete directory "images/test-dir"
91s
344   I get suite configuration 
91s
345 Deleted /tests/www/test-install/images/test-dir
91s
346 I execute js "window.sessionStorage.removeItem("joomla...."
91s
347  Screenshot and page source were saved into '/********/src/tests/Codeception/_output/' dir
91s
348 FAIL 

Does that help?

avatar dgrammatiko dgrammatiko - change - 27 Jun 2021
Labels Added: ?
Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 27 Jun 2021
Category Administration com_media JavaScript NPM Change Language & Strings Repository Layout Front End Plugins Libraries SQL Installation Postgresql Unit Tests Administration com_media JavaScript NPM Change Language & Strings Repository SQL Installation Postgresql Layout Libraries Front End Plugins
avatar dgrammatiko dgrammatiko - change - 27 Jun 2021
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 27 Jun 2021
Category Administration com_media JavaScript NPM Change Language & Strings Repository Layout Front End Plugins Libraries SQL Installation Postgresql Administration com_media JavaScript NPM Change Language & Strings Repository SQL Installation Postgresql Layout Libraries Front End Plugins Unit Tests
avatar dgrammatiko dgrammatiko - change - 27 Jun 2021
Labels Added: ?
avatar dgrammatiko
dgrammatiko - comment - 27 Jun 2021

Does that help?

Yup, turns out PHP is far away from becoming a functional programming language...

avatar joomla-cms-bot joomla-cms-bot - change - 27 Jun 2021
Category Administration com_media JavaScript NPM Change Language & Strings Repository Layout Front End Plugins Libraries SQL Installation Postgresql Unit Tests Administration com_media JavaScript NPM Change Language & Strings Repository SQL Installation Postgresql Layout Libraries Front End Plugins
avatar dgrammatiko dgrammatiko - change - 27 Jun 2021
Labels Removed: ?
avatar richard67
richard67 - comment - 27 Jun 2021

@dgrammatiko Now only analysis4x is failing in drone, which is some security stuff using RIPS and is not related to your PR.

There was a general problem with that, but that should be solved now. So if you wanna get rid of the red test and see all green, just update your branch to latest 4.0-dev. But it's not absolutely necessary because we know the drone failure here is that thing.

avatar dgrammatiko
dgrammatiko - comment - 27 Jun 2021

Article intro and full image
This works when selecting an image (as before)
However you can select a non image file - instead of some type of error message saying "this isnt an image etc" it just silently returns

Now the media field will display only images (this is configurable in the code and can be adjusted to fit any combo)

Audio file will not upload

For this, I need some help, maybe @laoneo ?

avatar Fedik
Fedik - comment - 28 Jun 2021

Looks good to me (except broken upload for audio/video).

I would suggest to add webm, mov for video, and ogg for audio, from beginning. Or later we will get a complains about it.

avatar dgrammatiko
dgrammatiko - comment - 28 Jun 2021

Looks good to me (except broken upload for audio/video).

Technically this bug is unrelated to this PR, it just happens to become obvious from the changes here

I would suggest to add webm, mov for video, and ogg for audio, from beginning. Or later we will get a complains about it.

Yeah, also webp images and maybe avif (avif is already supported on GD and Imagick but right now you have to compile from source to enable support, but will be available in some next minor release)

avatar brianteeman
brianteeman - comment - 28 Jun 2021

There is already an open PR for webp. Its just stuck in an open state because cropper.js doesnt work in firefox for windows.

avatar dgrammatiko
dgrammatiko - comment - 28 Jun 2021

@brianteeman can you do a simple check: in your apache configuration there should be a file mime.types, could you compare it with this one
mime.types.txt (backup your existing, remove the .txt and place it in the same folder).
I have no clue if php is sniffing the mime types from apache but if it does then there isn't a problem but rather a misconfiguration (I can upload mp3/mp4 without any problems here)

avatar brianteeman
brianteeman - comment - 28 Jun 2021

Rebuilding my site at the moment but I think I may have found the problem

mime.types says
audio/mpeg mpga mp2 mp2a mp3 m2a m3a

This PR says
audio\mp3

Checking the spec audio\mpeg

So the problem does appear to be related to the pr and not the server

avatar dgrammatiko
dgrammatiko - comment - 28 Jun 2021

Good catch!

avatar brianteeman
brianteeman - comment - 28 Jun 2021

I can now add mp3

What is the intended behaviour with the mp3 preview. I just get a filename
image

avatar brianteeman
brianteeman - comment - 28 Jun 2021

image

I find this confusing. I expected the description to be an explanation of the option. The last sentence really describes what to do if you dont want a d/l link.

I would probably have two options
Embed
Use native elements audio, video or object

Download
Use a download link

avatar dgrammatiko
dgrammatiko - comment - 28 Jun 2021

What is the intended behaviour with the mp3 preview. I just get a filename

Weird, you should get:
Screenshot 2021-06-28 at 12 41 14

and a markup:

Screenshot 2021-06-28 at 12 41 34

Does your apache mime.types has uncommented the mp3 part? (I think you can drop a mimes.type in the root of the joomla folder, eg grab the one from a couple of comments above)

avatar dgrammatiko
dgrammatiko - comment - 28 Jun 2021

I would probably have two options

You mean something like a switcher or use one of the 2 proposals?

avatar brianteeman
brianteeman - comment - 28 Jun 2021

Weird - the preview works now

You mean something like a switcher or use one of the 2 proposals?

switcher/checkbox/radio - dont care but something that means the user is actively selecting embed or download

avatar N6REJ
N6REJ - comment - 28 Jun 2021

Nice to finally see this.

avatar dgrammatiko
dgrammatiko - comment - 28 Jun 2021

switcher/checkbox/radio - dont care but something that means the user is actively selecting embed or download

I went for a radio and it looks like:
Screenshot 2021-06-28 at 14 35 17
Screenshot 2021-06-28 at 14 35 26

avatar brianteeman
brianteeman - comment - 28 Jun 2021

Is there a reason you went for a fixed size embed instead of a responsive embed? (https://embedresponsively.com/)

avatar dgrammatiko
dgrammatiko - comment - 28 Jun 2021

Is there a reason you went for a fixed size embed instead of a responsive embed?

The wide/height are not for sizing but rather (as with images) to inform the browser what's the aspect ratio (plain English to allow the browser to correctly calculate the empty space till the video/object is loaded)

For example the code that linked does this (creates an empty 16/9 parent div and then inserts the iframe into it. This is a hack, we don't need to do this anymore, browsers respect and retrieve the correct aspect ratio from the width/height attributes.

A good resource for width/height from Jen Simmons: https://speakerdeck.com/jensimmons/using-the-html-width-and-height-attributes-to-improve-web-page-loading

avatar brianteeman
brianteeman - comment - 28 Jun 2021

Is there a reason you went for a fixed size embed instead of a responsive embed?

and thats the good reason - thanks

avatar brianteeman brianteeman - test_item - 28 Jun 2021 - Tested successfully
avatar brianteeman
brianteeman - comment - 28 Jun 2021

I have tested this item successfully on 08ce817


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/34634.

avatar brianteeman
brianteeman - comment - 28 Jun 2021

I have tested this item successfully on 08ce817


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/34634.

avatar Quy
Quy - comment - 28 Jun 2021

Maybe swap Embed and Download radio buttons since Enable Controls relates to Embed.

avatar dgrammatiko
dgrammatiko - comment - 28 Jun 2021

Maybe swap Embed and Download radio buttons since Enable Controls relates to Embed.

Done

avatar Quy
Quy - comment - 28 Jun 2021

Edit an article.
Click CMS Content > Media
Click on an MP3 file.
Click Embed radio button.
Click Enable Controls checkbox.
The checkbox should not disappear.

avatar dgrammatiko
dgrammatiko - comment - 28 Jun 2021

The checkbox should not disappear.

Fixed, thanks

avatar Quy
Quy - comment - 28 Jun 2021

Checked/unchecked Enable Controls produce the same markup.

<p><audio src="images/t-rex-roar.mp3" controls="controls"></audio></p>

avatar dgrammatiko
dgrammatiko - comment - 28 Jun 2021

Checked/unchecked Enable Controls produce the same markup.

Fixed, thanks

avatar Quy
Quy - comment - 28 Jun 2021

Missing icon in list view.

34634-icon

avatar alikon
alikon - comment - 28 Jun 2021

can you take a look at #34314 @dgrammatiko please

avatar dgrammatiko
dgrammatiko - comment - 28 Jun 2021

Missing icon in list view.

Fixed

can you take a look at #34314

I've seen it already but I don't think I'm the right guy for feedback there. My feeling is that we might want to control the contents of a folder that is returned (mind there's no permissions as in other components so things might have to be done different, eg utilising the same technic as: https://github.com/joomla/joomla-cms/pull/34634/files#diff-8404917e9476fe232ef9c49920ced95e9ce5825e5efd60f955ecde240a2a090aL533-R583 ) or wait till a db layer is added in com_media (or I'm totally wrong...).

avatar Quy
Quy - comment - 28 Jun 2021

Select an MP3 file.
Click Embed radio button.
Don't click Enable Controls.

Here is the markup, but nothing is displayed.

<audio src="images/t-rex-roar.mp3"></audio>

avatar dgrammatiko
dgrammatiko - comment - 28 Jun 2021

Here is the markup, but nothing is displayed.
<audio src="images/t-rex-roar.mp3"></audio>

Option to add or not controls removed. To my defend here, if you have a JS player you only need the tag with the source as the rest are often controlled by the JS player. Anyhow, if in the future people asking for this option the code is here...

avatar brianteeman
brianteeman - comment - 29 Jun 2021

Embedding an object requires and alt or equivalent see
https://accessibilityinsights.io/info-examples/web/object-alt/

avatar brianteeman
brianteeman - comment - 29 Jun 2021

The preview of a video is different to a preview of an image with regards to width and the position of the close button. I am assuming its some css

image

image

avatar joomla-cms-bot joomla-cms-bot - change - 29 Jun 2021
Category Administration com_media JavaScript NPM Change Language & Strings Repository Layout Front End Plugins Libraries SQL Installation Postgresql Administration com_media JavaScript NPM Change Language & Strings Repository SQL Installation Postgresql Layout Libraries
avatar dgrammatiko
dgrammatiko - comment - 29 Jun 2021

Embedding an object requires and alt or equivalent see

I will implement this later on today Implemented

avatar dgrammatiko
dgrammatiko - comment - 29 Jun 2021

The preview of a video is different to a preview of an image with regards to width and the position of the close button. I am assuming its some css

The current implementation is using inline style background for the image, thus the difference

avatar Quy
Quy - comment - 29 Jun 2021

Close icon overlaps filename.

34634-close

avatar micker
micker - comment - 30 Jun 2021

Hello i tested work very good for me, just 2 notices :

  • the additionnal windows doesn't close when we close media
  • it will be cool to open media popup when we do right click or double click on media easier to change option
    thanks a million @dgrammatiko Now we have a real MEDIA manager !!!
avatar joomla-cms-bot joomla-cms-bot - change - 30 Jun 2021
Category Administration com_media JavaScript NPM Change Language & Strings Repository Layout Libraries SQL Installation Postgresql Administration com_content com_media JavaScript NPM Change Language & Strings Repository SQL Installation Postgresql Layout Libraries
avatar joomla-cms-bot joomla-cms-bot - change - 30 Jun 2021
Category Administration com_media JavaScript NPM Change Language & Strings Repository Layout Libraries SQL Installation Postgresql com_content Administration com_media JavaScript NPM Change Language & Strings Repository SQL Installation Postgresql Layout Libraries
5b4d9ee 30 Jun 2021 avatar dgrammatiko meh
c544cbb 30 Jun 2021 avatar dgrammatiko oops
65432a2 30 Jun 2021 avatar dgrammatiko meh
f7a3557 30 Jun 2021 avatar dgrammatiko meh
1c2544d 30 Jun 2021 avatar dgrammatiko meh
0d8e875 30 Jun 2021 avatar dgrammatiko erm
22491df 30 Jun 2021 avatar dgrammatiko nope
avatar dgrammatiko dgrammatiko - change - 30 Jun 2021
The description was changed
avatar dgrammatiko dgrammatiko - edited - 30 Jun 2021
avatar dgrammatiko
dgrammatiko - comment - 30 Jun 2021

the additionnal windows doesn't close when we close media

I don't understand what you mean, the media manager opens in a modal, not a new window...

it will be cool to open media popup when we do right click or double click on media easier to change option

This is not possible for 2 main reasons:

  • there is always an extra step after selecting a file (provide alt text or embed or link for download) so it will never be one-step process
  • there are 2 client-side applications: the media manager and a tiny Custom Element that asks for the extra info. These 2 cannot be combined into one as the one runs in an iframe and the other one on the main document. To get everything in the same window requires a huge refactor of few parts (doable but not a couple of days work...)
avatar micker
micker - comment - 30 Jun 2021

Ok for point 2
For point sorry for my Bad explain i mean the small zone with option (embed or download) this zone doesnt close when WE close media

avatar dgrammatiko
dgrammatiko - comment - 30 Jun 2021

i mean the small zone with option (embed or download) this zone doesnt close when WE close media

Can you record a video demonstrating what's not working? Seems fine here

avatar joomla-cms-bot joomla-cms-bot - change - 30 Jun 2021
Category Administration com_media JavaScript NPM Change Language & Strings Repository Layout Libraries SQL Installation Postgresql Administration com_media JavaScript NPM Change Language & Strings Repository SQL Installation Postgresql Layout
avatar joomla-cms-bot joomla-cms-bot - change - 30 Jun 2021
Category Administration com_media JavaScript NPM Change Language & Strings Repository Layout SQL Installation Postgresql Administration com_media JavaScript NPM Change Language & Strings Repository SQL Installation Postgresql
avatar micker
micker - comment - 30 Jun 2021

i do small video, that the additionnal option zone
https://www.loom.com/share/b378c2a3c7304547ad577516f65c4742
thnaks

avatar dgrammatiko
dgrammatiko - comment - 30 Jun 2021

i do small video, that the additionnal option zone

Ok, I see what you mean and already fixed 3 cases that the aditional data should be dismissed but as long as some file is selected this will be visible. You can click on the title Aditional Data though, and that will be minimised. I can't do anything more here

avatar micker
micker - comment - 30 Jun 2021

Ok that already better !

avatar dgrammatiko
dgrammatiko - comment - 30 Jun 2021

@micker can you please mark you test on the issues site?

avatar brianteeman brianteeman - test_item - 30 Jun 2021 - Tested successfully
avatar brianteeman
brianteeman - comment - 30 Jun 2021

I have tested this item successfully on 42d28ef


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/34634.

avatar micker
micker - comment - 30 Jun 2021

I have tested this item successfully on 42d28ef too

avatar richard67
richard67 - comment - 30 Jun 2021

@micker Could you please go to the issue tracker here and mark your test result in the right way? Just copying the message from another test is not sufficient. G to https://issues.joomla.org/tracker/joomla-cms/34634 , use the "Test this" button at the top left corner, select the appropriate test result and then submit. Thanks in advance.

avatar micker micker - test_item - 30 Jun 2021 - Tested successfully
avatar micker
micker - comment - 30 Jun 2021

I have tested this item successfully on 42d28ef

Tested and perfect
Sorry Richard a mistake


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/34634.

avatar richard67 richard67 - change - 30 Jun 2021
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 30 Jun 2021

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/34634.

avatar wilsonge wilsonge - change - 2 Jul 2021
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2021-07-02 08:43:25
Closed_By wilsonge
Labels Added: ?
avatar wilsonge wilsonge - close - 2 Jul 2021
avatar wilsonge wilsonge - merge - 2 Jul 2021
avatar wilsonge
wilsonge - comment - 2 Jul 2021

This seems to important to not merge right now given it has b/c implications. Although it's not great given our point of RC. Thankyou so much @dgrammatiko for your hard work on this!

avatar brianteeman
brianteeman - comment - 2 Jul 2021

woohoo!!!

avatar dgrammatiko
dgrammatiko - comment - 2 Jul 2021

Thanks

@wilsonge the B/C break is the change of some of the com_media params and to be honest here even what I did here is not perfect. An ideal solution is to have a data structure like

{
  supported: [
    {
      extension: 'png',
      mine: 'image/png',
      preview: true,
      upload: true
    }
  ]
}

That will allow to remove the hardcoded preview extensions in the com_media app (vue) and also if done right (subforms?) it will be easier in the backend (eg have a pool that users enable/disable, instead of typing tings)

Add a Comment

Login with GitHub to post a comment