Ready to take over Conflicting Files NPM Resource Changed ? Failure

User tests: Successful: Unsuccessful:

avatar okonomiyaki3000
okonomiyaki3000
18 Jun 2018

Pull Request for Issue #11805 .

Summary of Changes

New (abstract) field class ModalField to serve as base for most modal field classes.
New web component joomla-field-modal
Updated modal_category, modal_contact, modal_article, modal_menu, modal_newsfeed to use ModalField as base class.

Testing Instructions

These field types are most easily testable on menu item pages. For example, the 'Single Article' menu item type has a modal_article field.

Since the problem with these field types before was that they did not work properly in subforms, test them in subforms. The fields/checkboxes plugin has a subform in it, you can easily alter that to include fields of these types.

Expected result

Modal behavior should be basically the same as in J3. You can open modals to select, edit, or create items. You can clear the field of all values.

When using modal fields in a repeatable subform, fields on newly created rows should work just as well as those that were on the page when initially loaded.

Actual result

Before the patch, modal fields in repeatable subforms had trouble (#11805 is about modal_article but really the problem applies to all of them). It's also possible that all modal fields were broken in J4 anyway.

After the patch, all of these things should work.

Documentation Changes Required

Maybe not.

avatar okonomiyaki3000 okonomiyaki3000 - open - 18 Jun 2018
avatar okonomiyaki3000 okonomiyaki3000 - change - 18 Jun 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 18 Jun 2018
Category Administration com_categories com_contact com_content com_menus com_newsfeeds Layout Libraries JavaScript
avatar dgrammatiko
dgrammatiko - comment - 18 Jun 2018

Great work @okonomiyaki3000 !!!
One note here: this file : media/system/webcomponents/js/joomla-field-modal.es6.js which is the source of the custom element needs to be moved here: https://github.com/joomla/joomla-cms/tree/4.0-dev/build/webcomponents/js and then you need to run the command node build.js --compilecejs

The reason for this is that the class on custom elements is not properly transpiled from babel. At some point we need to merge the es6 and the custom elements building scripts...

avatar okonomiyaki3000
okonomiyaki3000 - comment - 18 Jun 2018

@dgrammatiko Ah, thanks! I had a feeling something was wrong.

avatar okonomiyaki3000
okonomiyaki3000 - comment - 18 Jun 2018

I guess I also need to add it to package.json in the appropriate places?

avatar okonomiyaki3000 okonomiyaki3000 - change - 18 Jun 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 18 Jun 2018
Category Administration com_categories com_contact com_content com_menus com_newsfeeds Layout Libraries JavaScript Administration com_categories com_contact com_content com_menus com_newsfeeds JavaScript Repository Layout Libraries
avatar okonomiyaki3000
okonomiyaki3000 - comment - 19 Jun 2018

This dog is provoking me.

I'm a big fan of linters actually but I strongly disagree with some of the choices in how eslint has been set up. Also, the generated files should not be linted at all.

avatar joomla-cms-bot joomla-cms-bot - edited - 19 Jun 2018
avatar joomla-cms-bot joomla-cms-bot - change - 19 Jun 2018
Title
Fix modal fields
[4.0] Fix modal fields
avatar Quy Quy - change - 19 Jun 2018
Title
Fix modal fields
[4.0] Fix modal fields
avatar wilsonge
wilsonge - comment - 23 Sep 2018

This one escaped me - can we sync this back up please?

avatar infograf768
infograf768 - comment - 30 Dec 2018

@okonomiyaki3000
Can you solve conflicts and be nice to hound ? ?

avatar okonomiyaki3000
okonomiyaki3000 - comment - 4 Jan 2019

@infograf768 I'm going to be a bit too busy to get back to it for probably at least a month maybe more. Also I'm not enthusiastic about new js coding standards. Makes me not really want to write js for joomla anymore.

avatar gnanakeethan
gnanakeethan - comment - 22 Jan 2019

@dgrammatiko I am a newbie in the J4.0 space. Lets see how things go. I worked on 1.5-3.5 versions. Never been into J! codebase for a long time. I hope I can work things out.

@infograf768 thanks for linking the issues. ? ?

avatar uglyeoin
uglyeoin - comment - 19 Oct 2019

Is this ready to test yet?

avatar okonomiyaki3000
okonomiyaki3000 - comment - 21 Oct 2019

@uglyeoin Nope. Well, if I remember correctly, it should work as it's supposed to. The only problem is that Hound complains about...something. Coding style violations maybe? It's been a while so I don't exactly remember but it's too tedious because I wasn't able to test these violations locally, I just had to upload here and wait for the result then go fix it and repeat. Also, the coding standard Joomla has decided to go with for JS seems pretty awful. I don't remember all the points about it that bothered me but, for example, it forbids the use of bitwise operators. WTF kind of rule is that? Get out of here with that nonsense.

avatar coolcat-creations
coolcat-creations - comment - 9 Apr 2020

Is it possible to test it now? :-)


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

