Skip to content

[4.2] Allow typing in media field#37654

Merged
roland-d merged 11 commits intojoomla:4.2-devfrom
dgrammatiko:patch-3
Apr 27, 2022
Merged

[4.2] Allow typing in media field#37654
roland-d merged 11 commits intojoomla:4.2-devfrom
dgrammatiko:patch-3

Conversation

@dgrammatiko
Copy link
Contributor

@dgrammatiko dgrammatiko commented Apr 25, 2022

Pull Request for Issue # . Replaces #36945

Summary of Changes

  • Removes the readonly attribute from the input of Media Field so users could type freely
  • It doesn't fix the preview for EXTERNAL urls (out of scope)

Testing Instructions

  • Create a new article and add some title
  • go to the images tab
  • type (or copy paste) images/sampledata/cassiopeia/not-valid.jpg
  • save the form
  • type (or copy paste) images/sampledata/cassiopeia/nasa1-400.jpg
  • Save the form (observe that the image url has the # parts!!!!)
  • type (or copy paste) /images/sampledata/cassiopeia/nasa1-400.jpg
  • save the form (observe the URL)
  • type (or copy paste) any valid external URL
  • save the form

Screenshot 2022-04-25 at 16 31 44

Screenshot 2022-04-25 at 16 32 11

Screenshot 2022-04-25 at 16 32 22

Actual result BEFORE applying this Pull Request

Expected result AFTER applying this Pull Request

Documentation Changes Required

@joomla-cms-bot joomla-cms-bot added NPM Resource Changed This Pull Request can't be tested by Patchtester PR-4.2-dev labels Apr 25, 2022
@coolcat-creations
Copy link
Contributor

coolcat-creations commented Apr 25, 2022

@dgrammatiko I tested the patch and typing is possible but it does not update the preview after typing in / pasting the desired path

  • the # are not added - should they be added with the patch? I am testing on localhost with the patchtester

@dgrammatiko
Copy link
Contributor Author

dgrammatiko commented Apr 25, 2022

did you read the description? Also what is the url you're entering?

I am testing on localhost with the patchtester

Yeah that won't work, try d/l the package at the end of this PR (GitHub)

@coolcat-creations
Copy link
Contributor

Yes I read the description - maybe I misunderstood them or the issue is because i used patchtester. I will try with the prebuild package then. Thank you

@coolcat-creations
Copy link
Contributor

I installed now the prebuilt package and it works mostly like expected.
Only mostly because I succeeded to break it like that, that now the not valid message appears despite I chosed an image in the modal. (Also after hitting save)

grafik

@dgrammatiko
Copy link
Contributor Author

@coolcat-creations should be fine now

@coolcat-creations
Copy link
Contributor

I have tested this item ✅ successfully on 048f033


type (or copy paste) images/sampledata/cassiopeia/not-valid.jpg - done works (Validation message displayed)

type (or copy paste) images/sampledata/cassiopeia/nasa1-400.jpg - done works (#parts added)

type (or copy paste) /images/sampledata/cassiopeia/nasa1-400.jpg - done works (#parts added)

type (or copy paste) any valid external URL - done and works (image previewed, no # parts added as expected)

Thank you very much!!!


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

@richard67
Copy link
Member

@coolcat-creations Could you test this PR again? It has received some changes after your last test. Thanks in advance.

Fixes the events inconsistency
@RickR2H
Copy link
Member

RickR2H commented Apr 26, 2022

@dgrammatiko Thanks for looking into this. Much appreciated!

I noticed that when I select the image via the select button I get: images/joomla_black.png#joomlaImage://local-images/joomla_black.png?width=225&height=50 But when I paste the URL like this: images/joomla_black.png I get the URL images/joomla_black.png#joomlaImage://local-images/joomla_black.png?width=225&height=225

Ik looks like when pasting the URL the exact image width and height are not respected and the image is default defined as squared.


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

@dgrammatiko
Copy link
Contributor Author

Ik looks like when pasting the URL the exact image width and height are not respected and the image is default defined as squared

The wrong variable was passed fro the height, it should be ok after cf77958

@coolcat-creations
Copy link
Contributor

coolcat-creations commented Apr 26, 2022

Good catch! did not see this. I will test now as well ... waiting for the new prebuilt package :)

@RickR2H
Copy link
Member

RickR2H commented Apr 26, 2022

I have tested this item ✅ successfully on cf77958

Thanks @dgrammatiko


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

@coolcat-creations
Copy link
Contributor

I have tested this item ✅ successfully on cf77958

Thank you, tested successful as the given testing instructions.

The Preview seems not to work for svg tough but I think thats another issue


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

@RickR2H
Copy link
Member

RickR2H commented Apr 26, 2022

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Apr 26, 2022
@roland-d roland-d merged commit f6c9aa8 into joomla:4.2-dev Apr 27, 2022
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Apr 27, 2022
@roland-d
Copy link
Contributor

Thanks everybody

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

Labels

NPM Resource Changed This Pull Request can't be tested by Patchtester

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants