Feature Documentation Required NPM Resource Changed PR-5.0-dev Pending

User tests: Successful: Unsuccessful:

avatar Fedik
Fedik
23 Apr 2023

Summary of Changes

Adding new generic ModalSelectField to select content in modal.
This is addittion to #40150 to improve our modal windows.
And should replace (in future) modal-fields.js.
Instead of hardcoded callback, now it should be used window.postMessage() wich is more safe, and all Form buttons should be within same DOM document.

This approcah also will help to improve Editor-xtd buttons #40202.

In this PR I have transfrmed Modal_Article field to use new ModalSelect.
However it still will be need some work to improve handling propagationAssotiation.

Testing Instructions

Apply #40150 patch and apply current PR.
Go to menu and crate a Single Article menu.
In article field test: Select, Create, Clear buttons.

In multilanguage site try edit Article association.

Also can test the field in subform:

<field type="subform" name="subform" label="subform" multiple="true">
  <form>
    <field 
        type="ModalSelect"
        name="article" label="Article"
        urlSelect="index.php?option=com_content&amp;view=articles&amp;layout=modal&amp;tmpl=component"
    />
  </form>
</field>

Actual result BEFORE applying this Pull Request

Works

Expected result AFTER applying this Pull Request

Works but better :)

Link to documentations

Please select:

avatar joomla-cms-bot joomla-cms-bot - change - 23 Apr 2023
Category Administration com_categories com_contact com_content com_menus Templates (admin) JavaScript Repository NPM Change Layout Libraries
avatar Fedik Fedik - open - 23 Apr 2023
avatar Fedik Fedik - change - 23 Apr 2023
Status New Pending
avatar Fedik Fedik - change - 23 Apr 2023
The description was changed
avatar Fedik Fedik - edited - 23 Apr 2023
b00863d 23 Apr 2023 avatar Fedik phpcs
avatar Fedik Fedik - change - 23 Apr 2023
Labels Added: ? NPM Resource Changed PR-5.0-dev
60d6fe8 23 Apr 2023 avatar Fedik phpcs
4357afc 23 Apr 2023 avatar Fedik phpcs
avatar HLeithner HLeithner - change - 23 Apr 2023
Title
Generic ModalSelect field
[5.0] Generic ModalSelect field
avatar HLeithner HLeithner - edited - 23 Apr 2023
avatar Fedik Fedik - change - 23 Apr 2023
The description was changed
avatar Fedik Fedik - edited - 23 Apr 2023
avatar HLeithner
HLeithner - comment - 23 Apr 2023

I like the postMessage approach. I'm not sure if it could be a more generic for example to have one "modalreturn" layout for all usages of the modalfield.

avatar Fedik
Fedik - comment - 23 Apr 2023

a more generic for example to have one "modalreturn" layout

This mainly need to handle "Save & Close" / "Cancel" (in modal) because after save we always have a redirect.

I thinking about generic layout, kind of what we have for "emptystate". Will see, maybe later will find some better ideas.

avatar brianteeman
brianteeman - comment - 23 Apr 2023

Really excited about this

avatar Fedik Fedik - change - 23 Apr 2023
The description was changed
avatar Fedik Fedik - edited - 23 Apr 2023
avatar HLeithner
HLeithner - comment - 23 Apr 2023

Really excited about this

me too

avatar chmst
chmst - comment - 23 Apr 2023

me too!

avatar Fedik
Fedik - comment - 30 Apr 2023

@brianteeman do you remember what Propagation button actualy doing (in multilanguage)?
Currently it is coded in to every Article_Modal, Menu_Modal etc. fields. It a bit hacky thing that I have no idea what to do :)

avatar brianteeman
brianteeman - comment - 30 Apr 2023

I have zero idea. Everytime I tried to work it out I failed

avatar Fedik
Fedik - comment - 30 Apr 2023

Okay, I have found the origin #21321. Still not fully understood, need to think how to keep it.

avatar Fedik Fedik - change - 21 Aug 2023
Labels Added: Feature
Removed: ?
avatar Fedik Fedik - change - 23 Aug 2023
The description was changed
avatar Fedik Fedik - edited - 23 Aug 2023
avatar Fedik Fedik - change - 23 Aug 2023
Labels Added: Documentation Required
avatar HLeithner
HLeithner - comment - 24 Aug 2023

I like it, it looks good. only thing I'm not so sure if the buttons in the iframe are a good idea... we don't have much space in the iframe and that's another row...

image

looking at the Ipad air there is not much room for real content
image

avatar Fedik
Fedik - comment - 24 Aug 2023

we don't have much space in the iframe and that's another row...

They will eat space wherever you place them, but they should be within the same document where the form is.

there is not much room for real content

I would not expect much room for such editing anyway.
Default dialog size is:

width: 80vw;
max-width: 1700px;
height: 80vh;

And can be styled.

avatar Fedik
Fedik - comment - 24 Aug 2023

I have increased default size

a3e87f5 24 Aug 2023 avatar Fedik csscs
52f1862 24 Aug 2023 avatar Fedik tests
c32d9f0 24 Aug 2023 avatar Fedik tests
avatar Fedik
Fedik - comment - 2 Sep 2023

I have prepared changes for Menu field also: Fedik/joomla-cms@5.0-dev...popup-field-menu

avatar HLeithner HLeithner - close - 2 Sep 2023
avatar HLeithner HLeithner - merge - 2 Sep 2023
avatar HLeithner HLeithner - change - 2 Sep 2023
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2023-09-02 16:06:37
Closed_By HLeithner
avatar HLeithner
HLeithner - comment - 2 Sep 2023

thanks, I merge this for beta1 to get better feedback and we have time to fix issues.

Add a Comment

Login with GitHub to post a comment