avatar okonomiyaki3000
okonomiyaki3000 - comment - 12 Apr 2020

@coolcat-creations I have not touched it in a long time and I will not until I can run these hound tests locally which I have also not tried to do for a long time. If someone else wants to pick it up, I would not be sad.

avatar Ruud68
Ruud68 - comment - 19 Jun 2020

Hi before creating a new issues, just asking if this is related.
When in Menu > single article > create new article > modal comes up with new article form.
The published and featured are malformed / not working.

Same for editing a plugin in a modal, all btn btn-group radio buttons do not work any more (they switch value, but the new value is only displayed after refresh page.
screen shot 2020-06-19 at 08 07 50


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

avatar roland-d
roland-d - comment - 1 Aug 2020

@okonomiyaki3000 Do you have any interest in fixing this or should the PR be closed?

avatar Ruud68
Ruud68 - comment - 1 Aug 2020

A issue that is not fixed should not be closed.

avatar Quy
Quy - comment - 1 Aug 2020

@roland-d See #20788 (comment)

@Ruud68 If it is no longer being maintained, then close the PR and reopen the issue.

avatar flo-the-cat flo-the-cat - test_item - 16 Oct 2020 - Tested unsuccessfully
avatar flo-the-cat
flo-the-cat - comment - 16 Oct 2020

I have tested this item ? unsuccessfully on 8aa4424

The file marked for modification does not exist: administrator/components/com_categories/Field/Modal/CategoryField.php


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

avatar dgrammatiko
dgrammatiko - comment - 13 Jan 2021

@okonomiyaki3000 do you mind if I clone this PR to rebase it?

avatar Quy
Quy - comment - 13 Jan 2021

@dgrammatiko See his last reply #20788 (comment)

avatar richard67 richard67 - change - 1 Feb 2022
Title
[4.0] Fix modal fields
[4.2] Fix modal fields
avatar richard67 richard67 - edited - 1 Feb 2022
avatar joomla-cms-bot joomla-cms-bot - change - 1 Feb 2022
Category Administration com_categories com_contact com_content com_menus com_newsfeeds Layout Libraries JavaScript Repository Administration com_categories com_contact com_content com_menus com_newsfeeds JavaScript Repository Layout Libraries NPM Change
avatar laoneo
laoneo - comment - 20 Mar 2022

@dgrammatiko do you mind to make a new pr?

avatar dgrammatiko
dgrammatiko - comment - 20 Mar 2022

Last time we were discussing about this one (basically with @Fedik #32473) we conclude that there some known bottlenecks and I don't think I have a solution for all aspects of this PR.
For example (quoting @Fedik here but I also agree)

The interaction between the iframe content and the parent document need to be event based,
without hardcoded callbacks, that often missed somewhere. Basically enough just 2 event:
` joomla:close-popup`, `joomla:select-content` (with data to select).

This is platform wide change with some hard B/C breaks, so I don't think this could happen in a minor version, maybe 5.0 (?) but if there's a decision to move towards a better solution in the next minor, I could spend some time to do a POC

avatar dgrammatiko
dgrammatiko - comment - 20 Mar 2022

BTW dialog is supported everywhere, so there's no need for bootstrap for the modals anymore. Just saying...

avatar laoneo
laoneo - comment - 20 Mar 2022

I'm closing this one as it is abandoned and has too many hound issues. Till somebody takes it over or starts from scratch, I'v opened an issue #37327.

avatar laoneo laoneo - close - 20 Mar 2022
avatar laoneo laoneo - change - 20 Mar 2022
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2022-03-20 12:18:41
Closed_By laoneo
Labels Added: Ready to take over NPM Resource Changed ?
Removed: ?
avatar richard67
richard67 - comment - 20 Mar 2022

See also discussion #32473

Add a Comment

Login with GitHub to post a comment